17

My problems are:

1 the equations in the align environment should be left-aligned (not centered)

2 there should be no vertical space before the align environment

\documentclass{scrbook}
\usepackage{amssymb}
\usepackage{amsmath}
\begin{document}
\underline{Berechnung}
\begin{align*}
    T_{3,-1}(x) &= -4+(-4)\cdot(x-(-1))+\frac{1}{2}\cdot(-8)\cdot(x-(-1))^2+\frac{1}{6}\cdot(-24)\cdot(x-(-1))^3\\
                &= -4-4\cdot(x+1)-4\cdot(x+1)^2-4\cdot(x+1)^3
\end{align*}
\end{document}
1
  • 1
    Welcome to TeX.SE! To get flush-left equations, pass the option fleqn to the amsmath package. The remaining amount of whitespace relative to the left margin is controlled by the length parameter \mathindent; issue the instruction \setlength{\mathindent}{0pt} if you want absolutely no margin. Personally, I would not fiddle with the vertical space settings.
    – Mico
    Oct 16 '14 at 6:31
6

You can use flalign environment to get the equations flush with the margin, and the space precedding the flalign can be adusted by changing \abovedisplayskip:

enter image description here

An alternate is to use the aligned environment which yields similar results.

Note:

  • Note the trailing & in the flalign environment. This is needed on at least one of the lines.
  • The adjustment of the \abovedisplayskip was done within a brace group so that subsequent display mode equations are not effected.

Code: flalign:

\documentclass{scrbook}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{showframe}
\begin{document}
\underline{Berechnung}
{\setlength{\abovedisplayskip}{0pt}%
\begin{flalign*}
    T_{3,-1}(x) &= -4+(-4)\cdot(x-(-1))+\frac{1}{2}\cdot(-8)\cdot(x-(-1))^2+\frac{1}{6}\cdot(-24)\cdot(x-(-1))^3 &\\
                &= -4-4\cdot(x+1)-4\cdot(x+1)^2-4\cdot(x+1)^3
\end{flalign*}%
}%
\end{document}

Code: aligned:

\documentclass{scrbook}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{showframe}
\begin{document}
\underline{Berechnung}\par\noindent
$\begin{aligned}
    T_{3,-1}(x) &= -4+(-4)\cdot(x-(-1))+\frac{1}{2}\cdot(-8)\cdot(x-(-1))^2+\frac{1}{6}\cdot(-24)\cdot(x-(-1))^3 &\\
                &= -4-4\cdot(x+1)-4\cdot(x+1)^2-4\cdot(x+1)^3
\end{aligned}$
\end{document}
\end{document}
5

You can also get using align*.

Code:

\documentclass{scrbook}
\usepackage{amssymb}
\usepackage{amsmath}

\begin{document}

\noindent
\underline{Berechnung}\par\noindent
\begin{align*}
   T_{3,-1}(x) &= -4+(-4)\cdot(x-(-1))+\frac{1}{2}\cdot(-8)\cdot(x-(-1))^2+\frac{1}{6}\cdot(-24)\cdot(x-(-1))^3 & \\
              &= -4-4\cdot(x+1)-4\cdot(x+1)^2-4\cdot(x+1)^3
\end{align*}
\end{document}

alignstar

1
  • 3
    If you add the showframe package you'll see that the equation is not quite flush with the left margin. Oct 16 '14 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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