I like to use MaTeX to produce publication quality figures. It makes the right font at the right size.

However, since upgrading to MMA 12.3.1, it does not export to pdf with export quality. What causes this problem? How to fix it?

Here is a minimum working example:

SetOptions[MaTeX, "Preamble" -> {"\\usepackage{amsmath,amssymb}", "\\usepackage[T1]{fontenc}", "\\usepackage{mathptmx}"}]; 
test = MaTeX["\\text{If you see an } x^2 \\text{, and the font is times, then MaTeX is working works!}"]
Export[StringJoin[NotebookDirectory[], "\\", FileBaseName@NotebookFileName[], " test.pdf"], test];

This generates a pdf file.

Here is what it looks like when generated with 12.3.1:

enter image description here

Here is what it looks like when made with 11.3.0:

enter image description here

Further info:

I have this on two computers.

New computer:

"12.3.1 for Microsoft Windows (64-bit) (June 24, 2021)"

{"pdfLaTeX" -> "C:\Users\XXXX\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe", "CacheSize" -> 100, "WorkingDirectory" -> Automatic, "Ghostscript" -> "C:\Program Files\gs\gs9.50\bin\gswin64c.exe"}

Old Computer:

"11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)"

{"pdfLaTeX" -> "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe", "Ghostscript" -> "C:\Program Files\gs\gs9.52\bin\gswin64c.exe", "CacheSize" -> 100, "WorkingDirectory" -> Automatic}

  • 2
    $\begingroup$ Update MaTeX to the latest version. $\endgroup$
    – Szabolcs
    Sep 9 at 19:55
  • $\begingroup$ @Szabolcs can you, please, clarify if there is a way to have MaTeX check to see if it is the most up-to-date version upon loading the package? $\endgroup$ Sep 9 at 20:32
  • $\begingroup$ @Szabolcs Thanks! $\endgroup$
    – axsvl77
    Sep 9 at 23:56
  • 1
    $\begingroup$ @CATrevillian There is no automatic update checker. You can check the installed MaTeX version either using PacletObject["MaTeX"] (in new Mma versions) or using MaTeX`Information`$Version after loading MaTeX. Then you can go to the MaTeX website and see if that's the latest version. I am not in favour of implementing an update check for the same reason as I'm not in favour of implementing auto-installers: this is not the package's responsibility. If every package implemented this, many of them would get it wrong (as we already see with installers). $\endgroup$
    – Szabolcs
    Sep 10 at 16:01
  • 1
    $\begingroup$ So how do you know when to check for updates manually? Currently, MaTeX is mostly in maintenance mode, so there aren't any interesting feature updates (this may change in the future though). However, whenever you have problems with some software, or you find a bug, the first thing to do is make sure that you are using the latest version. I updated MaTeX for compatibility already during the 12.2 prerelease period, and will continue making compatibility updates well in time. $\endgroup$
    – Szabolcs
    Sep 10 at 16:04