[texhax] how to access author and title in book class

Niall Mansfield texhax at uit.co.uk
Sun Jan 2 18:05:05 CET 2011


How can I access or print the author and title of a book?
(I am using book.cls).

It seems that the \@author macro is zeroed by \maketitle
so that once the title page of the book has been printed,
\@author is useless.

This is my workaround -- use one's own macro to 
keep an accessible version of the author (and title).
It seems ugly.  Is there a "proper" way to do it instead?

\newcommand{\mycopyoftitle}{A Little Book of Energy and Carbon Emissions}
\title{\mycopyoftitle}
\newcommand{\mycopyofauthor}{Nicola Terry}
\author{\mycopyofauthor}

	Thanks,
	Niall


More information about the texhax mailing list