我正在尝试向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}}$$')
而且,您还需要长名称解释器而不是其缩写。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句