3

My TeX code is not compiling correctly (the overbrace is causing the error). How I can fix my file?

Here's what I have:

 \usepackage{amssymb}
 \usepackage{mathrsfs}
 \usepackage{amsmath}
 \usepackage{stackrel} 
 \usepackage[all,cmtip]{xy} 
 \usepackage{multicol} 
 \usepackage{mathtools}


 \begin{document}


 \[
 \xymatrix@-1pc{
 \stackrel{1}{\bullet} \ar[rr] & & \bullet & \overbrace{\cdots}^{N} & \bullet \ar[rr] & & \stackrel{k}{\bullet} \\ 
 }
 \] 



 \end{document}
2

Use an extra pair of braces:

\documentclass{article}
\usepackage{stackrel} 
\usepackage[all,cmtip]{xy} 
\usepackage{mathtools}

\begin{document}

\[
\xymatrix@-1pc{
 \stackrel{1}{\bullet} \ar[rr] & & \bullet & {\overbrace{\cdots}^{N}} & \bullet \ar[rr] & & \stackrel{k}{\bullet} \\ 
}
\] 

 \end{document}

enter image description here

In my example I didn't load packages that were not needed for the given code. Since you load mathtools, there's no need to load amsmath.

  • Thank you. I don't know much about which packages are necessary when texing so for the time-being, I just include them all. And yes, this answer will be accepted as the answer. – user45285 Feb 2 '14 at 19:12

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.