6

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}
13
  • 5
    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.
    – jub0bs
    Dec 5 '13 at 15:28
  • 5
    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
  • 3
    @Masi karkoeller's comment was correct before your edit. Writing "not true" is dishonest...
    – jub0bs
    Dec 5 '13 at 15:47
  • 2
    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
  • 2
    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
9

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}
\begin{equation}\label{eq:time_marginal_condition}
  x \lVert x \rVert_{L^{2}(\mathbb{R})}^{2}
\end{equation}
\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\|.

enter image description here

4
  • 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. ;-)
    – egreg
    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).
    – egreg
    Dec 5 '13 at 22:29
7

Limit controls must be applied to a math operator.

Try this:

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

enter image description here

PS: You forgot the amssymb package in your MWE.

4
  • Well, I've never seen such a notation.
    – egreg
    Dec 5 '13 at 16:18
  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.