Take the 2-minute tour ×
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 have to put a textwidth pmatrix into an align environment. When using split, it destroys the centered alignment of the other equation.

Pseudocode:

\begin{align}
 \vec{a} &= \vec{b} + \vec{c} \\
 \vec{c} &= \operatorname{Matrix}(Variable) \cdot \vec{d} \\
 \begin{split}
 \operatorname{Matrix}(Variable) &= \\
 \begin{pmatrix}
  textwidth matrix
 \end{pmatrix}
 \vec{e} &= 2 \cdot \vec{a}
\end{align}

Without the split the equations would leave the page. With split the equations are aligned left except the right aligned split part.

The result should look like:

      XX=XX
       X=X
      XX=XXXXX
      XX=
XXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXX
      XX=XXXX
share|improve this question

1 Answer 1

up vote 9 down vote accepted

\noalign can be used to put unaligned stuff inbetween:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
  \vec{a} &= \vec{b} + \vec{c} \\
  \vec{c} &= \operatorname{Matrix}(Variable) \cdot \vec{d} \\
  \operatorname{Matrix}(Variable) &= \\
  \noalign{$
    \begin{pmatrix}
      \rule{.9\textwidth}{1pt}
    \end{pmatrix}
  $}
  \vec{e} &= 2 \cdot \vec{a}
\end{align}
\end{document}

Result

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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