# Error using \limits

My minimal TeX file

    \documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{align}\label{eq:time_marginal_condition}
x \left\| x \right\|\limits_{L^{2}(\mathbb{R})}^{2}
\end{align}
\end{document}


I get the warnings

./test.tex:8: Limit controls must follow a math operator.
<argument> ...tion} x \left \| x \right \|\limits
_{L^{2}(\mathbb {R})}^{2}
l.8          \end{align}

./test.tex:8: Undefined control sequence.
<argument> ... x \right \|\limits _{L^{2}(\mathbb
{R})}^{2}
l.8          \end{align}

./test.tex:8: Limit controls must follow a math operator.
<argument> ...tion} x \left \| x \right \|\limits
_{L^{2}(\mathbb {R})}^{2}
l.8          \end{align}

./test.tex:8: Undefined control sequence.
<argument> ... x \right \|\limits _{L^{2}(\mathbb
{R})}^{2}
l.8          \end{align}


How can you get rid of such warnings in the align environment?

My unsuccessful attempt

\begin{align}\label{eq:time_marginal_condition}
x \left\| x \right\|
\limits_{L^{2}( \texorpdfstring{\mathbb{R}}{} )}^{2}
\end{align}

• Please make your code compilable, starting with \documentclass{...} and ending with \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to help you. Help them help you: remove that one hurdle between you and a solution to your problem. Dec 5 '13 at 15:28
• You simply forgot to add \newcommand{\Int}{\int\limits} as it was in the answer at your previous question. BTW: they are errors, not warnings... Dec 5 '13 at 15:37
• @Masi karkoeller's comment was correct before your edit. Writing "not true" is dishonest... Dec 5 '13 at 15:47
• You are all right. My example was very bad, and I was wrong. I made now a minimal example of the problem which I did not see initially so clearly when I removed the relevant part in the TeX code. Dec 5 '13 at 16:06
• The example does not generate warnings but errors, it isn't clear why you think it is at all related to align. ! Limit controls must follow a math operator. is a remarkably clear error message from TeX \|\limits is a syntax error, you avoid the error by not doing that. Dec 5 '13 at 16:08

Never use align for a single equation. But it's not the cause for your problems. One is that you don't load amssymb, so \mathbb isn't defined. The second is that \limits doesn't make sense.

\documentclass{article}
\usepackage{amsmath,amssymb}

\begin{document}
$$\label{eq:time_marginal_condition} x \lVert x \rVert_{L^{2}(\mathbb{R})}^{2}$$
\end{document}


Note that you shouldn't be using \left\| and \right\| unless you need the delimiter to grow.

The \limits keyword can be used after math operator such as \sum or \int, but makes no sense after \rVert or \right\|.

• actually, \mathbb is defined in amsfonts (which is loaded by amssymb). but that's not as important now that computers aren't tiny any more. Dec 5 '13 at 17:50
• @barbarabeeton Whoever wants \mathbb probably needs also something from amssymb. ;-) Dec 5 '13 at 18:19
• What is wrong with align for a single equation? Dec 5 '13 at 22:26
• @Paxinum For single equations the displaymath (also $...$) and equation environments do better spacing with respect to the preceding line; such adjustments are not done with multiline display environments (for TeXnical, but also typographically good reasons). Dec 5 '13 at 22:29

Limit controls must be applied to a math operator.

Try this:

x \mathop{\left\| x \right\|}\limits_{L^{2}(\mathbb{R})}^{2}


PS: You forgot the amssymb package in your MWE.

• Well, I've never seen such a notation. Dec 5 '13 at 16:18
• Me neither. But to each their own :-) Of course it's not clear if this is even the intended result... Dec 5 '13 at 16:22
• If you look at the edits in the question, I don't even know what the OP has really written in his document. Dec 5 '13 at 16:49
• Well it seems @egreg was able to read the OPs mind anyway ;-) Dec 5 '13 at 16:51