Different Colors On Single Line With LaTeX Interpreter

조회 수: 55 (최근 30일)
Ephraim Bryski
Ephraim Bryski 2020년 7월 21일
댓글: madhan ravi 2020년 7월 21일
Hi. I'm using the text function with the LaTeX interpreter and I want to use different colors on a single line. As far as I can tell this isn't possible. However, I was wondering if there was either some way to do it which I couldn't find or some workaround (right now my workaround is just using multiple text functions for a single line and manually adjusting the position but it's pretty clunky). (I also know it can be done with TeX interpreter but since it can't do things like create fractions and the style is kind of ugly for equations I wouldn't want to use it). Thanks!

채택된 답변

madhan ravi
madhan ravi 2020년 7월 21일
text(.1,.1,'^{{\color{red}Red}}/_{{\color{blue}Blue}}{\color{green}Green}')
  댓글 수: 4
Ephraim Bryski
Ephraim Bryski 2020년 7월 21일
편집: Ephraim Bryski 2020년 7월 21일
For an example, with LaTeX I would write FN=MQ/I as:
text(ax,0,.8,'$F_N=\frac{M}{I}Q$','interpreter','latex','Color','blue')
Without LaTeX, I know I could use slashes for division for example, but this could get messy, especially with a bunch of different equations.
madhan ravi
madhan ravi 2020년 7월 21일
So I SUPPOSE your way is the only way.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 LaTeX에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by