フィルターのクリア

How to implement new Latex Font in matlab?

31 ビュー (過去 30 日間)
Amelie
Amelie 2024 年 3 月 19 日
コメント済み: Amelie 2024 年 3 月 23 日
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 !

採用された回答

Angelo Yeo
Angelo Yeo 2024 年 3 月 20 日
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.
  1 件のコメント
Amelie
Amelie 2024 年 3 月 23 日
Many thanks for your help!

サインインしてコメントする。

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2024 年 3 月 20 日
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.

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by