# MathTeX font does not match pdfLaTeX font

**URL:** <https://discourse.julialang.org/t/mathtex-font-does-not-match-pdflatex-font/107670>\
**Category:** Visualization\
**Tags:** plotting, makie, glmakie, latexstrings\
**Created:** [December 15, 2023, 2:33pm UTC](https://discourse.julialang.org/t/mathtex-font-does-not-match-pdflatex-font/107670 "2023-12-15T14:33:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [December 16, 2023, 10:54am UTC](https://discourse.julialang.org/t/mathtex-font-does-not-match-pdflatex-font/107670/2 "2023-12-16T10:54:53Z")

</div>

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

Using MathTeXEngine.jl:

```julia-term
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.

 ![Screenshot 2023-12-16 at 10.30.40](https://global.discourse-cdn.com/julialang/original/3X/c/e/ce09723454d8eeae8a1c4df1d623ef2c0ad492c5.png)

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](https://global.discourse-cdn.com/julialang/original/3X/d/5/d5452364d5035976cb95add85452cbe9b2ed3488.png)

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. 🤷🏻‍♂️

 ![Screenshot 2023-12-16 at 10.44.58](https://global.discourse-cdn.com/julialang/original/3X/5/0/5054e78f8165b10eb06edc824a3d3a8e145dfe1b.png)

---

_[View the full topic](https://discourse.julialang.org/t/mathtex-font-does-not-match-pdflatex-font/107670)._
