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 use \eqref as in the following, but instead of (1), I get a set of blank parentheses as the result. Could anyone help me fix the problem?

\documentclass[10pt]{article}  
\usepackage{amssymb}  
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage[left=1.5in,right=1.5in,bottom=1.5in,top=1.5in]{geometry}

\begin{document}  


\[
\begin{equation}\label{eq:2}
\begin{align*}
1\cdot 2+2\cdot 3+3\cdot 4+ \cdots+k\cdot(k+1)+(k+1)(k+2) &= \frac{(k+1)(k+2)(k+3)}{3}       \\
&= \frac{(k^2+3k+2)(k+3)}{3} \\
&= \frac{k^3+3k^2+3k^2+9k+2k+6}{3} \\
&= \frac{k^3+6k^2+11k+6}{3}.  
\end{align*}
\end{equation}
\]

assuming ~\eqref{eq:2} ...

\end{document}
share|improve this question
3  
Your document does not compile - that's the problem. –  Werner Jan 23 at 6:04

1 Answer 1

You're not allowed to use the equation or align* environments inside a display math \[...\] context. They create these themselves. Instead, use

enter image description here

\documentclass[10pt]{article}  
\usepackage{amsmath}
\usepackage[margin=1.5in]{geometry}
\begin{document}

\begin{equation}\label{eq:2}
  \begin{split}
    1\cdot 2+2\cdot 3+3\cdot 4+ \cdots+k\cdot(k+1)+(k+1)(k+2) &= \frac{(k+1)(k+2)(k+3)}{3}       \\
    &= \frac{(k^2+3k+2)(k+3)}{3} \\
    &= \frac{k^3+3k^2+3k^2+9k+2k+6}{3} \\
    &= \frac{k^3+6k^2+11k+6}{3}.  
  \end{split}
\end{equation}

assuming~\eqref{eq:2} ...

\end{document}

The above split usage follows directly from an example in the amsmath user guide (Table 3.1, p 4).

share|improve this answer
1  
it's also worth noting that a * on a display math environment suppresses the equation number. –  barbara beeton Jan 23 at 7:42

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.