1

At my LaTeX file, the space between left and right equation in "Einsetzungsverfahren" is not correct (too big).

see here

Thats my file, what did I wrong?

\documentclass{article}

\usepackage{amsmath}
\usepackage{pgfplots}

\title{Mathematik}
\date{11/07/15}
\author{Martin Fischer}

\begin{document}
\pagenumbering{gobble}

\maketitle

\newpage

\section{Gleichungssysteme}

\subsection{lineares Gleichungssystem}

\paragraph{Grundformel}
\begin{align*}
  a_1 \times x + b_1 \times y = c_1 &\quad \textbf{I} \\
  a_2 \times x + b_2 \times y = c_2 &\quad \textbf{II} \\
  \cline{1-2}
\end{align*}

\paragraph{Beispiel}
\begin{align*}
  y = -x + 2 &\quad \textbf{I} \\
  4x + 3y = 2 &\quad \textbf{II} \\
  \cline{1-2}
\end{align*}

\paragraph{Einsetzungsverfahren}
\textbf{I} in \textbf{II} einsetzen
\begin{align*}
  4x + 3y &= 2 \Leftarrow &&y = -x + 2 \\
  4x + 3(-x + 2) &= 2 \\
  4x - 3x + 6 &= 2 &&y = -(-4) + 2 \\
  \cline{1-4} \\
  x &= -4 &&y = 6 \\
  L &= \{(-4; 6)\}
\end{align*}

\paragraph{Gleichsetzungsverfahren}
\textbf{I} und \textbf{II} nach gleiche Variable aufl\"osen
\begin{align*}
  y &= -x + 2 \mid \times 3 &&4x + 3y = 2 \mid - 4x \\
  3y &= -3x + 6 &&\quad \textbf{I'} \\
  3y &= 2 - 4x &&\quad \textbf{II'} \\
  \cline{1-4} \\
  3y &= 3y &&&\text{\textbf{I'} und \textbf{II'} gleichsetzen} \\
  -3x + 6 &= 2 - 4x \\
  x &= -4 &&y = 6 \\
  L &= \{(-4; 6)\}
\end{align*}

\begin{tikzpicture}
  \begin{axis}[
    width=5cm,
    axis lines=middle,
    xlabel=$x$,
    ylabel={$f(x) = x^2$},
    grid=major,
    scaled ticks=false,
    axis equal,
    xmax=5,xmin=0,
    ymax=5,ymin=0,
    xtick={0,...,5},
    ytick={0,...,5}
    ]
    \addplot[smooth,color=blue] {x^2};
  \end{axis}
\end{tikzpicture}

\end{document}
  • 1
    Welcome to TeX.SX! You should better use \begin{alignat*}{3} instead of \begin{align*} here. See the documention of amsmath please –  Nov 08 '15 at 08:01
  • STill absolutely not good: code: http://ix.io/m0o image: http://imgur.com/glbNpdE – Martin Fischer Nov 08 '15 at 08:21
  • Amongst other features: \textbf{I} is weird. You can use numbered equations and there is a package that can typeset solutions steps of LES (or in German: LGS ;-)), I think the package is named gauss or something like that –  Nov 08 '15 at 08:46

1 Answers1

3

As Christian Hupfer has already noted in a comment, using alignat* instead of align* is probably the easiest way to achieve your alignment objective. To increase the horizontal space betweeen \Leftarrow and the material in the right-hand column, I suggest inserting \qquad before the third & symbol.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\pagenumbering{gobble}
\begin{document}

\section{Gleichungssysteme}
\subsection{lineares Gleichungssystem}

\dots

\paragraph{Einsetzungsverfahren}
\textbf{I} in \textbf{II} einsetzen
\begin{alignat*}{3}
  4x + 3y        &= 2      &\Leftarrow\qquad &y = -x + 2 \\
  4x + 3(-x + 2) &= 2 \\
  4x - 3x + 6    &= 2      &                 &y = -(-4) + 2 \\
  \cline{1-4}
  x &= -4                  &                 &y = 6 \\
  L &= \{(-4; 6)\}
\end{alignat*}

\end{document}
Mico
  • 506,678
  • Big disappointment: No Lualatex :-P –  Nov 08 '15 at 12:30
  • @ChristianHupfer -- Too much of a good thing would no longer be good, right? :-) – Mico Nov 08 '15 at 12:33
  • @ChristianHupfer - See http://tex.stackexchange.com/a/277764/5001 for another LuaLaTeX-based answer... I daresay it's a lot more straightforward than the competing answer, which uses a LaTeX3-heavy framework. :-) – Mico Nov 11 '15 at 17:26