1.6.12

Setting arbitrary chapter values



Content
\documentclass[a4paper]{book}
\newcommand{\strangechapter}[1]{\renewcommand{\thechapter}{#1}\chapter}
\usepackage{hyperref}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\strangechapter{1}{X}
\strangechapter{$\pi$}{Y}
\end{document}
Use \label and \ref for the chapters with some care.
A definition in the preamble is preferable, since it forces the user to express the argument, without forgetting \renewcommand before \chapter. Moreover it provides a hook for enhancements of various type.
Don't forget to redefine \thesection, since "as we saw in section e.5" can be funny.

No hay comentarios:

Publicar un comentario