Skip to content
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

When converting from Typst, primes are handled incorrectly #10411

Open
John-Toohey opened this issue Nov 24, 2024 · 1 comment
Open

When converting from Typst, primes are handled incorrectly #10411

John-Toohey opened this issue Nov 24, 2024 · 1 comment
Labels

Comments

@John-Toohey
Copy link

Consider the following Typst file:

$ f'(x) = x^2 $

Which renders as:
image

When run through pandoc pandoc a.typ -o a.md the following output is generated:

$$f\prime(x) = x^{2}$$

Which, when converted to PDF via pdflatex, looks like this --- with an incredibly chunky prime sign:

image

This is incorrect. Rather the markdown should be (notice the superscript):

$$f^{\prime}(x) = x^{2}$$

Pandoc version?
pandoc 3.1.11.1 running on NixOS unstable. Also tested on https://pandoc.org/try/

@alerque
Copy link
Contributor

alerque commented Nov 25, 2024

As I understand it, this expectation is not correct. You should not need to manually superscript the \prime in LaTeX. This is a function of the font not fully supporting the expected layout features.

Another iteration of this problem can be seen with layout engines (including Typst) that try to over-compensate and move something that the font has already made into a superscript manually smaller and in a higher position resulting in a doubly small and high superscirpt. I believe this has been at least partially addressed in the latest Typst devel version, but the last stable release still shows this problem, e.g. with Libertinus Math. You can see the effect here:

https://polytype.dev/prime-symbol/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants