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

29 次查看(过去 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
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 CenterFile Exchange 中查找有关 Labels and Annotations 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by