Borrar filtros
Borrar filtros

How to implement new Latex Font in matlab?

31 visualizaciones (últimos 30 días)
Amelie
Amelie el 19 de Mzo. de 2024
Comentada: Amelie el 23 de Mzo. de 2024
Dear all,
although this question has been asked in previous forum posts, I have to ask again because I still have problems in implementing a new Latex Font in matlab. I would like to use the font "Gyre Pagella" (font package name: tgpagella; font code: qpl) for the labels of my figures. After I downloaded the font and adjusted folders, matlab still doesn't report Gyre Pagella with the command listfonts.
Does anyone has an idea what I have to do to be able to use this font ?
Many thanks for your help !

Respuesta aceptada

Angelo Yeo
Angelo Yeo el 20 de Mzo. de 2024
I don't think MATLAB checks text object's FontName properties. I can only find that MATLAB supports Sans Serif and Roman fonts though.
text(0.5, 0.8, '\textsf{sans serif}','interpreter','latex');
text(0.5, 0.7, '\textrm{roman}','interpreter','latex');
text(0.5, 0.6, '$$\mathsf{math\,\,mode\,\,sans\,\,serif}$$','interpreter','latex');
text(0.5, 0.5, '$$\mathrm{math\,\,mode\,\,roman}$$','interpreter','latex');
You can reach out to Technical Support to request an enhancement on FontName check for LaTeX.

Más respuestas (1)

Walter Roberson
Walter Roberson el 20 de Mzo. de 2024
There is no way (documented) to add latex fonts to most of MATLAB. There used to be an obscure way it could be done, but that way disappeared a number of years ago.
If I understand correctly, it is possible to add latex fonts for Report Generator use.

Categorías

Más información sobre Printing and Saving 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!

Translated by