summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/anonchap/anonchap.tex
blob: 54d417445e19bc60ee1249904d9d24a759f42a42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
\documentclass[DIV=8, pagesize=auto]{scrartcl}

\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{shortvrb}

\addtokomafont{title}{\rmfamily}
\MakeShortVerb{"}
\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}

\title{The \textsf{anonchap} package}
\author{Peter Wilson, Herries Press; \\ maintained by Will Robertson}
\date{2009/08/03}


\begin{document}

\maketitle

\begin{abstract}
  Provides commands to make "\chapter" typeset like "\section".
  \emph{Do not use with the \textsf{tocbibind} package} (which also supplies these commands).
\end{abstract}


\section{Change history}

\begin{description}
\item[v1.1a] New maintainer (Will Robertson)
\end{description}


\section{Usage:}

"\simplechapter["\meta{name}"]" and "\simplechapterdelim{"\meta{delim}"}" act together
so that any subsequent "\chapter" commands, for example
%
\begin{verbatim}
\chapter{First} ... \chapter{Second}...
\end{verbatim}
%
will be typeset in the style of a "\section" (or numbered "\chapter*") as:
%
\begin{quote}
  \meta{name} 1\meta{delim} First\\
  \ldots\\
  \meta{name} 2\meta{delim} Second
\end{quote}
%
A subsequent "\restorechapter" command will reset the "\chapter" typesetting
back to its default style.

Note that the argument to "\simplechapter" is optional, and that by default
"\simplechapterdelim" is defined as
%
\begin{verbatim}
\newcommand{\simplechapterdelim}{}
\end{verbatim}

\begin{samepage}
Extending the above example:
%
\begin{verbatim}
\simplechapter
\chapter{First}
...
\renewcommand{\simplechapterdelim}{:}
\chapter{Second}
...
\restorechapter   % restore before issuing
                  % a modified \simplechapter
\simplechapter[Chap]
\chapter{Third}
...
\restorechapter
\chapter{Fourth}
...
\end{verbatim}
%
Will be typeset as:
%
\begin{quote}
  1 First\\
  \ldots\\
  2: Second\\
  \ldots\\
  Chap 3: Third\\
  \ldots\\
  Chapter 4\\
  Fourth\\
  \ldots
\end{quote}
\end{samepage}

\end{document}