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)?

 Respuesta aceptada

Stephen23
Stephen23 el 12 de Mayo de 2025
Editada: Stephen23 el 12 de Mayo de 2025
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')

Más respuestas (0)

Categorías

Más información sobre Graphics Object Properties en Centro de ayuda y File Exchange.

Productos

Versión

R2024b

Preguntada:

el 12 de Mayo de 2025

Comentada:

el 12 de Mayo de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by