Weird LaTeX result of $\tilde{}$ in R2025b version.

39 ビュー (過去 30 日間)
尚宇 张
尚宇 张 2025 年 10 月 11 日 1:27
コメント済み: Sam Chak 2025 年 10 月 11 日 13:49
I run the following codes in the same PC with different versions of MATLAB.
And the rendering results of the LaTeX equation are different.
x = 1:0.1:10;
y = sin(x);
figure;
plot(x,y)
xlabel('$\tilde{x}$','Interpreter','latex')
ylabel('$\tilde{y}$','Interpreter','latex')
In MATLAB R2020b, I obtain the proper format of \tilde{}:
However, the format in R2025b is weird:
How can I obtain the proper result of \tilde (like in R2020b) in R2025b?
  1 件のコメント
Walter Roberson
Walter Roberson 2025 年 10 月 11 日 3:36
(Because I missed it initially:
The difference is that before the tilde over the x was smaller than the x and was centered over the x, but now the tilde is larger and is not centered over the x.)

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2025 年 10 月 11 日 1:55
That appears to be what the interpreter now defines as '\tilde'. I thought it might be defaulting to '\widetilde' , however that behaves as I would expect it to when I did that experiment.
x = 1:0.1:10;
y = sin(x);
figure;
plot(x,y)
xlabel('$\widetilde{x}$','Interpreter','latex')
ylabel('$\tilde{y}$','Interpreter','latex')
I suggest that you Contact Support, and perhaps the LaTeX authors.
.
  1 件のコメント
Sam Chak
Sam Chak 2025 年 10 月 11 日 13:49
I tested. Even \hat{x} or is now not centered over the x.
figure;
xlabel('$\hat{x}$', 'Interpreter', 'latex')

サインインしてコメントする。

その他の回答 (1 件)

Steve Eddins
Steve Eddins 2025 年 10 月 11 日 12:35
It looks like graphics LaTeX renderer has changed. It is now producing something that looks similar to what is shown in the MATLAB editor:
The tilde is centered, but in a different sense than before. It is centered over the entire horizontal extent of the character. It appears to be uncentered because of the slanted italic font. Previously it was centered over the top of the character. Compare with \tilde{\text{x}}:
I agree with Star Strider's recommendation to contact MathWorks support. It would be useful to let them know that you regard this particular math rendering as incorrect.

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

製品


リリース

R2025b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by