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

 Risposta accettata

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

2 Commenti

Dan
Dan il 13 Dic 2020
Modificato: Dan il 13 Dic 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')

Accedi per commentare.

Più risposte (1)

Just use
title('Intensità')
That works!

1 Commento

I know, but I must to export my graph for my report in Latex, as usual. So I need interpreter option.

Accedi per commentare.

Categorie

Prodotti

Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by