フィルターのクリア

Non-bold font in multiline title (LaTEX)

32 ビュー (過去 30 日間)
KAE
KAE 2020 年 10 月 27 日
編集済み: KAE 2020 年 10 月 30 日
I would like to have a multi-line title in which the first title line is bold, which is the default, but subsequent title lines are not bold. Here is what I tried. I think I am using the wrong LaTEX name for non-bold font. What should it be?
figure;
peaks; % Make example plot
title({'First Line', 'Second Line', 'Third Line'}); % Make multi-line title, all lines bolded
disp('All bold. Hit any key ')
pause;
title({'First Line', '\itSecond Line', 'Third Line'}); % Confirm the LaTEX format: make line 2-3 italic
disp('Italicize line 2-3. Hit any key ')
pause;
title({'First Line', '\textnormalSecond Line', 'Third Line'}); % First try to un-bold fails
disp('Throws an error. Hit any key ')
pause;
title({'First Line', '\normalfontSecond Line', 'Third Line'}); % Second try also fails
disp('Throws an error ')

採用された回答

Divija Aleti
Divija Aleti 2020 年 10 月 30 日
Hi,
I understand that you want to have a multi-line title with the first line bold and the remaining lines normal (non-bold). The following code will do that.
figure;
peaks;% Make example plot
title({'\bf First Line', '\rm Second Line', '\rm Third Line'});
For additional information, have a look at the following link:
  1 件のコメント
KAE
KAE 2020 年 10 月 30 日
編集済み: KAE 2020 年 10 月 30 日
This works! Many thanks. The Tex command \rm turns on roman (non-bold) font. And even this version works,
title({'First Line', '\rmSecond Line', '\rmThird Line'});

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by