How to add a title with mixed italic and normal text with Tex interpreter?

figure()
title({strcat("\it{Italic title part 1} ","and ","\it{Italic title part 2}"),""}, 'Interpreter', 'tex')
% Note that { ... ,""} is for having a new line after the title
Why "and" is in italics? how can I make it normal (not in italics and bold)?

 採用された回答

Stephen23
Stephen23 2025 年 5 月 12 日
編集済み: Stephen23 2025 年 5 月 12 日
There might be better ways, but this seems to work:
title("\it Italic title part 1 \rm\bf and \it Italic title part 2", 'Interpreter', 'tex')

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Graphics Object Properties についてさらに検索

製品

リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by