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.

31 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

  7. James James Says:

    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!

  8. Iakov Davydov Iakov Davydov Says:

    Thanks for workaround. It helped me.

  9. Aaron Aaron Says:

    I'm another of those dopes from Google :) Thanks for the workaround! It saved me at least an hour!

  10. ben ben Says:

    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!

  11. Lacra Lacra Says:

    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}.)

  12. John John Says:

    Thank you! Poor dope from Google - this saved me so much time!

  13. chandler chandler Says:

    Huge huge life saver…thanks!

  14. kevin kevin Says:

    Thanks for sharing! I fixed it by putting your code right after \usepackage{setspace}

  15. Yuval Yuval Says:

    Many thanks!

  16. Paul Ivanov Paul Ivanov Says:

    One such "poor dope coming in from google" here - thanks for this post! (now back to my regularly scheduled thesis writing)

  17. Mike Mike Says:

    Thank you so much! This saved me a lot of time!
    Sincerely,
    Another poor dope coming in from Google, albeit one who is now this much closer to having a completed dissertation

  18. sekt bei aldi sekt bei aldi Says:

    Jener Hugo Sekt handel zählt auch zu den stabilsten Branchen". Welche Haut und welche Haare brauchen besonders nötig Zink. Dezember 2010 - Welche Mitgliedstaaten der Europäischen Union haben für sich in Brüssel mitsamt neue Kennzeichnungsvorschriften fuer Hugo Sekt geeinigt.

  19. link link Says:

    I couldn't resist commenting. Very well written!

    my homepage; link

  20. plus size maxi dresses plus size maxi dresses Says:

    Oh my goodness! Amazing article dude! Thank you, Howevver I aam
    experiencing troubles with your RSS. I don't know the reason why I am unable to subscribe to it.
    Is there anyone else having the same RSS issues? Anybody
    who knows the solution can you kindly respond? Thanx!!

  21. mardi gras fancy dress mardi gras fancy dress Says:

    These are genuinely impressive ideas in about blogging.
    You have touched some good things here. Any
    way keep up wrinting.

  22. how much is tv advertising how much is tv advertising Says:

    Sweet blog! I found it while searching on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News?
    I've been trying for a while but I never seem to get there!

    Cheers

  23. where can i find cute dresses where can i find cute dresses Says:

    With havin so much contentt do you ever run into any issues of
    plagorism oor copyright infringement? My site has a lot of
    completely unique content I've either authored myself or outsourced but it seems a lot of
    it is popping it up all oover the internet without my permission.
    Do you know any solutions to help prevent content from being stolen? I'd certainly appreciate it.

  24. Milla Milla Says:

    What's up it's me, I am also visiting this web site regularly, this web page is
    really pleasant and the users are truly sharing pleasant thoughts.

  25. notes notes Says:

    Amino acid supplements are another group of dietary supplements that can help in boosting muscle mass.

    See it as a good insurance policy to add to your healthy diet.
    The supplements add to the benefits of the fitness exercises.

  26. Lael Lael Says:

    Great delivery. Great arguments. Keep up the great spirit.

  27. Tetsuya Tetsuya Says:

    I've just read that you should have deuscssid your PhD thesis on Monday this week. I hope it went all all rigth. Sorry, i'm going to introduce myself. I'm Consuelo Beschi, a PhD in Bergamo, Italy. I'm very interested in the paper you wrote for the WCEE, titled Nonlinear Finite Element Analysis of Seismically Deficient Reinforced Concrete Exterior Beam-Column Joints Subjected to Reversed Cyclic Loading . The problem is that some of the pdf files in the WCEE key don't work, I can't opern your paper. I kindly ask you to sent me a pdf copy. My e-mail address is email hidden; JavaScript is required/* */.Thank you very muchBest regards and have a nice after-PhD dissertation holiday!Consuelo

  28. ?????? ?????? Says:

    ??????

  29. http://juridicointernacional.com/whenirentacardoineedtheinsurance.html http://juridicointernacional.com/whenirentacardoineedtheinsurance.html Says:

    Until I found this I thought I'd have to spend the day inside.

  30. http://tinyurl.com http://tinyurl.com Says:

    Hi there mates, nice paragraph and pleasant urging commented here, I am
    genuinely enjoying by these.

  31. ??3kg????? ??3kg????? Says:

    ??????
    ?????????????????????????????3???????????
    ?????????????????????????
    ???????????????????????????

Leave a Reply