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 wasn't having any problem with my .tex file, but after compiling a separate document - which used a different document class - my current file no longer loads.

Specifically, I was using the imsart document class, compiled a separate file in the biom class, and now my imsart file won't load. The error I'm getting is:

(c:/Program Files/PCTeX/PCTeXv6/texmf-dist/tex/latex/lm/ot1lmss.fd)
! Undefined control sequence.
<argument> \bibsep 

 l.66 \begin{document}

I've tried moving the \begin{document} around but that doesn't do anything. I'm almost 100% sure it has something to do with the natbib package, but I can't figure out what. What's bothersome is that no edits were made to the file, and it was just after compiling the other class file that my file won't work.

I've checked to make sure I'm compiling a LaTeX pdf file, as I was before.

The basic code is here, which gives the same error, is virtually copied from the imsart class website:

\documentclass[aoas,preprint]{imsart}
\RequirePackage[OT1]{fontenc}
\RequirePackage{amsthm,amsmath}
\RequirePackage[numbers]{natbib}
\RequirePackage[colorlinks,citecolor=blue,urlcolor=blue]{hyperref}
\startlocaldefs
\numberwithin{equation}{section}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\endlocaldefs
\begin{document}
\section{Ordinary text}
  It is interesting that simulations with the \cite{r4} model worked well
 \begin{thebibliography}{9}
 \bibitem{r4}
\textsc{Prokhorov, Yu.} (1956).
Convergence of random processes and limit theorems in probability
theory. \textit{Theory  Probab.  Appl.}
\textbf{1} 157--214.
\MR{84896}
\end{thebibliography}
\end{document}
share|improve this question
3  
Your document compiles fine for me. Try deleting your .aux file and compile again. BTW: Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  karlkoeller Oct 2 '13 at 4:50
    
The title of your question is misleading as the error message that you show is not that \begin{document} is undefined. The undefined command is \bibsep (which is not a command I recognose) –  David Carlisle Oct 2 '13 at 8:33
    
I tried deleting the .aux file and compiling. No luck! –  Mike Oct 2 '13 at 12:41
    
i've changed the title. the error occurs at \begin{document} but that is not the error. the undefined control sequence is \bibsep. –  barbara beeton Oct 2 '13 at 13:43
    
Can you point a source for your version of imsart.cls? The one I have bears a release date 2010/04/27. And no error appears with your input, even if I effectively use natbib with a mock .bib file. Of course, if you type in directly the thebibliography environment, you don't need to load natbib, which could solve your problem. –  egreg Oct 2 '13 at 13:56

2 Answers 2

this may or may not be helpful. i don't have imsart to check.

the undefined command is \bibsep. it is a length defined in natbib.sty, and depends on the length \@listi (the width of the space allotted for a first-level item label) being defined already.

for the basic article class, \@listi is defined in the files size1*.clo, and depends on the command \normalsize being invoked; other class files may set it differently, including delaying the setting until \AtBeginDocument. if the setting of \@listi is deferred, that would explain why the error occurs at \begin{document}. this appears affect only the [numbers] option.

you can check in imsart.cls whether \normalsize is invoked immediately, or the setting of \@listi is delayed. if you determine that this is the case, i think your next action should be to inform the creator/distributor of imsart.cls that the [numbers] option of natbib is incompatible.

share|improve this answer

I don't have the imsart class loaded, but If I change the class to article as,

\documentclass{article}

Then comment out these two lines, which I'm not sure you need?

% \startlocaldefs
% \endlocaldefs

And then comment out this one line, with an unfamiliar command,

% \MR{84896}

Your document compiles fine. You might check and make sure that the imsart class file is in your tex tree or in the same folder, but other than that, do you need these lines?

share|improve this answer
    
Thanks Chris: The imsart .cls file is in the same directory as my .tex folder. The file compiles perfectly when I remove the " \RequirePackage[numbers]{natbib}"...but of course I've built up a large natbib directory which I'm hoping to use! –  Mike Oct 2 '13 at 12:23

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.