Bug in thesis classfile for LaTeX regarding \@currsize and the setspace package - "Undefined control sequence"

Okay, this is one of those posts that no one will care about except some poor dope coming in from google, who will be saved a couple hours of frustration.

I was having trouble with the thesis classfiles provided by the University of Calgary. They simply don't work as designed, and even the sample thesis will not compile correctly, mostly coming up with errors like:

! Undefined control sequence.
\setstretch …ef \baselinestretch {#1}\@currsize
l.34 \begin{singlespace}
The undersigned certify that they have read, and rec…

The problem isn't in line 34, nor does it have anything to do with setstretch and baselinestretch. Instead, the class authors must have used a nonstandard way of setting font sizes, and as a result, \@currsize never gets set!

The right way to fix this would be to set the font sizes in the proper way, but I don't have time to figure that out. A workaround is to use

\makeatletter
\let\@currsize\normalsize
\makeatother

at the first place any of the setspace commands are used, to make sure \@currsize is actually set. For my classfiles this was at the end of ucalgthes_root.cls itself. I just put \let\@currsize\normalsize there, since "@" already acts like a letter here.

There were some other bugs here as well. You need to use thesisyear instead of year in the paper information, and even though you set thesistitle to the title of the thesis, you will need to use the title command as well.

The last bug I have found so far is that \Huge was not working. You will need to change the line in thes12.clo from

\newcommand{\Huge}{\fontsizelet\@xxvpt{30pt}\selectfont}

to

\newcommand{\Huge}{\fontsize\@xxvpt{30pt}\selectfont}

which, as I've said, is probably the wrong way to set a font size, but it will work in its roundabout way.

As a LaTeX user, I really don't like diving into the innards of the program like this. They're quite nasty.

6 Responses to “Bug in thesis classfile for LaTeX regarding \@currsize and the setspace package - "Undefined control sequence"”

  1. John the Statistician John the Statistician Says:

    I use LaTeX, so I appreciate your notes, even as a regular reader. I haven't had to go to the extents that you have yet. If I had to, I might actually switch to Adobe and do the graphic designer thing.

  2. Sheona Sheona Says:

    Ummm . . . I use LaTeX gloves when I'm delivering babies, but other than that, I'm convinced you only speak ancient Egyptian.

  3. Kevin Kevin Says:

    Googling for information on LaTeX can be a real eye-opening experience.

  4. Recently leaked footage of the new Paris Hilton sex tape Recently leaked footage of the new Paris Hilton sex tape Says:

    naked a Paris Hilton naked sex videos exposed…

    Recently leaked footage of the new Paris Hilton sex tape…

  5. Kaushal Kaushal Says:

    You're a life saver. Thanks a lot!!

  6. vytdc tzmx vytdc tzmx Says:

    irmh rlsua qedhcmi pozakxbyc sligpjnw dfowz hmcor

Leave a Reply