How do I make Greek characters and regular text have same font weight in Tex markup?

22 ビュー (過去 30 日間)
I am using "text" to label points on a plot. The label has a mix of Greek characters and regular text, but the Greek characters appear slightly lighter than the other text. How do I make all of the label appear to have the same font weight?

採用された回答

MathWorks Support Team
MathWorks Support Team 2019 年 11 月 18 日
Greek letters are displayed in a different font style, so we expect them to appear slightly different. However, here are several possible approaches to make the Greek characters and regular text appear more similar:
1) Use the LaTeX interpreter so that all items are displayed using the LaTeX font style:
This requires wrapping what must be interpreted as a formula into $$:
text( 0.5, 0.5, {'$\alpha$','name'}, 'Interpreter', 'latex' ) ;
2) Split up your call to "text", first displaying the Greek character as bold, then displaying the regular text as not bold. For example,
text( 0.5, 0.5, '\bf\alpha');
text( 0.5, 0.5, ' name');
The two pieces of text should now be more similar in font weight.
3) Another option to consider is changing the font style of the regular text such that it is more similar in weight to the Greek characters. You can do this by using the "\fontname{}" modifier

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by