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 have 3 short equations which consume much vertical space, if each one is typeset in a separate line.

  • How can I typeset them in one line in a "mathematically correct" way?
    I do not necessarily need separate labels for each one of them: one label (and equation number would be enough)

example

\documentclass[11pt, a4paper]{scrbook}

\usepackage[ngerman]{babel}
\usepackage{array, amsmath}

\begin{document}

\begin{eqnarray}
x_{1} &= & \frac{A-A_{0}}{\frac{1}{2}\cdot \left( A_{\mathrm{A}} - A_{\mathrm{a}} \right)}
\label{exv:eqn:UmrechnungEingangsgroesse1} \\
x_{2} &= & \frac{B-B_{0}}{\frac{1}{2}\cdot \left( B_{\mathrm{A}} - B_{\mathrm{a}} \right)}
\label{exv:eqn:UmrechnungEingangsgroesse2} \\
x_{3} &= &  \frac{C-C_{0}}{\frac{1}{2}\cdot \left( C_{\mathrm{A}} - C_{\mathrm{a}} \right)}
\label{exv:eqn:UmrechnungEingangsgroesse3}
\end{eqnarray}
\end{document}
share|improve this question
add comment

2 Answers

up vote 10 down vote accepted

First of all, Avoid eqnarray.

You can use a normal equation environment and separate the equations with a \qquad.

\documentclass[11pt, a4paper]{scrbook}

\usepackage[ngerman]{babel}
\usepackage{amsmath}

\begin{document}

\begin{equation}
x_{1} = \frac{A-A_{0}}{\frac{1}{2}\cdot \left( A_{\mathrm{A}} - A_{\mathrm{a}} \right)}
\qquad
x_{2} = \frac{B-B_{0}}{\frac{1}{2}\cdot \left( B_{\mathrm{A}} - B_{\mathrm{a}} \right)}
\qquad
x_{3} =  \frac{C-C_{0}}{\frac{1}{2}\cdot \left( C_{\mathrm{A}} - C_{\mathrm{a}} \right)}
\label{exv:eqn:UmrechnungEingangsgroesse3}
\end{equation}
\end{document}

enter image description here

(In my original answer I used an align environment, but this isn't really "correct", as that is meant for aligning equations over more than one line. As this only has one line, it is more appropriate to use an equation environment, as commented by Andrew Stacey.)

share|improve this answer
    
Thanks for the hint on eqnarray and for your example! Is that "mathematically correct"? Should(n't) I use a kind of separator (like semicolon) between the 3 equations? –  Martin Nov 2 '11 at 11:18
1  
@Martin To be honest, I don't know what is common practice here, sorry. –  Torbjørn T. Nov 2 '11 at 12:03
    
@ Torbjørn T.: thanks for your honesty! So I hope there'll drop in some mathematicians which can tell us. :-) –  Martin Nov 2 '11 at 12:21
1  
(I am a mathematician.) In this case, I'd say that the whitespace is enough separation. I've tried with commas and semi-colons and they just get lost - they're so small with respect to the fractions that they look more like stray pixels that have lost their way. –  Andrew Stacey Nov 2 '11 at 13:38
1  
Incidentally, why are you using align and not equation? There's nothing to align with. Using \qquad between the pieces produces adequate separation, I deem. –  Andrew Stacey Nov 2 '11 at 13:39
show 1 more comment

Firstly, I fully support the points avoiding eqnarray and using amsmath environments whenever possible, such as align.

amsmath provides a subequations environment, which might also be useful, though it's more for numbering subequations but not for lining up horizontally.

You could use align such as Torbjørn showed, as it supports several columns. Here the & symbol is both for alignment and for separating columns, as in tabular, alternating.

Another option is flalign, you could use it in the very same way, but the equations would be more spread out, so you would have more space.

You don't need to use a amsmath align environment, since the horizontal positioning is a tabular like issue. So if you would like to have equations with labels you can refer to, you could use for example tabularx with equal column width:

\documentclass[11pt,a4paper]{scrbook}
\usepackage{amsmath}
\usepackage{tabularx}
\begin{document}
\chapter{Equations}
See equations \eqref{eqn:1}, \eqref{eqn:2} and \eqref{eqn:3}.

\noindent\begin{tabularx}{\textwidth}{@{}XXX@{}}
  \begin{equation}
  x_{1} = \frac{A-A_{0}}{\frac{1}{2}
    \cdot \left( A_{\mathrm{A}} - A_{\mathrm{a}} \right)}
    \label{eqn:1}
  \end{equation} &
  \begin{equation}
  x_{2} = \frac{B-B_{0}}{\frac{1}{2}
    \cdot \left( B_{\mathrm{A}} - B_{\mathrm{a}} \right)}
    \label{eqn:2}
  \end{equation} &
  \begin{equation}
  x_{3} = \frac{C-C_{0}}{\frac{1}{2}
    \cdot \left( C_{\mathrm{A}} - C_{\mathrm{a}} \right)}
    \label{eqn:3}
  \end{equation}
\end{tabularx}
\end{document}

three equations in a row

share|improve this answer
    
thanks, a tabularx is also a good idea - I would also accept your answer if I could, but I'll go with the \qquad this time. –  Martin Nov 3 '11 at 9:03
add comment

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.