latex interpreter - different fonts
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I plot a figure, where the xlabel uses latex interpreter.
e. g.: xlabel('$\frac{1}{pi}dy$','Interpreter','latex','FontName','Times')
Unfortunately the font is not Times in the figure, however, when I do not use latex-interpreter, the FontName option works fine.
Does anybody know how to solve the problem: use the latex interprete and get the Time font in the figure?
Best Regards and thanks in advance for the help
Waldemar
3 Kommentare
Daniel Shub
am 27 Jun. 2011
Interesting, I can reproduce it on both 32-bit Windows (r2010a) and 64-bit Linux (r2010b). When the `interpreter` is `tex` or `none` changing the `fontname` has an effect. When the interpreter is `latex`, changing the `fontname` has no effect. I tried it with both an equation and plain text.
Antworten (1)
Patrick Kalita
am 27 Jun. 2011
What you're describing is basically the expected behavior. When you set the Interpreter property to 'latex', MATLAB will hand off the string (e.g. '$\frac{1}{pi}dy$') directly to the LaTeX system, and LaTeX decides what fonts get used. The FontName property gets ignored.
It may be possible to install some kind of custom font alongside the regular LaTeX fonts (they're in %MATLABROOT/sys/fonts/ttf/cm), and then use some kind of LaTeX markup in your string that tells it to switch fonts. I've never done it, and I don't guarantee that would work, but if you're really desperate to make it work you might give it a try.
0 Kommentare
Siehe auch
Kategorien
Mehr zu LaTeX finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!