Removing horizontal space in align environment?
I am assuming that your real equation contains more thrilling entries than a
, b
, c
, and d
. If that's the case, you may be better off employing a flexible array
environment.
\documentclass{article}
\usepackage{array} % for '\newcolumntype' macro
\newcolumntype{C}{>{{}}c<{{}}} % for binary and relational operators
\newcolumntype{L}{>{\displaystyle}L} % automatic display-style math mode, left-aligned
\begin{document}
\[
\setlength\arraycolsep{0pt}
\renewcommand\arraystretch{1.2} % to emulate vert. spacing of 'align' env.
\begin{array}{LCLCLCLl} % the final column is a "dummy" column
a &=& b &+& c &+& d\\
b &=& b &+& c &+& d\\
c &=& b &+& c &+& d\\
aoeu &=& \multicolumn{6}{l}{\mbox{something long here}}
\end{array}
\]
\end{document}
As I don't know the real stuff that will be in your alignat*
environment, I kept the three alignment columns. A solution consists in putting the r.h.s. of the last row in an \rlap
command, which makes it have 0 width. In case this r.h.s. were a maths formula, mathtools
defines a \mathrlap
command, which has the same effect in math mode:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier}
\usepackage{mathtools}
\begin{document}
\begin{alignat*}{3}
a &= b &{}+{}& c &{}+{}& d\\
b &= b &{}+{}& c &{}+{}& d\\
c &= b &{}+{}& c &{}+{}& d\\
aoeu &= \rlap{something long here}\\
a & =\mathrlap{\frac{-b\pm\sqrt{b^2-4ac}}{2a}}
\end{alignat*}
\end{document}