Fonts with latex interpreter and no interpreter look different
이전 댓글 표시
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
채택된 답변
추가 답변 (2개)
Oleg Komarov
2011년 3월 23일
Des using Tex (default) help?
title('2 1.8 1.6 Title with latex character \pi')
ABRAHAM TRIGO MANZANO
2024년 3월 18일
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!
카테고리
도움말 센터 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!