Insert "epsilon dot" in a figure title with tex interpreter (not latex)
조회 수: 17 (최근 30일)
이전 댓글 표시
Hi, is it possible to insert "epsilon dot" in the title of a figure and keep the Helvetica bold font?
Alt 1: This produces the text correctly, but not helvetica+bold
figure
title(['Stress vs. Strain @ $\dot{\varepsilon}$ ',num2str(erat),'$s^{-1}$'], 'Interpreter','latex')
Result:
Alt 2: This does not interpreat the text as I want it (but I get the wanted font :) )
figure
title(['Stress vs. Strain @ $\dot{\varepsilon}$ ',num2str(erat),'$s^{-1}$'], 'Interpreter','tex')
Result:
댓글 수: 0
답변 (1개)
dpb
2021년 9월 30일
No; the MATLAB implementation of TeX uses the defined special characters and the limited modifiers of ^ and _ for super/subscript; it doesn't implement the LaTeX {} notation to allow the modifier to be applied to a selection.
title(['Stress vs. Strain @ \epsilon ',num2str(erat),'s^{-1}'], 'Interpreter','tex')
is as close as it gets, sorry.
As for LaTeX, there's been angst over its use with font packages for 20 years that afaik has never been able to have been resolved; I've given it up as lost cause not knowing much at all about LaTeX, anyways.
You can get a bold font with text as
title(['$ \textbf{Stress vs. Strain}$' ], 'Interpreter','latex')
but I don't know how to or if you can get the math stuff to be interpreted at the same time...good luck, you'll undoubtedly need it and a lot of delving.
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!