How do I make Greek characters and regular text have same font weight in Tex markup?
28 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 18 de Nov. de 2019
Respondida: MathWorks Support Team
el 18 de Nov. de 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?
Respuesta aceptada
MathWorks Support Team
el 18 de Nov. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Labels and Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!