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.

Hi if I have multiple equations on each line is there a better way to space them out on the same line other than using /;?

\documentclass[11pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}$\;\;\;\;\therefore \;\;\;R_{\mu \nu} -\frac{1}{2}g_{\mu \nu} R = -\kappa        T_{\mu \nu} = G_{\mu \nu} $\end{document}
share|improve this question
2  
\quad within math will produce space. –  Hans-Peter E. Kristiansen Mar 23 '13 at 18:02
1  
You might want to put them in a \begin{equation}...\end{equation} block rather than inline, using \quad for spacing as suggested. In any case you can put them on separate lines in your source file, so that you can read them there more easily. –  Ethan Bolker Mar 23 '13 at 18:20
add comment

3 Answers

Since you are asking about setting an inline equation, I would suggest that starting a line with a \therefore or a symbol or equation is bad style. I would rephrase and use words instead of the \therefore symbol.

It is obvious therefore that, $R_{\mu \nu} -\frac{1}{2}g_{\mu \nu} R = -\kappa 
T_{\mu \nu} = G_{\mu \nu} $ \ldots.

I would also consider a display environment.

\documentclass[11pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}

It is obvious therefore that, $R_{\mu \nu} -\frac{1}{2}g_{\mu \nu} R = -\kappa
T_{\mu \nu} = G_{\mu \nu} $ \ldots.

or use,

\begin{gather}
\begin{aligned}
\therefore \;R_{\mu \nu} -\frac{1}{2}g_{\mu \nu} R &= -\kappa  T_{\mu \nu}\\
& = G_{\mu \nu} 
\end{aligned}
\end{gather}
\end{document}
share|improve this answer
    
it's generally better to use \begin{equation} ... \end{equation} rather than gather if there's only one group. if no equation number is wanted, use equation* or \[ ... \], or just use align* to begin with. –  barbara beeton Mar 23 '13 at 19:11
    
@barbarabeeton This is the sort of my standard layout. I actually in my normal preamble I have \let\equation\gather, \let\endequation\endgather why is it generally better to use equation? I prefer this as it is normally easier to add to it during edits. –  Yiannis Lazarides Mar 23 '13 at 19:42
    
my understanding was that anything but equation requires exact matching of the \begin and \end arguments, and using \let to substitute hasn't been (and by policy, won't be) tested. so if this works, it's pure, blind luck, and not guaranteed. (in other words, if it stops working, ams won't promise to support it or patch to make it reliable.) i'm pretty sure this is documented, though i can't point to that offhand. –  barbara beeton Mar 23 '13 at 21:15
    
@barbarabeeton Thanks. Still curious to hear why you said it is ... better to use... –  Yiannis Lazarides Mar 23 '13 at 21:28
add comment

I guess the answer to be to use align environment:

\begin{align}
    a &= b
    & c &=d
\end{align}

This shoulb generally work well for up to three not too wide equations.


As Barbara noted in the comment to this question you can use align* to supress the numbers, but there is another technique:

\begin{align}
    a &= b
    & c &=d
    \nonumber
    \\
    d + b = a + c
\end{align}

Which will make the d+b = a+c numbered. In this way you can supress number for only some of the equations you need.

share|improve this answer
    
i think you probably want align* so that there are no equation numbers. –  barbara beeton Mar 23 '13 at 19:13
add comment

If you are asking for different horizontal spaces to include in your inline-math, you can find many possibilities in section 11.2 of mathmode. The most important are

  • a\ b
  • a\quad b
  • a\qquad b
  • a\,b and a\;b which you used yourself.

If you want to surround the inline math with some space to set it horzontally apart from the surrounding text, you should change the length \mathsurround by e.g. \setlength{\mathsurround}{1em}.

If you want to center this equation, the displaymath mode would be more suitable. Simply enclose the equation in \[ and \] instead of $ and $.

If you also want to align several of these lines horizontally, you should use the align environments of the amsmath package. (See Section 25 of mathmode for help.)

share|improve this answer
add comment

Your Answer

 
discard

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