I'm somewhat new to Latex and trying to use overleaf with a template I imported. However, I get the following error right at the beginning after \documentclass[12pt,chapterheads]{ucsd} is called.

Runaway definition?
->\let @mkboth \markboth \def @oddfoot {\hbox {}\hfil \rmfamily \thepage \ETC
File ended while scanning definition of \ps@plain.


No idea what it means. Can anyone help me out? I'm willing to answer any other questions needed to specify my problem.

  • Welcome to TeX - LaTeX! uscd.cls is not an official documentclass and it has an error (a missing }) in its definition of the "thesis" page style. I suggest you use a standard latex documentclass, see e.g. tex.stackexchange.com/q/782/15925 Dec 1, 2017 at 18:35
  • Ah so the missing bracket is in the class file, not the template?
    – Snek22
    Dec 1, 2017 at 18:40
  • Yes, it is the class file that is at fault. Dec 1, 2017 at 18:40
  • Thank you by the way. I want to use this class because its specifically made for the university's guidelines, so I'm going to try to find where the error is. I'm struggling though because \let "@mkboth \markboth \def @oddfoot" Does not appear in the class file.
    – Snek22
    Dec 1, 2017 at 18:42
  • The class is on git-hub at github.com/ucsd-thesis/ucsd-thesis, there it specifically says it is not an official style. Dec 2, 2017 at 10:13

1 Answer 1


The error is from the documentclass file uscd.cls. This is an unofficial document class available from git-hub at https://github.com/ucsd-thesis/ucsd-thesis. The error in the class file is a missing closing bracket } on line 1585. The definition the "thesis" page style should read:

% Definition of 'thesis' page style.
\def\@oddfoot{\hbox{}\hfil\rmfamily\thepage\hfil\hbox{}}% Pgno bot center
\def\@oddhead{}% heading (right)
\def\@evenhead{}% heading (left)
%\pagenumbering{arabic}}                    % (WBB)

note the final line. You should report this to the maintainer of the class.

I don't know the mechanisms of overleaf, you might be able to upload your own private copy of the file and make the change there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .