我想知道MATLAB绘图文本的LaTeX解释器如何处理Unicode字符?它的表现非常不一致,这使得Unicode的整个存在意义都被否定了。
玩具代码
玩具代码
%*** Setup some text for a plot title
Title_Txt{1} = [char(8734) ,' SNR~~~' , char(10) , '(-)'];
Title_Txt{2} = ['50 SNR~~~' , char(10) , '(-)'];
%*** Plots!
x= 1:1:10
y= rand(size(x))
figure(1)
subplot(211)
plot(x,y)
title(Title_Txt{1} , 'interpreter' , 'latex')
subplot(212)
plot(x,y)
title(Title_Txt{2} , 'interpreter' , 'latex')
Toy code演示了latex解释器如何处理char(10)——一个新行。但它会在char(8734)——无穷大符号处中断。
显然,我可以通过输入matlab知道的latex符号来解决这个问题(另一个令人沮丧的来源,但那是另一个讨论),但我很好奇:
- Matlab在这里到底做了什么?
- 有没有办法将Unicode插入到latex中?