MathTeX font does not match pdfLaTeX font

I think your best bet is to change the LaTeX version. Some thoughts that suggest this solution:

Using MathTeXEngine.jl:

julia-1.10> generate_tex_elements(L"\mathcal{J}")
1-element Vector{Any}:
 (TeXChar '𝓙' [index 2819 in NewComputerModern Math - Regular], 
   [0.0, 0.0], 1.0)

(Ignore the terminal font… :))

I understand that MathTeXEngine.jl always uses the NewComputerModern(Math) fonts, and here uses the Unicode glyph U+1d4a5, “MATHEMATICAL SCRIPT CAPITAL J”. The index 2819 here is simply saying that the Unicode glyph U+1d4a5 occurs at index 2819 in the font file.

However, the pdfLaTeX example you show looks to be using the letter J from the ComputerModernSymbol font:

Screenshot 2023-12-16 at 10.19.02

and there doesn’t look like there’s any Unicode going on here.

The last time I used LaTeX I used LuaLaTeX, which someone said was the newer replacement for pdfLaTex…

Presumably LaTeX allows you more flexibility in selecting and using fonts… There’s a few fonts with Unicode Script Js - although to me they often look more like other letters rather than J. Your best choice looks like Cambria Math. :man_shrugging:t2:

2 Likes