Accented characters with interpreter latex

39 ビュー (過去 30 日間)
Dan
Dan 2020 年 12 月 13 日
コメント済み: Walter Roberson 2020 年 12 月 13 日
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')

採用された回答

Walter Roberson
Walter Roberson 2020 年 12 月 13 日
  2 件のコメント
Dan
Dan 2020 年 12 月 13 日
編集済み: Dan 2020 年 12 月 13 日
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 2020 年 12 月 13 日
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')

サインインしてコメントする。

その他の回答 (1 件)

Alan Stevens
Alan Stevens 2020 年 12 月 13 日
Just use
title('Intensità')
That works!
  1 件のコメント
Dan
Dan 2020 年 12 月 13 日
I know, but I must to export my graph for my report in Latex, as usual. So I need interpreter option.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by