1

I m trying to put this equation with the author tag (Oppenheimer & Volkoff 1939) but the tag is too large to fit in one line. how do I put the equation and then the tag on the right side fitting in one line ?

\frac {dP}{dr}=- \frac {(P+\rho c^2 )\nu '} {2} \tag {Oppenheimer & volkoff 1939}

\documentclass[12pt,a4paper]{article}
\usepackage[a4paper, total={6in, 8in}]{geometry}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{fourier}
\begin {document}
\frac {dP}{dr}=\frac {-(P+\rho c^2 )\nu '} {2} \tag {Oppenheimer \& Volkoff 1939

\end{document}  

and it's simply not working.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • 3
    It fits in one line for me: http://i.stack.imgur.com/nQ7T8.png . Can you post a complete exaple starting from \documentclass{} and ending at \end{document}? –  Aug 05 '14 at 06:27
  • My answer to the closely related question might be of help: http://tex.stackexchange.com/questions/191993/how-to-properly-format-a-proof-explanation-with-multiple-points-of-alignment/192021#192021 – Bernard Aug 05 '14 at 09:57
  • First of all, type \tag{Oppenheimer \& Volkoff 1939}, as the simple & is an error when a literal ampersand is wanted. – egreg Aug 05 '14 at 09:58
  • @ Haqrish Kumar, can you please rewrite the code for me? unfortunately It's not fitting in my code – Tazkera Haque Trina Aug 05 '14 at 11:47

2 Answers2

3

Try this:

\documentclass[12pt,a4paper]{article} 
\usepackage[a4paper, total={6in, 8in}]{geometry} 
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage{amsmath}
\usepackage{fourier} 
\begin {document} 
\[
\frac{dP}{dr}=\frac{-(P+\rho c^2 )\nu'} {2} \tag {Oppenheimer \& Volkoff 1939}
\]
\end{document}

enter image description here

You forgot \[ ... \] and \usepackage{amsmath}.

1

Here is how I would do it:

\documentclass{article}

\usepackage{mathtools}
\usepackage{fourier}

\newcommand*\horse{\noindent Text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text.}
\newcommand*\differential{\mathop{}\!\mathrm{d}}
\newcommand*\diff[3][\differential]{\frac{#1 #2}{#1 #3}}


\begin{document} 

\horse
\begin{equation}
  \diff{P}{r}
  = \frac{-\left(P + \rho c^{2}\right)\nu'}{2} \tag{Oppenheimer \& Volkoff, 1939}
\end{equation}
\horse

\end{document}

output

Notice that this answer is somewhat similar to Papiro's in as much as I also use the \tag command.