I assume you are using Mathematica 11.3. The resizing you observe is due to the new LabelingSize
feature.
The default is LabelingSize -> Automatic
, which limits the size of graphics and images (but not text) in labels. MaTeX output is always a Graphics
expression, thus it is resized by default. The workaround is LabelingSize -> Full
.
Plot[Callout[x, MaTeX["A=2", FontSize -> 32], Scaled[1/2]], {x, 1, 10}, LabelingSize -> Full]
You may not want to use this workaround when you also have actual images/graphics that you use as labels, and you want those to be auto-scaled, but not the MaTeX labels. An alternative workaround is to wrap the MaTeX output with Pane
(or similar) so that it won't be detected as Graphics
.
Plot[Callout[x, Pane@MaTeX["A=2", Magnification -> 3], Scaled[1/2]], {x, 1, 10}]
In versions earlier than 11.3, these workarounds are not needed, as no automatic label scaling is done. I will add a note about this potential problem to the MaTeX documentation. Thanks for the feedback!
A note on Magnification
vs FontSize
in MaTeX
:
These are demonstrated in the MaTeX symbol reference page, under Examples -> Options.
Using Magnification
won't for your problem.