We already have \ensuremath to make sure the argument get enclosed in math mode. Is it worth defining \ensuretext ?
Tell me more
×
TeX - LaTeX Stack Exchange is a question and answer site for
users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
|
I think Quoted from document of
|
|||
|
|
|
AFAIK there is no BTW there is the |
||||
|
|
\def\ensuretext#1{\ensuremath{$#1$}}– Seamus May 28 '11 at 17:55\ensuremathmust not enclose a pair of$s. – xport May 28 '11 at 17:56\ensuremath{\)#1\(}work? – Seamus May 28 '11 at 17:59$x^2\)which compiles fine... (Though it breaks emacs syntax highlighting...) – Seamus May 28 '11 at 18:02