Set title in two lines with different font sizes with interpreter latex
조회 수: 6 (최근 30일)
이전 댓글 표시
It is possible to set title in two lines with different font sizes with interpreter latex?
i found an answer how to do that BUT with interpreter tex. for example:
title(['\fontsize{20} Thermometer output signal' char(10) ...
'\fontsize{10} Look small' char(10) ...
'\fontsize{20} Mixed_{\fontsize{8} underscore}'],'interpreter','tex');
this is mine without different font sizes:
TT=title({'$Thermometer\quad output\quad signal$','$EXP02$'},'FontWeight','bold',...
'Interpreter','latex');
thanks
댓글 수: 0
채택된 답변
Jan
2019년 1월 30일
편집: Jan
2019년 1월 30일
title(['\fontsize{12}{0}\selectfont$Large$', char(10), ...
'\fontsize{8}{0}\selectfont$small$'], ...
'interpreter','latex');
댓글 수: 5
jose herrero
2022년 5월 9일
very useful Jan, thanks! For me (2019b) it works better using num2str.
Using 'sprintf', it adds some extra characters (e.g, 'Font').
Quick questions: is it also possible to have all in 1 single line (instead of 2) but with different fonts? where do you select the font type in your function?
Str=10;Vtr=20;Btr=30;
charnow = ['Trials (aS=' num2str(Str) ',aV=' num2str(Vtr) ',aB=' num2str(Btr) ')'];
title(['\fontsize{12}{0}\selectfont$ITPC @ Visfreq$', char(10), ...
'\fontsize{8}{0}\selectfont$', charnow, '$'], ...
'interpreter','latex');
Jan
2022년 5월 10일
@jose herrero: Simply try it. Omit the char(10) and all appears in 1 line. Omit other parts as "\selectfont$small$" and see, what happens. You cannot damage anything so feel free to experiment.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!