Using AMS in figure anotation with LaTeX interpreter

5 views (last 30 days)
I've been searching for some time to simplify a figure legend and for this I need to make Matlab interpret LaTeX AMS formulas.
In LaTeX, the commands "\textcolor{red}{$ \blacksquare$}" or $\triangledown$ are displayed but Matlax don't understand them, even when the interpreter is set to latex.
An example code is : figure annotation('textbox',[0.2 0.2 0.4 0.4],... 'Interpreter','latex',... 'String',{'Case 1: \textcolor{blue}{$\blacksquare$} meas 1',' \textcolo{red}{$\blacklozenge$} meas 2','Case 2: $\square$ meas 1',' $\triangledown$ meas 2'});
The \textcolor can probably be replaced by setting by hand the colour but the AMS commands ($\blacksquare$) aren't understood by Matlab anyway.
Which command should I be using so that Matlab interpret AMS formulas?
Thank you,
Michael

Accepted Answer

Daniel Shub
Daniel Shub on 17 Jul 2012
It cannot be done. The MATLAB LaTeX interpreter is not a full fledged LaTeX distribution. As you haven't, and cannot, load the ams* packages, you cannot use the functionality. If you are including the output in LaTeX, you could use something like LaPrint.

More Answers (1)

Michael
Michael on 20 Jul 2012
Well thanks, that settles it.
I'll try using LaPrint even if paper submission requires the figure in eps and the ones from LaPrint have no text...
Anyway, now I know that Matlab can't handle this directly.

Categories

Find more on Printing and Saving in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!