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

조회 수: 15 (최근 30일)
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개)

카테고리

Help CenterFile Exchange에서 Title에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by