- Don't use latex, since it doesn't seem like you use any latex-specific features, except the large braces
- Piece it together using text
- Shorten your string, e.g. by substituting \mathrm{a19} with a_{19}
Latex Title in figure
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi, I have a very long Latex equation where I've broken it up to 5 lines:
Tstr{1} = '$ \mathrm{a0}+\mathrm{a1}\, \left(x - \mathrm{x0}\right)+\mathrm{a2}\, \left(y - \mathrm{y0}\right)+\mathrm{a3}\, \left(z - \mathrm{z0}\right)+$';
Tstr{2}= '$\mathrm{a4}\, {\left(x - \mathrm{x0}\right)}^2+\mathrm{a5}\, \left(x - \mathrm{x0}\right)\, \left(y - \mathrm{y0}\right)+\mathrm{a6}\, {\left(y - \mathrm{y0}\right)}^2+\mathrm{a7}\, \left(x - \mathrm{x0}\right)\, \left(z - \mathrm{z0}\right)+$'
Tstr{3} = '$\mathrm{a8}\, \left(y - \mathrm{y0}\right)\, \left(z - \mathrm{z0}\right)+\mathrm{a9}\, {\left(z - \mathrm{z0}\right)}^2+\mathrm{a10}\, {\left(x - \mathrm{x0}\right)}^3+\mathrm{a11}\, {\left(x - \mathrm{x0}\right)}^2\, \left(y - \mathrm{y0}\right)+$'
Tstr{4} = '$\mathrm{a12}\, \left(x - \mathrm{x0}\right)\, {\left(y - \mathrm{y0}\right)}^2+\mathrm{a13}\, {\left(y - \mathrm{y0}\right)}^3+\mathrm{a14}\, {\left(x - \mathrm{x0}\right)}^2\, \left(z - \mathrm{z0}\right)+\mathrm{a15}\, \left(x - \mathrm{x0}\right)\, \left(y - \mathrm{y0}\right)\, \left(z - \mathrm{z0}\right)+$'
Tstr{5} = '$\mathrm{a16}\, {\left(y - \mathrm{y0}\right)}^2\, \left(z - \mathrm{z0}\right)+\mathrm{a17}\, \left(x - \mathrm{x0}\right)\, {\left(z - \mathrm{z0}\right)}^2+\mathrm{a18}\, \left(y - \mathrm{y0}\right)\, {\left(z - \mathrm{z0}\right)}^2+\mathrm{a19}\, {\left(z - \mathrm{z0}\right)}^3$'
figure
h = title(Tstr,'interpreter','latex','fontsize',10);
Setting the title to Tstr give me an error: Warning: Unable to interpret LaTeX string.
However, setting the title to each cell of Tstr doesn't give me an error, nor if I limit the title to only 4 lines : Tstr(1:4) or Tstr(2:5).
Is there another way to get around this? I've tried using a simple title to see if there was a limit on lines allowed in the title but the below worked just fine:
title({'1';'2';'3';'4';'5'},'fontsize',10);
Please help! Thanks, Patricia
댓글 수: 0
채택된 답변
Jonathan Epperl
2012년 10월 22일
편집: Jonathan Epperl
2012년 10월 22일
Note: The maximum size of the string that you can use with the LaTeX interpreter is 1200 characters. For multiline strings, reduce this amount by about 10 characters per line.
So the only options I see for you are
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!