I have defined a handy little macro to typeset matrix elements in braket-notation and now want to align the next line to a part of this matrix element, because the
equations are really long and aligning to the equal sign would be a colossal waste of space. However, simply putting the &
inside the arguments of my macro gives me:
! Misplaced alignment tab character &.
<argument> u_1u_2u_3L&
P
l.21 \end{split}
So, I was wondering, is there a way to define the macro in a better way that allows to do this, or is it simply not possible and I have to work with \hspace{-10ex}
or something.
Minimal not working example:
\documentclass[a4paper,10pt]{report}
\usepackage{amsmath}
\newcommand{\matrixel}[3]{\left< #1\vphantom{#2#3}\right| #2\left| #3\vphantom{#1#2}\right>}
\begin{document}
\begin{equation}
\begin{split}
\matrixel{u_1u_2u_3L}{&P}{u_1'u_2'u_3'L'} = (a +b)\\
&\times (c+d)
\end{split}
\end{equation}
\end{document}
Note: I'm a bit confused about the terminology. Is this really a "macro" I defined here? Feel free to edit if there's a better word.
<
and>
come from? (they're not in the macro as you wrote it.) have you fed something through a web site and which has translated "<
" to "<
" ? or are you using an html editor which thinks it knows better than you?&
inside a\vphantom
<
is what kile gives me as output. So, I have no idea where they come from (or what they mean).<argument>
, as in my fix. I'm not using Kile, so I can't say.LaTeX2e <2009/09/24>
right at the beginning of the output. Anyway, thanks for the edit.