I am in the middle of writing a much needed report template and have hit more than a wall and cannot seem to figure out why some of the macros aren't loading. The two main files are massive and I can't post the full things but will gladly edit with anything else necessary or email if needed!

When I compile the document I am getting the following errors:

line 97: Undefined control sequence \tableofcontents
line 100: Undefined control sequence \listoffigures
line 103: Undefined control sequence \listoftables
line 1: Undefined control sequence \begin{abstract}
line 1: Undefined control sequence \begin{thebibliography}{1}

In my preamble, I have the following code...


% Use the My Style (Listing of options here)
%\usepackage[]{MYreport} % for final copy
\usepackage[draft]{MYreport} % for working copy

I thought that adding documentclass{report} would load all of the default macros unless I redefined them in my .sty file.

When looking at the .sty file, this is how it reads at the top:

% Report class loaded in main document to act as a base so we don't need to create EVERYTHING
\ProvidesPackage{MYreport}[2014/05/23 Technical Reports]
\typeout{My Technical Report Style, $Revision: 1.0 $, by B*** D. L*** (***@***.com)}


... and the very end reads:

% Set the page margins

Does anyone know where I should begin to look or why all of these defaults are not loading? I will edit with any and all requests for code to get this back on track. It really is appreciated.

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Stephan Lehmke May 21 '14 at 19:52
  • At the beginning of the .log file, there should be some info whether the file report.cls was found and where. Check the file path, just in case you accidentally created a file of this name :-) – Stephan Lehmke May 21 '14 at 19:54
  • Furthermore, Undefined control sequence \begin{abstract} isn't really the typical LaTeX error message. Are you getting these error messages from some workflow tool? It would be more informative if you could quote the original error messages from the .log file. – Stephan Lehmke May 21 '14 at 19:57
  • 2
    I get this kind of error a lot when there is a typo in the preceeding text. Are you sure you're not just missing a bracket or something in the preamble (i.e. in your .sty file)? – FionaSmith May 21 '14 at 20:04
  • 1
    Here's the culprit: ! Undefined control sequence. \@makeschapterhead ...s \sei@adjustchapterspacing #1\par \nobreak \vskip 40\... l.97 \tableofcontents The missing command is \sei@adjustchapterspacing, not \tableofcontents. Reading TeX error messages is tricky; apparently TeXstudio doesn't cope. – Stephan Lehmke May 21 '14 at 20:40

I was able to fix this issue thanks to several of you! It turns out I didn't properly escape one bracket in one of my custom definitions on top of missing the adjustcharacterspacing command I got rid of a few days before. After removing the two of those, everything compiles great again. It is amazing how two simple problems can cause such large numbers of errors!

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.