MATLAB 中如何使希腊字符和常规文本在 Tex 标记中具有相同的字体粗细?
5 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2019 年 11 月 22 日
編集済み: MathWorks Support Team
2021 年 12 月 30 日
我用 text 函数来标记绘图上的点。其中混合了希腊字符和常规文本,但是希腊字符看起来比其他文本略浅。如何使所有字符看起来都具有相同的字体粗细?
採用された回答
MathWorks Support Team
2021 年 9 月 12 日
編集済み: MathWorks Support Team
2021 年 12 月 30 日
希腊字母以不同的字体样式显示,因此我们希望它们看起来略有不同。同时,我们提供以下几种使希腊字符和常规文本看起来更相似的方法:
1. 使用 LaTeX interpreter,从而,所有文字都通过 LaTeX 字体显示,参考:
https://www.mathworks.com/help/matlab/creating_plots/greek-letters-and-special-characters-in-graph-text.html#mw_f46705d3-cc38-4f7e-b947-992866f293cc
此时要将“需要解释为公式”的内容,用$$标注
2. 将 text 函数分两次执行,首先将希腊字符显示为粗体,然后将其他文字显示为非粗体:
>> text( 0.5, 0.5, '\bf\alpha');
>> text( 0.55, 0.5, ' name');
3. 另一个方法是更改常规文本的字体样式,您可以使用“ \fontname{}”来修饰
>> text( 0.55, 0.5, '\fontname{Times New Roman} name');
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!