entering a space that survives the latex interpreter

45 ビュー (過去 30 日間)
Leo Simon
Leo Simon 2020 年 8 月 16 日
回答済み: Star Strider 2020 年 8 月 16 日
I'm trying to include blank spaces in the title to a plot. When I run the title string through the latex intepreter, it kills the spaces. Example below illustrates
Is there a way to prevent this? Thanks very much, Leo
plot(1:10)
Title='$\theta$ .';
title(Title,'Interpreter','latex')

採用された回答

Star Strider
Star Strider 2020 年 8 月 16 日
Try this:
plot(1:10)
Title=sprintf('$\\theta%s.$', repmat('\ ',1,37));
title(Title,'Interpreter','latex')
It may not be the most efficient option, however it appears to do what you want.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLaTeX についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by