Skip to content

Adjust attach() per TeXbook Appendix G 18a - #1129

Merged
laurmaedje merged 3 commits into
typst:mainfrom
Leedehai:supsub-18a
May 11, 2023
Merged

laurmaedje merged 3 commits into
typst:mainfrom
Leedehai:supsub-18a

Conversation

@Leedehai

@Leedehai Leedehai commented May 7, 2023 •

Copy link
Copy Markdown
Contributor

Fixes issue #539.

18a. If the translation of the nucleus is a character box, possibly followed by a kern, set u and v equal to zero; otherwise set u ← h − q and v ← d + r

Some nuances shown below indicate the patch makes Typst more aligned with LaTeX:
LaTeX:

$$ b^2 \sqrt{b^2}, y_1^1 \lg_1^1, (by)_2^2 \neq \left(by\right)_2^2 $$

Typst:

$ b^2 sqrt(b^2), y_1^1 lg_1^1, "("b y")"_2^2 != (b y)_2^2 $
image
LaTeX Screenshot 2023-05-06 at 22 42 46
Typst with this patch Screenshot 2023-05-06 at 22 44 02
Typst without this patch Screenshot 2023-05-06 at 22 50 11

@laurmaedje
laurmaedje merged commit e8de8a4 into typst:main May 11, 2023
@laurmaedje

Copy link
Copy Markdown
Member

Very nice! I wouldn't have thought that the fix is so simple. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants