# Center equation using aligned

I've found a solution to center the equation in align environment, but I don't want to have a numbering for every part of the equation, so I want to use aligned in equation environment. But the solutions suggested by the internet don't work with aligned. Does anyone has an idea?

\begin{aligned} CFtP_{i,t} = \frac{EBIT_{i,t-1}+AfA_{i,t-1}-WCA_{i,t-1}}{MV_{i,t}}\\ \text{mit } WCA_{i,t-1} = (\Delta UV_{i,t-1}-\Delta Cash_{i,t-1})-(\Delta kurz. Verb._{i,t-1}-\Delta Schulden_{i,t-1}) \\ = \frac{\text{WC18191}+\text{WC01151}-((\text{WC02201}-\text{WC02003})-(\text{WC03101}-\text{WC03051}))}{\text{MV}} \end{aligned}


Thanks for your help.

• Welcome to TeX.SX! Please make your code snippet compilable (minimal working example (MWE)) by adding the documentclass as well as teh relevant packages. – leandriis Nov 17 '19 at 13:40
• Depending on the documentclass/packages you use, your equation is most likely too wide to fit into the textwidth. If the occurs, you will recieve an "overfull box" warning and the equation might look offcenter since it overflows into the right margin. Is this what you observe? – leandriis Nov 17 '19 at 13:43
• Also, you should specify alignment points inside of your question (e.g. &= instead of = to align all lines with respect to the = sign). – leandriis Nov 17 '19 at 13:44

## 3 Answers

Assuming your text width is capable of accommodating the big last formula, you can use a mixture of gathered and alignedat.

\documentclass{article}
\usepackage{geometry}
\usepackage{amsmath}

\newcommand{\func}[1]{\mathrm{#1}}

\begin{document}

\begin{gathered} \func{CFtP}_{i,t} = \frac{\func{EBIT}_{i,t-1}+\func{AfA}_{i,t-1}-\func{WCA}_{i,t-1}} {\func{MV}_{i,t}} \\ \begin{alignedat}{2} &\text{mit } \\ &\func{WCA}_{i,t-1} && = (\Delta \func{UV}_{i,t-1}-\Delta \func{Cash}_{i,t-1}) -(\Delta \func{kurz.Verb.}_{i,t-1}-\Delta \func{Schulden}_{i,t-1}) \\ &&& =\frac{\func{WC18191}+\func{WC01151}-((\func{WC02201}-\func{WC02003}) -(\func{WC03101}-\func{WC03051}))} {\func{MV}} \end{alignedat} \end{gathered}

\end{document}


Your equation is too wide to fit between margins. However, with the default margins of geometry (if you don't need to use margin notes), it can fit them, with the fleqn enviroment from nccmath and the \mathrlap command from mathtools (note both packages load amsmath, but nccmath has to be loaded before mathtools):

\documentclass{article}
\usepackage{nccmath, mathtools}
\usepackage[showframe]{geometry}

\begin{document}

\mbox{}
\begin{fleqn}
$$\begin{split} CFtP_{i,t} & = \frac{EBIT_{i,t-1}+AfA_{i,t-1}-WCA_{i,t-1}}{MV_{i,t}}\\ \text{mit } WCA_{i,t-1} & = (\Delta UV_{i,t-1}-\Delta \text{Cash}_{i,t-1})-(\Delta \text{kurz}. \text{Verb.}_{i,t-1}-\Delta \text{Schulden}_{i,t-1}) \\ & =\mathrlap{ \frac{\text{WC18191}+\text{WC01151}-((\text{WC02201}-\text{WC02003})-(\text{WC03101}-\text{WC03051}))}{\text{MV}}} \end{split}$$
\end{fleqn}

\end{document}


First of all you do not need to put align environment into equation environment, as align already provides math and numbering of the equations.

To center equations use \begin{gather} (it also doesn't need around it)

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
CFtP_{i,t} = \frac{EBIT_{i,t-1}+AfA_{i,t-1}-WCA_{i,t-1}}{MV_{i,t}} \nonumber \\
\text{mit } WCA_{i,t-1} = (\Delta UV_{i,t-1}-\Delta Cash_{i,t-1})-(\Delta kurz. Verb._{i,t-1}-\Delta Schulden_{i,t-1}) \nonumber \\
= \frac{\text{WC18191}+\text{WC01151}-((\text{WC02201}-\text{WC02003})-(\text{WC03101}-\text{WC03051}))}{\text{MV}} \nonumber
\end{gather}
\end{document}


• If I compile your code, I get a different output with overfull box warnings and three equation numbers, one in every line, while the OP clearly states "I don't want to have a numbering for every part of the equation". Could you please comment on that? – leandriis Nov 17 '19 at 13:48
• Regarding: "as aligned already provides math and numbering ": Are you sure, you don't confuse align (that does not need math mode around it) and aligned (that does)? – leandriis Nov 17 '19 at 13:49
• @leandriis added "\nonumber" to get rid of the numbers. You are right I did confuse align and aligned – bgleb Nov 17 '19 at 13:51