Is there a good/correct way of making an align environment with one line spanning multiple columns?
At the moment I'm using a hack like the following, but I feel that it's probably not the best way.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
L1C1 &= 1234 \,,& L1C2 &= abcd \,,\\
L2C1 &= 1234 \,,& L2C2 &= efgh \,,\\
L3 &= 1234567890abcdefghijklmnop \ . \hspace{-30cm}
\end{align}
\end{document}
Best Answer
this is also a hack, but it will give the desired result.
use
\rlap
to "hide" the width of the overlong line. for the example given, i would do this for the last line:you might even want to put some extra space after that to get the desired separation; just look at the output to see what's needed.
most lines of math contain reasonable places where one can break without damage.
Update:
In a comment, @user2478 has suggested using
\mathrlap
; requiresmathtools
. (Yes, this is better than plain\rlap
.)