Accented characters with interpreter latex

39 views (last 30 days)
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')

Accepted Answer

Walter Roberson
Walter Roberson on 13 Dec 2020
  2 Comments
Dan
Dan on 13 Dec 2020
Edited: Dan on 13 Dec 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 on 13 Dec 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')

Sign in to comment.

More Answers (1)

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

Sign in to comment.

Categories

Find more on Characters and Strings in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!