Insert "epsilon dot" in a figure title with tex interpreter (not latex)
13 views (last 30 days)
Show older comments
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 Comments
Answers (1)
dpb
on 30 Sep 2021
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.
See Also
Categories
Find more on Graphics Object Properties 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!