我正在尝试向 MATLAB 中的图形添加 LaTeX 注释,但我遇到了一些问题。如果我跑
figure
annotation('textarrow', [0.3, 0.6], [0.3, 0.6], 'String', '$$\tau_{\mathrm{abc}}$$', 'interp', 'latex')
我希望箭头带有正确的注释。这确实是我得到的,但我也收到以下警告消息:
Warning: Unable to interpret TeX string "$$\tau_{\mathrm{abc}}$$"
> In scribe.textarrow.createTextArrow>localChangePosition at 409
In scribe.textarrow.schema>localSetToText at 357
In scribe.textarrow.createTextArrow at 152
In scribe.textarrow.textarrow at 11
In annotation at 149
Warning: incomplete command in TeX text string:
'$$\tau_{\mathrm{abc}}$$'
> In scribe.textarrow.createTextArrow>localChangePosition at 409
In scribe.textarrow.schema>localSetToText at 357
In scribe.textarrow.createTextArrow at 152
In scribe.textarrow.textarrow at 11
In annotation at 149
那么,我的问题是,为什么我会收到这些警告,我该如何纠正潜在的问题?
最佳答案
您需要做的就是在字符串前指定解释器。 这行得通
annotation('textarrow', [0.3, 0.6], [0.3, 0.6], 'interpreter', 'latex', 'String', '$$\tau_{\mathrm{abc}}$$')
而且您还需要长名称解释器而不是其缩写。
关于matlab - MATLAB 中的 LaTeX 注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22410070/