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.

Friends, a colleague of mine showed me a book with a intriguing chapter structure:

Content

I was wondering how we could achieve something similar. I understand that this unusual numbering will break the counters, and I don't expect the chapter numbers to be set automatically, but I'd like to see how it could work even with a manual chapter numbering assignment.

As a minimum working example, I wrote a single code with some chapters added:

\documentclass[oneside]{book}

\usepackage[T1]{fontenc}
\usepackage{lipsum}

\begin{document}

\tableofcontents

\chapter{Before the beginning} % Chapter -1

\lipsum[2]

\chapter{Much ado about nothing} % Chapter 0

\lipsum[2]

\chapter{Small is beautiful} % Chapter 0.000000001

\lipsum[2]

\chapter{All is one} % Chapter 1

\lipsum[2]

\chapter{Murdering irrationals} % Chapter \sqrt{2}

\lipsum[2]

\chapter{Golden Phi} % Chapter \Phi

\lipsum[2]

\end{document}

Any ideas?

share|improve this question
add comment

3 Answers

up vote 10 down vote accepted
\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.

share|improve this answer
1  
That's funny, I tried with \label and \ref and they worked perfecty! =) –  Paulo Cereda Jun 1 '11 at 12:19
    
Thanks, it's a nice solution for this question! BTW, I totally forgot about sections, glad you mentioned! –  Paulo Cereda Jun 1 '11 at 14:37
add comment

The chapter counter is of course numeric but the display of it is controlled by the \thechapter macro. You could simply redefine it manually before every chapter. You could also map the chapter counter values to strings (see the link in Seamus answer), but in this case I don't think it would be worth the effort.

Example:

\clearpage% to flush out last chapter page with correct header and footer
\renewcommand{\thecapter}{0.000001}
\chapter{Small is beautiful}
share|improve this answer
    
I forgot that the chapter is just a macro that you could redefine. This is much simpler... –  Seamus Jun 1 '11 at 11:57
    
Pretty straightforward code, Martin! I had no idea I could do that. –  Paulo Cereda Jun 1 '11 at 12:21
add comment

This is interesting, because the chapter number counter is an integer, so you couldn't just reset the counter to what you wanted before each chapter. I guess you could make a new enumeration scheme that just listed your chapter numbers in order like in this answer: Greek numbering

share|improve this answer
    
That's a very interesting approach, Seamus. I like the idea of iterating through an enumeration. =) –  Paulo Cereda Jun 1 '11 at 12:16
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.