3

I am learning to use the puthesis document class. I have the following code:

\documentclass[iupuiece,thesis]{puthesis}

\begin{document}
\title{The Theory of Everything}
\campus{West Lafayette}
\author{Kit}
\maketitle

Hello World!

\end{document}

Take note of the \author line. That won't work. Out of the blue, I tried this one, and it works:

\author{Kit}\

The documentation here does not say anything about the trailing \. Is this some consistency issue with LaTeX syntax?

Kit
  • 16,430

2 Answers2

21

A look in puthesis.cls shows that \author expects 2 arguments in this class:

\renewcommand*{\author}[2]{%
  \renewcommand*{\@@TitleAuthor}{#1}%
  \renewcommand*{\@@AbstractAuthor}{#2}%
}

So naturally everything explodes if this second argument is \maketitle.

Ulrike Fischer
  • 327,261
3

As Konrad Rudolph points out, there is no such thing as a trailing backslash. (With the usual category codes,) A backslash is an escape character, and must be escaping something. In this case, it's escaping the following line break, which, if I remember correctly, is usually interpreted to mean the same as an escaped space, which, again if I remember correctly, is used to tell TeX that you want exactly one space where it might otherwise put 0 or more than 1:

Mr.\ Not-a-sentence
$bad\ way\ to\ put\ text\ in\ math\ mode$

(UPDATE: Probably a better example is the traditional use to prevent space-swallowing after a macro, as in \TeX\ is fascinating.) As Ulrike points out above, your original document attempts to pass the macro \maketitle as the second argument to \author, which breaks somewhere down the line (presumably when \@@AbstractAuthor is used); whereas the fixed document instead passes the macro \<par> as the second argument, which'll probably compile, but will put a space everywhere the abstract-author's name might be expected.

LSpice
  • 1,448
  • 1
    Assuming nothing has changed the \endlinechar, the second argument being passed (what you called \<par>) is \^^M. – TH. Sep 12 '10 at 23:11
  • TH., thanks! I actually discovered this shortly after posting by reading another one of your comments (which I can no longer find). Am I correct that ^^M by default (say, in Plain TeX) has the same effect as \ ? – LSpice Sep 13 '10 at 05:11
  • 1
    @L Spice: Yes, that is correct; see p. 8 of the TeXbook, or search for "\def^^M" in plain.tex. – SamB Dec 18 '10 at 22:12