Accented characters with interpreter latex

Hi, I am trying to insert an accented letter in the title with 'interpreter latex' option, but I obtain this warning: 'String scalar or character vector must have valid interpreter syntax'. How can I fix it?
title('Intensità','Interpreter','latex')

 Réponse acceptée

title('Intensit\`a','Interpreter','latex')

2 commentaires

Dan
Dan le 13 Déc 2020
Modifié(e) : Dan le 13 Déc 2020
Thank you very much!
In LaTex I use \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} so I put accented letters in automatic way and I didn't know how to display the right accent with the 'original' way. This symbol (`) is not very common for me.
Be careful on entering the opposite accent such as -- as it is the usual apostrophe, it ends character vectors and you have to double it. Or you can use " " delimiters
title('Intens\''it\`a','Interpreter','latex')

Connectez-vous pour commenter.

Plus de réponses (1)

Alan Stevens
Alan Stevens le 13 Déc 2020
Just use
title('Intensità')
That works!

1 commentaire

Dan
Dan le 13 Déc 2020
I know, but I must to export my graph for my report in Latex, as usual. So I need interpreter option.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange

Produits

Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by