Support TeX-like left..right construct #2179
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR supports TeX's
\left
...\right
construct in SILE's TeX-like syntax.It is proposed both under the principle of least astonishment, and for existing equations in LaTeX syntax, often using this construct, to be supported as-is.
I included a test scenario, which show its use, incl. with unpaired delimiters, and with the period as "null delimiter".
Regarding other tests: In my booklet, I had set
\left
and\right
as no-op with a\def
, so I didn't have to remove these from all my test formulas... I just removed that hack, and all reprocessed fine.Moreover, these formulas from Josephus Javawaski's Browser Test now pass really decently:
The first (in TeX syntax, similar to the MathML case shown in #2177 (comment)) was passing but without the appropriate stretch on the vertical bars.
The second was not rendering as expected, as it uses a few null delimiters (e.g.
\right.
) which my no-op hack of course didn't cancel out (the period was rendered), besides the same vertical bar sizing issue as the previous.It thus ticks a checkbox in #2148 -- and there's then one only left there, but I'll discuss it afterwards in that ticket (I think what we have is actually better)