# Recursion in math-mode \text [closed]

Why does this:

$\text{a^b}$


produce this:

Tested here, but my copy of MiKTeX 2.9 (pdflatex) fails with an error.

## closed as off-topic by Ian Thompson, yo', Peter Jansson, Werner, egregNov 28 '13 at 21:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Ian Thompson, yo', Peter Jansson, Werner, egreg
If this question can be reworded to fit the rules in the help center, please edit the question.

• This shouldn't work at all, since you cannot use math in text. – Johannes_B Nov 28 '13 at 20:33
• I think this is off-topic. The only possible answer is that the site you linked to doesn't work properly; you could ask the site owners why this is. – Ian Thompson Nov 28 '13 at 20:34
• sounds like an aftermath of some underlying \mathchoice – user4686 Nov 28 '13 at 20:46
• Since the service provides a web interface that produces images of code snippets - even when it contains errors - there must be some magic that happens in the back. For example \hello$a_{\world b} produced $a_b$ without error. – Werner Nov 28 '13 at 20:58 ## 1 Answer I only get a blank page, after trying with TeX Live 2010, 2011, 2012 and 2013. I'm not saying that I don't trust you, but that I can't reproduce the behavior. What I do get is a long series of error messages (forty-one, to be precise), which are obvious, because LaTeX expects text mode material in the argument of \text. You get an error with \mbox{a^b}  because of the same reason. What the site does under the hood is not known; but the four object aren't too much of a surprise, because \text does typeset four boxes, then printing only one. The site is trying hard to get some output; for instance, a single backslash outputs$.

• I can see it with TL2013, Linux and Firefox – user2478 Nov 28 '13 at 20:50