1

I just found that \noalign can change the number to the bottom. But usually one expect it appears at the middle. If I comment \noalign{choose $\overline{\vec{x}}^{n-1}$ with $\mathcal{F}(\overline{\vec{x}}^{n-1} )\le\min(\vec{F}({\vec{x}'}^{n-1}),\vec{F}(\vec{x}'))$}\\, the location of the number is fine. How should one keep the number in the right location but also use \noalign?

  \documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
  \left\{  
  \begin{align}
    \vec{x}&=\vec{x}^{n-1}+\alpha(\vec{u}-\vec{x}^{n-1})\\
   \overline{\vec{y}}&=\vec{y}+\alpha(\nabla\mathcal{F}(\vec{x})-\vec{y})\\
   \overline{\gamma}&=\gamma+\alpha(\mathcal{F}(\vec{x})-\avg{\nabla{F}(\vec{x}),\vec{x}}-\gamma)\\
    {\vec{x}'}^{n-1}&=\argmin\limits_{\vec{z}\in\bra{\vec{x},\vec{x}^{n-1}}}\mathcal{F}(\vec{z})\\
    {\gamma'}^{n-1}&=\overline{\gamma}-\mathcal{F}({\vec{x'}^{n-1}})\\
    \vec{u}'&=\mathcal{U}({{\gamma'}^{n-1}},\overline{\vec{y}})\\
    \vec{x}'&=\vec{x}^{n-1}+\alpha(\vec{u}'-\vec{x}^{n-1})\\
   \noalign{choose $\overline{\vec{x}}^{n-1}$ with $\mathcal{F}(\overline{\vec{x}}^{n-1} )\le\min(\vec{F}({\vec{x}'}^{n-1}),\vec{F}(\vec{x}'))$}\\
      \overline{\gamma}^n&=\overline{\gamma}-\mathcal{F}(\overline{\vec{x}}^{n-1})\\
      \overline{\vec{u}}&=\mathcal{U}(\overline{\gamma}^n,\overline{\vec{y}})\\
       \overline{\eta}&=\mathcal{E}(\overline{\gamma}^n,\overline{\vec{y}})\\
       \vec{x}^n&=\overline{\vec{x}}^{n-1}\\
   \end{align}
\right.
 \end{equation}

 \end{document}
  • Your code also throws an error: Package amsmath Error: Erroneous nesting of equation structures; – cgnieder Oct 7 '16 at 15:42
  • after an error don't look at the pdf at all, tex will only recover enough to try to syntax check the remaining document, it does not try to make usable typeset output. The align environment starts math mode so it should not be inside equation. – David Carlisle Oct 7 '16 at 16:08
  • \noalign isn't a command intended for top level use in a latex document, it is used internally in package code. perhaps you are looking for \intertext{some text here} – David Carlisle Oct 7 '16 at 16:10
3

The main error is that align can not be used in math mode. I also guessed definitions for your undefined commands, and fixed the double subscript errors.

\noalign is not a user-level command to be used in a document. Normally in align you could use \intertext but here in aligned I just used \rlap.

enter image description here

 \documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator\avg{avg}
\DeclareMathOperator\argmin{argmin}
\newcommand\bra[1]{\langle#1\rangle}
\begin{document}
\begin{equation}
  \left\{  
  \begin{aligned}
    \vec{x}&=\vec{x}^{n-1}+\alpha(\vec{u}-\vec{x}^{n-1})\\
   \overline{\vec{y}}&=\vec{y}+\alpha(\nabla\mathcal{F}(\vec{x})-\vec{y})\\
   \overline{\gamma}&=\gamma+\alpha(\mathcal{F}(\vec{x})-\avg{\nabla{F}(\vec{x}),\vec{x}}-\gamma)\\
    {\vec{x}'{}}^{n-1}&=\argmin\limits_{\vec{z}\in\bra{\vec{x},\vec{x}^{n-1}}}\mathcal{F}(\vec{z})\\
    {\gamma'}^{n-1}&=\overline{\gamma}-\mathcal{F}({\vec{x'}^{n-1}})\\
    \vec{u}'&=\mathcal{U}({{\gamma'}^{n-1}},\overline{\vec{y}})\\
    \vec{x}'&=\vec{x}^{n-1}+\alpha(\vec{u}'-\vec{x}^{n-1})\\
   \rlap{\hspace{-2em}choose $\overline{\vec{x}}^{n-1}$ with $\mathcal{F}(\overline{\vec{x}}^{n-1} )\le
\min(\vec{F}({\vec{x}'{}}^{n-1}),\vec{F}(\vec{x}'))$}\\
      \overline{\gamma}^n&=\overline{\gamma}-\mathcal{F}(\overline{\vec{x}}^{n-1})\\
      \overline{\vec{u}}&=\mathcal{U}(\overline{\gamma}^n,\overline{\vec{y}})\\
       \overline{\eta}&=\mathcal{E}(\overline{\gamma}^n,\overline{\vec{y}})\\
       \vec{x}^n&=\overline{\vec{x}}^{n-1}\\
   \end{aligned}
\right.
 \end{equation}

 \end{document}
  • Or \multispan{2} – egreg Oct 7 '16 at 18:05

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.