Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to have something as following, but I'm not satisfied with the result:

\documentclass[12pt,parskip]{scrartcl}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{geometry}
\usepackage[english]{babel}
\selectlanguage{english}


\begin{document}
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;
\;\;$\begin{minipage}[r]{8cm}
\begin{flalign*}
\beta_0
&=
\cos\left(\frac{\Phi}{2}\right)\longrightarrow&
\Phi
&=2\arccos\left(\beta_0\right)
=
118.67^\circ\\
\beta_1
&=
e_1\sin\left(\frac{\Phi}{2}\right)\longrightarrow&
e_1
&=
\frac{\beta_1}{\sin\left(\frac{\Phi}{2}\right)}
=
-0.857716\\
\beta_2
&=
e_2\sin\left(\frac{\Phi}{2}\right)\longrightarrow&
e_2
&=
\frac{\beta_2}{\sin\left(\frac{\Phi}{2}\right)}
=
-0.513132\\
\beta_3
&=
e_3\sin\left(\frac{\Phi}{2}\right)\longrightarrow&
e_3
&=
\frac{\beta_3}{\sin\left(\frac{\Phi}{2}\right)}
=
-0.031914
\end{flalign*}
\end{minipage}\\
\end{document}

Sorry for the bad formatting, I am still a beginner in LaTex. I would like to connect the equations with arrows, but the arrows should also be aligned. And the equations should be close together... I tricked with a minipage, but I think that is also not the best solution. Thank you!

share|improve this question

1 Answer 1

You could use alignat to align at multiple positions:

enter image description here

\documentclass[12pt,parskip]{scrartcl}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{alignat*}{3}
  \beta_0 &= \cos(\tfrac{\Phi}{2}) && \longrightarrow\ & \Phi &=2\arccos(\beta_0)=118.67^\circ \\
  \beta_1 &= e_1\sin(\tfrac{\Phi}{2}) && \longrightarrow\ & e_1 &=\frac{\beta_1}{\sin(\tfrac{\Phi}{2})}=-0.857716 \\
  \beta_2 &= e_2\sin(\tfrac{\Phi}{2}) && \longrightarrow\ & e_2 &=\frac{\beta_2}{\sin(\tfrac{\Phi}{2})}=-0.513132 \\
  \beta_3 &= e_3\sin(\tfrac{\Phi}{2}) && \longrightarrow\ & e_3 &=\frac{\beta_3}{\sin(\frac{\Phi}{2})}=-0.031914
\end{alignat*}
\end{document}

Consider reading Herbert Voss' mathmode document. Specifically section 25 align environments (p 43 onward).

Alignment using a standard array is also possible. Here's one such suggestion:

enter image description here

\documentclass[12pt,parskip]{scrartcl}
\begin{document}
\[
  \begin{array}{r@{{}={}}l@{\quad\longrightarrow\quad}r@{{}={}}l@{{}={}}l}
    \beta_0 & \cos(\frac{\Phi}{2})    & \Phi & 2\arccos(\beta_0) & 118.67^\circ \\
    \beta_1 & e_1\sin(\frac{\Phi}{2}) & e_1 & \frac{\beta_1}{\sin(\frac{\Phi}{2})} & -0.857716 \\
    \beta_2 & e_2\sin(\frac{\Phi}{2}) & e_2 & \frac{\beta_2}{\sin(\frac{\Phi}{2})} & -0.513132 \\
    \beta_3 & e_3\sin(\frac{\Phi}{2}) & e_3 & \frac{\beta_3}{\sin(\frac{\Phi}{2})} & -0.031914
  \end{array}
\]
\end{document}

The use of @{{}={}} inserts = between the array cells as a "column separator", but also makes sure that the spacing matches that of a regular binary relation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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