How do I make Greek characters and regular text have same font weight in Tex markup?
28 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 18 Nov 2019
Risposto: MathWorks Support Team
il 18 Nov 2019
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?
Risposta accettata
MathWorks Support Team
il 18 Nov 2019
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Labels and Annotations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!