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'm writing some course notes and through out I want to refer to the equation number in the book we are using, rather than numbering the equations within the document. In other words how can I decide for myself what the equation number should be? I've made a MWE below, but the problem is that it puts the equation number on the next line below the equation.

\documentclass[11pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
The density of states at $ \epsilon $ is
\begin{center}
$D_{e}(\epsilon)=\dfrac{1}{2\pi^{2}}\left(\dfrac{2m_{e}}
{\hbar^{2}}\right)^{3/2}\left(\epsilon-
E_{c}\right)^{1/2}$\end{center}\begin{flushright}\textrm{(8.37)}\end{flushright}
\end{document}

I want the equation number to be on line with the equation

share|improve this question

2 Answers 2

up vote 6 down vote accepted

You can use \tag and an equation environment:

\documentclass[11pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
The density of states at $ \epsilon $ is
\begin{equation}
D_{e}(\epsilon) = \frac{1}{2\pi^{2}}\biggl( \dfrac{2m_{e}}
{\hbar^{2}} \biggr)^{3/2} (\epsilon - E_{c} )^{1/2}
\tag{8.37}
\end{equation}
\end{document}

enter image description here

Notice also that I didn't use the \left, \right construct but the \biggl, \biggr commands instead.

If you have access to the original .tex document in which the equation appears, you could use the xr package to help you cross-reference the external expressions.

You could be interested in the following documents to help you typeset math expressions:

share|improve this answer

Just added to give a solution with better spacing:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

The density of states at $\epsilon$ is
\begin{equation}
  D_{e}(\epsilon)
  = \frac{1}{2\pi^{2}}
    {\mkern -4mu}\left(\frac{2m_{e}}{\hbar^{2}}\right)^{\mkern -4mu 3/2}
    (\epsilon - E_{c})^{1/2}
    \tag{8.37}
\end{equation}

\end{document}

output1

Also, all the unnecessary packages are removed.

Update

Incorporating Mico's suggestion gives the following:

\documentclass{article}

\usepackage{amsmath}
\usepackage{mleftright}

\begin{document}

The density of states at $\epsilon$ is
\begin{equation}
  D_{e}(\epsilon)
  = \frac{1}{2\pi^{2}}
    \mleft(\frac{2m_{e}}{\hbar^{2}}\mright)^{3/2}
    (\epsilon - E_{c})^{1/2}
    \tag{8.37}
\end{equation}

\end{document}

output2

share|improve this answer
    
Instead of adding the two instructions \mkern -4mu by hand to obtain better spacing, one could load the mleftright package and use \mleft and \mright instead of \left and \right. –  Mico Sep 29 at 5:04
    
@Mico I didn't knew of that package; thanks for the pointer. –  Svend Tveskæg Sep 29 at 11:06

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.