How to set TImes New Roman in matlab title by latex

41 ビュー (過去 30 日間)
Yui
Yui 2018 年 10 月 16 日
回答済み: dino celli 2021 年 4 月 18 日
I want to change this font to times new roman but it doesn't work.
Even set(gca, 'fontname','times new roman') doesn't work either.
title(' $ \sqrt{\textit{\textbf{b}}^2+\textit{\textbf{c}}^2}$','interpreter','latex','fontsize',10,'fontname','Times New Roman')
The other way I tried is
title('\surd{\itb}^{2}+{\itc}^{2}','fontsize',10,'fontname','Times New Roman')
Although it could be Times New Roman font, what I want is sqrt symbol. (It can't work if just type \sqrt without latex)
Thank you very much!

回答 (1 件)

dino celli
dino celli 2021 年 4 月 18 日
You could try, for all labels to control font and size
ft = 'Times';
fsz = 10;
%%%%%%%%%%%%%%%
Your Figure
%%%%%%%%%%%%%%%
set(findall(gcf,'type','text'), 'FontSize', fsz, 'Color', 'k','FontName', ft)
set(gca,'FontSize', fsz, 'FontName', ft)

カテゴリ

Help Center および File ExchangeTitle についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by