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 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