Saturday, January 30, 2010

text as TeX or un-TeX

continuing the tradition of writing about stuff that i haven't really implemented in the past...

text properties

important: the default is to interpret strings as TEX instructions, and that is why the underscores in my titles always mess it up by creating subscripts. i need to set the text interpreter to none. then i need to be cool and start having some LaTeX equations in my other plots.

from the Text Properties page:

Interpreter
latex | {tex} | none

Interpret TEX instructions. This property controls whether MATLAB interprets certain characters in the String property as TEX instructions (default) or displays all characters literally. The options are:

latex — Supports a basic subset of the LATEX markup language.

tex — Supports a subset of plain TEX markup language. See the String property for a list of supported TEX instructions.

none — Displays literal characters.

Latex Interpreter

To enable the LaTEX interpreter for text objects, set the Interpreter property to latex. For example, the following statement displays an equation in a figure at the point [.5 .5], and enlarges the font to 16 points.

text('Interpreter','latex',...
'String','$$\int_0^x\!\int_y dF(u,v)$$',...
'Position',[.5 .5],...
'FontSize',16)



No comments:

Post a Comment