I'm using a customised (not by me) document class called geogthesis to produce my Geography PhD thesis.

When I compile the file I get an error saying:

Undefined control sequence. [\begin{abstract}]

However, the PDF actually builds fine, and includes the abstract - which is strange. Still, I'd like to get rid of the error (errors when building my thesis scare me!)

I'm using the LaTeX file below, combined with the geogthesis.cls file:


\title      {TITLE HERE}
\authors    {\texorpdfstring{\href{mailto:r.t.wilson@soton.ac.uk}{Robin Wilson}}{}}
\supervisor {\texorpdfstring {\href{mailto:blah@soton.ac.uk}{Blah}}{}}
\cosupervisor {\texorpdfstring {\href{mailto:blah@soton.ac.uk}{Blah}}{}}
\addresses  {\deptname\\\univname}
\date       {\today}
\subject    {Remote Sensing}
\keywords   {keywords}

\small{Blah blah}


Main text here!

  • the reason the text of the abstract appeared is that the control sequence reported as undefined is simply ignored, but the text following it isn't. however, as noted by daleif, \small doesn't take an argument, so your "Main text here!" would also appear in small type, unless the \mainmatter command reset the primary font. Jun 11 '13 at 12:20

Remember `\small does not take arguments.

There is at least one error in that class.

\btypeout{Abstract Page}
{\normalsize \UNIVNAME \par}
{\normalsize {ABSTRACT} \par}
{\normalsize \FACNAME \par}
{\normalsize \DEPTNAME \par}
{\large Doctor of Philosophy (PhD)\par}
\medskip % <-- typo said \medsckip
{\normalsize\bf \@title \par}
{\normalsize by \authornames \par}

  • Changing the abstract bit of the class as you suggested didn't seem to work, but changing \renewenvironment{abstract} to \newenvironment{abstract} made it all work with no errors. Thank you!
    – robintw
    Jun 11 '13 at 12:16
  • Actually, adding the Table of Contents back into the document (I had deliberately made the smallest, simplest example for this question) gives me various errors like You can't use \spacefactor' in vertical mode. [\tableofcontents]` and Missing $ inserted. [\tableofcontents]. From what I can see elsewhere online, this may be caused by problems with @'s. I don't really understand how this works, but I've tried removing the \makeatletter and \makeatother commands and that hasn't fixed it. I can't find any \makeatletter or \makeatother commands in the cls file. Any ideas?
    – robintw
    Jun 11 '13 at 12:25
  • Don't mess with/remove things if you do not know what they do. Add the above to the preamble and your example compiles just fine. The \make... pair is needed because the code contain @ in their name indicating these are internal.
    – daleif
    Jun 11 '13 at 12:29
  • Delete the .aux and the .toc files and recompile, then \tableofcontents works just fine for me.
    – daleif
    Jun 11 '13 at 12:30
  • Should the code above be in the preamble then? I assumed it was meant to replace the equivalent bit in the geogthesis.cls file. I've tried including it in the preamble and using the original geogthesis.cls file that I linked to in my original question, and it all compiles fine. Thank you. What is the best way to get these modifications into the original class file? I'd like to send a fixed version back to my colleague who generally distributes it to PhD students in the department.
    – robintw
    Jun 11 '13 at 12:36

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.