Fonts with latex interpreter and no interpreter look different
Show older comments
When I use the latex interpreter to make a title with, for example $\frac{1}{2}$, the font for the title looks different to the font for the axes tick labels. How can I make the axis tick labels and title have the same looking font? For example:
plot(1,1)
title('Title with latex character $\frac{1}{2}$',...
'interpreter','latex','FontName','Times New Roman')
set(gca,'FontName','Times New Roman')
This is a problem because now the title (that must be latex interpreted to get the $\frac{1}{2}$) looks different to the axes. As far as I'm aware, one cannot set the interpreter for the axes to be 'latex'.
Thanks, Mark
Accepted Answer
More Answers (2)
Oleg Komarov
on 23 Mar 2011
Des using Tex (default) help?
title('2 1.8 1.6 Title with latex character \pi')
ABRAHAM TRIGO MANZANO
on 18 Mar 2024
Hi there!
Try to write \rm after the first $$, followed by the rest of the text. I give you an example:
Ejey = '$$\rm\dot{m}$$/ kg s$$^{-1}$$';
ylabel(Ejey2,'Interpreter','latex')
I know it´s an old post, but there isn´t information about it, and that code worked for me.
I hope it helped!
Categories
Find more on Labels and Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!