-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compare different methods of entering primes in LaTeX Math #10
base: master
Are you sure you want to change the base?
Conversation
I've also compared different methods of handling of primes in math, because I think it is better to use |
Thanks. The Use of I'm not so sure what to do here. I am not convinced you are correct about this:
This seems like something subjective you are doing because you prefer the output, not because it is the correct math typesetting expectation. In fact I suspect from what other people have said about this and elsewhere that this is objectively wrong and just a work around for a different visial preference than the math font designer intended. In particular the use of STIX TWO and Libertinus Math here were specifically to highlight different ways of encoding the prime, and the latter might actually be wrong. As such hacking around it is hiding the difference between typesetting engines I was trying to highlight. c.f. typst/typst#2860 It might be good to add a comparison between |
Also on the coordinates topic: the difference between XeLaTeX Unicode handling and the |
On deeper review a detail I missed:
|
In TeX math, This is contrary to how the prime ′ (U+2032) symbol is expected, as its glyph supposed to be in the appropriate size and raised above baseline. To work around this, OpenType math fonts usually will have a U+2032 glyph like any other font, and provide alternate glyphs in the |
@michal-h21 @alerque Yes the examples on polytype for primes are currently wrong, both for LaTeX and SILE.
And as noted by @khaledhosny, the engine is assumed to apply the ... Well theoretically, as not all existing math fonts seem to implement it, but some have other features that can do the trick. For the record, I've devoted a section to this topic in SILE and the Hydra of Maths. Showcase & Critical Assessment 2024, Part II §2.1 "Primes gone wild". Can the PR be possibly completed with the right syntax both for TeX and SILE? |
Which fonts does this? Any feature other than |
This is discussed in the above-mentioned booklet. IIRC, Asana uses salt |
From Unicode Charts for STIX Two Math Regular We could ask the contributors why they included this stylistic set. Er... Wait... 🤣 Gotcha! |
@Omikhleia what is the correct handling of primes in Sile? I've tried to modify the example in this way:
And from the rendering, it seems that the correct result is done using |
Same as TeX now -- Using SILE 0.15.9 (I am on
With STIX Two however see discussion above. Maybe try with temporarily set |
I am using
But I must admit that I don't know anything about Sile, so maybe I am doing something wrong. |
Far too old. There has been a huge number of fixes on the math engine between 0.15.6 and 0.15.8. This is also all explained in the above-mentioned booklet (TL;DR I suppose... EDIT: It's sad, 'cause I think its a fairly interesting reading, once one is accustomed to my bad sense of humor and my ramblings ;) ) @khaledhosny STIX Two Math (2.13 b171) support for ssty also seems broken with LibreOffice, unless I'm totally missing something (EDIT: So it's not a SILE-or-whatever-only issue, very likely. Advice is welcome on how to interpret the situation.) |
The STIX Two Math font has
Math layout engine are expected to set script to Asana Math does not have an In short, |
Actually it has |
Re
|
Well I guess we have to wait for SILE 0.15.10 for the fix to pass then... But to go back on tracks with the original discussion, the expectations are:
|
@Omikhleia I've updated the SILE example, is it correct now? |
@@ -15,13 +15,19 @@ | |||
\setmathfont{STIX Two Math} | |||
\[\mathlarger{\begin{aligned} | |||
f(x) & = a\prime + b\dprime + c\trprime \\ | |||
f\prime(x) & = x^{2} + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this one (lacking the ^
is removed, why do we keep the preceding line? Reading the original description of the test for all languages, I'd tend to guess it expected proper user input (so with a^\prime
etc. for the "long" variant, and a'
etc. for the short-hand variant), both following The TeXBook. Do we also want to show the output for an incorrect user input? If so, we need both lines, and to explain the issue...
f\prime(x) & = x^{2} + 1 | ||
f(x) & = a^{\prime} + b^{\dprime} + c^{\trprime} \\ | ||
f(x) & = a' + b'' + c''' \\ | ||
f\prime(x) & = x^{2} + 1\\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be this one a ^\prime
?
f(x) & = a^{\prime} + b^{\dprime} + c^{\trprime} \\ | ||
f(x) & = a' + b'' + c''' \\ | ||
f\prime(x) & = x^{2} + 1\\ | ||
f'(x) & = x^{2} + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remarks as for the STIX example.
You might want to show |
f(x) &= a\prime + b\dprime + c\trprime \\ | ||
f\prime(x) &= x^2 + 1 | ||
f(x) &= a^\prime + b^\dprime + c^\trprime \\ | ||
f^\prime(x) &= x^2 + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems correct to me, but for full parity with xelatex, we should also see the short-hand variant.
@@ -1,25 +1,21 @@ | |||
\begin[papersize=a7]{document} | |||
\nofolios | |||
\neverindent | |||
\font[family=Libertinus Serif,size=12pt] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep that line: Llet's have the non-math font as Libertinus Serif, I am not mistaken LaTeX's \usepackage{libertinus}
does both things in on package (picking Libertinus as main text font and Libertinus Math as math font). Bare SILE needs more lines here (setting the main text font, loading the math support and setting the math font and its size explicitly) for a similar ouyput.
\use[module=packages.math] | ||
\set[parameter=math.font.size,value=16] | ||
\set[parameter=math.font.family,value=Libertinus Math] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Erm. So we are no longer testing STIX Two Math? We ought, and the output won't be correct in 0.15.9 but will eventually be fixed. No need to remove the case.
f(x) &= a\prime + b\dprime + c\trprime \\ | ||
f\prime(x) &= x^2 + 1 | ||
f(x) &= a' + b'' + c''' \\ | ||
f'(x) &= x^2 + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, my misunderstanding in the previous comment, you split the shorthand version. Can we stick closer to the xelatex version?
I've annotated the PR (both for the TeX and SILE cases). But it will be hard for you to check the SILE case without a recent version. Hmm. Let's see how close we get, I'll try to jump in for another review. |
As we discussed on Mastodon, here is a change that uses the Siunitx package to typeset the geographic dimensions.