How do I fix broken LaTeX commands where it fails to render '\pm' in MATLAB 7.14 (R2012a)?
5 次查看(过去 30 天)
显示 更早的评论
I am unable to execute latex command properly in MATLAB 7.14 (R2012a).
An example of LaTeX code is as follows:
figure; axis;
title('This is a \pm ± test')
LaTeX command '\pm' fails to render.
采纳的回答
MathWorks Support Team
2013-1-3
This issue can be resolved by setting interpreter to TeX.
To find the interpreter settings, execute the GET command as shown in example below:
h = title('This is a \pm ± test');
get(h,'interpreter')
The ouput should show 'latex', 'tex' or none. The output of above command should be ‘tex’ to render properly. If not, use the SET command to change interpreter setting to TeX as shown in example below:
set(h,’interpreter’,’tex’)
Note that the output of LaTeX command '\pm' under MacOS environment with UTF-8 setting does not render properly.
As a workaround, execute following code:
pm = char (177);
figure;axes;
h = title (['This is a ' pm ' ± test');
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!