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 am trying to write a formula and then number it (5). The formula is meant to be center aligned and the numbering should be right aligned on the same line. This was my best attempt at doing that but when the flushright environment begins it starts a new line so the text and formula do not appear on the same line. Is there a clever way of doing this?

\begin{center} $1-\alpha$
\begin{flushright}(5)
\end{flushright}
\end{center}
share|improve this question
2  
Use amsmath and then \begin{align} 1-\alpha \tag{5} \end{align}. It's that easy. –  Werner Aug 28 '13 at 23:54
    
Thank you! I'm new to using latex compilers; I am using MikTex for compiling the code into pdf. I see that in the link you gave it says that amsmath is contained in MikTex. If amsmath is a library how can I include it to make \tag{5} work? –  user35873 Aug 29 '13 at 0:32
1  
@user35873 \usepackage{amsmath} in the preamble (i.e., before \begin{document}). –  Gonzalo Medina Aug 29 '13 at 0:43
    
This is brilliant thank you so much, it looks professional now :D –  user35873 Aug 29 '13 at 1:06
    
\eqno still works (most of the time) as well. –  John Kormylo Aug 29 '13 at 3:38

1 Answer 1

As Werner and Gonzalo Medina say, just use

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\noindent Horse, horse, horse, horse, horse, horse, horse, horse, horse, horse, horse, horse, horse.
\begin{equation}
1-\alpha \tag{5}
\end{equation}
Horse, horse, horse, horse, horse, horse, horse, horse, horse, horse, horse, horse, horse.

\end{document}

output

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.