
Ich versuche, eine Gleichung in drei Spalten aufgeteilt anzuzeigen, wie in der Abbildung unten gezeigt.
Mir ist es gelungen, das obige Bild mithilfe einer Unmenge geschützter Leerzeichen (~) zu erstellen, die sowohl im Editor als auch im Dokument völliger Müll aussehen, da sie nicht richtig ausgerichtet sind.
\begin{align*}
\mathrm{Area~of~\Delta ABD}~~~~~~~~~~~~ &= ~~~~~~~~~~\mathrm{area~of~\Delta ABC} ~~ &+ ~~~~~~~ \mathrm{area~of~\Delta ACD} \\
\frac{x*z*\sin(\alpha+\beta)}{2}~~~~~~~~~~~~ &= ~~~~~~~~~~~~ \frac{x*y*\sin\alpha}{2} &+ ~~~~~~~~~~~ \frac{z*y*\sin\beta}{2}
\end{align*}
Both sides are multiplied by 2:
\begin{align*}
x*z*\sin(\alpha+\beta)~~~~~~~~~~ &= ~~~~~~~~~~~~~~~ x*y*\sin\alpha &+ ~~~~~~~~~~ z*y*\sin\beta
\end{align*}
Both sides are divided by $x*z$:
\begin{align*}
\sin(\alpha+\beta)~~~~~~~~~~~~~~~~ &= ~~~~~~~~~~~~~~~~~~ \frac{y*\sin\alpha}{z} &+ ~~~~~~~~~~~ \frac{y*\sin\beta}{x}
\end{align*}
As $\frac{y}{z}=\cos(\beta)$ and $\frac{y}{x}=\cos(\alpha)$ we get:
\begin{align*}
\sin(\alpha+\beta) ~~~~~~~~~~~~~~~~~~~ &= ~~~~~~~~~~~~~~~ \cos\beta*\sin\alpha &+ ~~~~~~~ \cos\alpha*\sin(\beta)
\end{align*}
Ich habe mich gefragt, wie Sie das auf eine weniger schreckliche Weise machen würden?
Antwort1
Wenn Ihnen die Zentrierung des Spalteninhalts und die Ausrichtung der Symbole =
und +
wichtig ist, empfehle ich Ihnen die Verwendung einer vierspaltigen array
Umgebung nach den folgenden Richtlinien:
Zusätzlich zum Entfernen der unnötigen (und kontraproduktiven) geschweiften Klammern um die Argumente von \sin
und \cos
habe ich auch sämtliche Vorkommen des Multiplikationszeichens entfernt *
und einige \frac
Ausdrücke durch Inline-Mathe-Bruchäquivalente ersetzt.
\documentclass{article} % or some other suitable document class
\usepackage{array} % for "\newcolumntype" macro
\newcolumntype{L}{>{$}l<{$}} % automatic text mode, left-aligned
\begin{document}
\[
\renewcommand\arraystretch{1.667}
\begin{array}{@{} l @{\qquad\qquad} c @{{}={}} c @{{}+{}} c @{}}
& \textnormal{Area of $\Delta\mathit{ABD}$}
& \textnormal{Area of $\Delta\mathit{ABC}$}
& \textnormal{Area of $\Delta\mathit{ACD}$} \\[0.5ex]
& \frac{1}{2}x z\sin(\alpha+\beta)
& \frac{1}{2}x y\sin\alpha
& \frac{1}{2}z y\sin\beta \\
\multicolumn{4}{@{}L}{Multiply both sides by 2:}\\
& xz\sin(\alpha+\beta)
& xy\sin\alpha
& zy\sin\beta\\
\multicolumn{4}{@{}L}{Divide both sides by $x z$:}\\
& \sin(\alpha+\beta)
& (y/z)\sin\alpha
& (y/x)\sin\beta \\
\multicolumn{4}{@{}L}{As $y/z=\cos\beta$ and $y/x=\cos\alpha$ we get}\\
& \sin(\alpha+\beta)
& \cos\beta\sin\alpha
& \cos\alpha\sin\beta\,.
\end{array}
\]
\end{document}
Antwort2
Sie könnten so ausrichten, obwohl Ihre ersten „Text“-Zeilen ziemlich breit sind, sodass die ausgerichteten + etwas auseinandergezogen aussehen.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}
\text{Area of $\Delta ABD$} &= \text{area of $\Delta ABC$}&&+ \text{area of $\Delta ACD$} \\
\frac{x*z*\sin(\alpha+\beta)}{2} &= \frac{x*y*\sin\alpha}{2} &&+ \frac{z*y*\sin\beta}{2}\\
\intertext{Both sides are multiplied by $2$:}
x*z*\sin(\alpha+\beta) &= x*y*\sin\alpha &&+ z*y*\sin\beta
\intertext{Both sides are divided by $x*z$:}
\sin(\alpha+\beta) &= \frac{y*\sin\alpha}{z} &&+ \frac{y*\sin\beta}{x}
\intertext{As $\frac{y}{z}=\cos(\beta)$ and $\frac{y}{x}=\cos(\alpha)$ we get:}
\sin(\alpha+\beta) &= \cos\beta*\sin\alpha &&+ \cos\alpha*\sin(\beta)
\end{alignat*}
\end{document}
Antwort3
Ich schlage drei Möglichkeiten vor, damit umzugehen. Die erste ähnelt Ihrem Ansatz; für die zweite verwende ich die Zentrierung der mittleren Spalte, um Leerraum zu minimieren.
Im dritten Fall wird überhaupt keine Ausrichtung angestrebt: Jede Formel besteht aus drei Teilen und Ihre Leser können diese in den verschiedenen Schritten zuordnen.
Bitte vermeiden Sie ∗ bei der Multiplikation.
\documentclass{article} % or some other suitable document class
\usepackage{amsmath,mathtools}
\usepackage{IEEEtrantools}
\newcommand{\IEEEintertext}[1]{\noalign{#1\vspace{1ex}}}
\begin{document}
\section{Your approach}
\begin{alignat*}{2}
\text{Area of $\Delta\mathit{ABD}$} &= \text{Area of $\Delta\mathit{ABC}$}
&&+ \text{Area of $\Delta\mathit{ACD}$} \\
\frac{x z\sin(\alpha+\beta)}{2} &= \frac{x y\sin\alpha}{2} &&+ \frac{z y\sin\beta}{2} \\
\shortintertext{Multiply both sides by 2:}
xz\sin(\alpha+\beta) &= xy\sin\alpha &&+ zy\sin\beta\\
\shortintertext{Divide both sides by $x z$:}
\sin(\alpha+\beta) &= \frac{y\sin\alpha}{z} &&+ \frac{y\sin\beta}{x} \\
\shortintertext{As $y/z=\cos\beta$ and $y/x=\cos\alpha$ we get}
\sin(\alpha+\beta) &= \cos\beta\sin\alpha &&+ \cos\alpha\sin\beta\,.
\end{alignat*}
\section{With slightly different alignment}
\begin{IEEEeqnarray*}{rCcCl}
\text{Area of $\Delta\mathit{ABD}$} &=& \text{Area of $\Delta\mathit{ABC}$}
&+& \text{Area of $\Delta\mathit{ACD}$} \\[1ex]
\frac{x z\sin(\alpha+\beta)}{2} &=& \frac{x y\sin\alpha}{2} &+& \frac{z y\sin\beta}{2} \\[1ex]
\IEEEintertext{Multiply both sides by 2:}
xz\sin(\alpha+\beta) &=& xy\sin\alpha &+& zy\sin\beta\\[1ex]
\IEEEintertext{Divide both sides by $x z$:}
\sin(\alpha+\beta) &=& \frac{y\sin\alpha}{z} &+& \frac{y\sin\beta}{x} \\[1ex]
\IEEEintertext{As $y/z=\cos\beta$ and $y/x=\cos\alpha$ we get}
\sin(\alpha+\beta) &=& \cos\beta\sin\alpha &+& \cos\alpha\sin\beta\,.
\end{IEEEeqnarray*}
\section{An altogether different method}
We start from the fact that
\[
\text{Area of $\Delta\mathit{ABD}$} = \text{Area of $\Delta\mathit{ABC}$}
+ \text{Area of $\Delta\mathit{ACD}$}
\]
Writing down the formulas and removing the common denominator $2$ gives
\[
xz\sin(\alpha+\beta) = xy\sin\alpha + zy\sin\beta
\]
Now we can divide both sides by $xz$ to obtain
\[
\sin(\alpha+\beta)=\frac{y}{z}\sin\alpha+\frac{y}{x}\sin\beta
\]
However, by definition, $y/z=\cos\beta$ and $y/x=\cos\alpha$, so we finally get
\[
\sin(\alpha+\beta)=\cos\beta\sin\alpha+\cos\alpha\sin\beta
\]
\end{document}