Skip to content

Center delimiters vertically about the axis#1756

Merged
laurmaedje merged 1 commit intotypst:mainfrom
damaxwell:XITS-paren
Jul 20, 2023
Merged

Center delimiters vertically about the axis#1756
laurmaedje merged 1 commit intotypst:mainfrom
damaxwell:XITS-paren

Conversation

@damaxwell
Copy link
Contributor

Closes #540

This is the same song, different verse of the recently merged #1735. The XITS Math parentheses have a low baseline.

image

However, the baseline plays no role in math layout:

TeXbook, Appendix G, Rule 19 (deep in the paragraph): "Shift the delimiters up or down so that they are vertically centered with respect to the axis."

XeLaTeX and MS Word have no trouble with delimiters with XITS Math.

This PR ensures that delimiters (which arise in vector, matrix, binomial coefficient, and LR constructions) are centered on the axis.

There were 9 test files that had changes. All were very minor (2% or less pixel variations) associated with minor shifts associated with delimiters.

#set text(size:12pt)
#show math.equation: set text(font:"XITS Math", fallback:false)
$
( A / (sum_c^d k) )
$

Before

image

After

image

@laurmaedje laurmaedje merged commit c72952b into typst:main Jul 20, 2023
@laurmaedje
Copy link
Member

Wow, you are on a roll!

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.

Incorrect vertical position of brackets when using XITS Math

2 participants