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.

  • 3
    It fits in one line for me: i.stack.imgur.com/nQ7T8.png . Can you post a complete exaple starting from \documentclass{} and ending at \end{document}? – user11232 Aug 5 '14 at 6:27
  • My answer to the closely related question might be of help: tex.stackexchange.com/questions/191993/… – Bernard Aug 5 '14 at 9:57
  • First of all, type \tag{Oppenheimer \& Volkoff 1939}, as the simple & is an error when a literal ampersand is wanted. – egreg Aug 5 '14 at 9:58
  • @ Haqrish Kumar, can you please rewrite the code for me? unfortunately It's not fitting in my code – Tazkera Haque Trina Aug 5 '14 at 11:47
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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