Accented characters with interpreter latex

42 visualizaciones (últimos 30 días)
Dan
Dan el 13 de Dic. de 2020
Comentada: Walter Roberson el 13 de Dic. de 2020
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')

Respuesta aceptada

Walter Roberson
Walter Roberson el 13 de Dic. de 2020
  2 comentarios
Dan
Dan el 13 de Dic. de 2020
Editada: Dan el 13 de Dic. de 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.
Walter Roberson
Walter Roberson el 13 de Dic. de 2020
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')

Iniciar sesión para comentar.

Más respuestas (1)

Alan Stevens
Alan Stevens el 13 de Dic. de 2020
Just use
title('Intensità')
That works!
  1 comentario
Dan
Dan el 13 de Dic. de 2020
I know, but I must to export my graph for my report in Latex, as usual. So I need interpreter option.

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by