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.
2007-07-28 at 8.40 am
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.
2007-08-01 at 8.55 pm
Ummm . . . I use LaTeX gloves when I'm delivering babies, but other than that, I'm convinced you only speak ancient Egyptian.
2007-08-01 at 9.26 pm
Googling for information on LaTeX can be a real eye-opening experience.
2008-05-19 at 11.09 am
naked a Paris Hilton naked sex videos exposed…
Recently leaked footage of the new Paris Hilton sex tape…
2008-05-19 at 1.18 pm
You're a life saver. Thanks a lot!!
2008-07-21 at 3.32 am
irmh rlsua qedhcmi pozakxbyc sligpjnw dfowz hmcor
2009-11-27 at 4.48 am
I am one of those poor dopes from google :-) just wanted to say thanks, the thesis class file for my uni has exactly the same problem!
2010-02-13 at 4.12 am
Thanks for workaround. It helped me.
2010-03-31 at 7.03 pm
I'm another of those dopes from Google :) Thanks for the workaround! It saved me at least an hour!
2010-05-24 at 4.17 pm
I am another one of those poor dopes from google who just wasted half a day trying to figure out how to single space my bibliography. Thanks for setting me straight on this!
2010-11-23 at 11.52 am
Thanks a lot for taking the time to post this!
UC Berkeley thesis class has exactly the same bug. I added your fix:
\makeatletter
\let\@currsize\normalsize
\makeatother
in my thesis.tex, somewhere after \begin{document}, but before \include{chapter}
Now I can change the spacing in the tables in my dissertation. (I just insert \onehalfspacing right before \begin{tabular}.)
2011-01-19 at 11.15 am
Thank you! Poor dope from Google - this saved me so much time!
2011-05-30 at 9.46 am
Huge huge life saver…thanks!