Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Did you put a space after the trailing \\? –  Mikael Vejdemo-Johansson Sep 12 '10 at 14:10
7  
“Won’t work” is a very vague description: There should be no need for a backslash in this place. A concept “trailing backslash” doesn’t exist at all in LaTeX. –  Konrad Rudolph Sep 12 '10 at 14:17
add comment

2 Answers

up vote 20 down vote accepted

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.

share|improve this answer
4  
Two arguments to \author is just a bad UI design. I wish all class writers would listen to Boris Veytsman –  Aditya Sep 15 '10 at 4:47
add comment

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.

share|improve this answer
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 \ ? –  L Spice Sep 13 '10 at 5: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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.