summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/anonchap
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-04 00:53:50 +0000
committerKarl Berry <karl@freefriends.org>2009-09-04 00:53:50 +0000
commitcc8fa2bafb7e2225ff3f7171609c4f478b9cdd80 (patch)
tree488d48909cb1a830f8aae1c207db8f53979cd02e /Master/texmf-dist/tex/latex/anonchap
parentdd79f26375fa8e69a2f99406790fefe13208cd33 (diff)
anonchap update (2sep09)
git-svn-id: svn://tug.org/texlive/trunk@15062 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/anonchap')
-rw-r--r--Master/texmf-dist/tex/latex/anonchap/anonchap.sty82
1 files changed, 82 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/anonchap/anonchap.sty b/Master/texmf-dist/tex/latex/anonchap/anonchap.sty
new file mode 100644
index 00000000000..ded5f742424
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/anonchap/anonchap.sty
@@ -0,0 +1,82 @@
+% anonchap.sty
+%
+% Provides commands to make \chapter typeset like \section
+% DO NOT USE WITH THE TOCBIBIND PACKAGE (which also supplies these commands)
+%
+% Usage of this package is described after the source code, below.
+%
+% Author: Peter Wilson, Herries Press
+% Maintainer: Will Robertson (will dot robertson at latex-project dot org)
+% Copyright 1996--2000 Peter Wilson
+%
+% Released under the LaTeX Project Public License, v1.3c or later.
+% The current maintainer of this work is Will Robertson.
+%
+% CHANGE HISTORY
+% v1.1a - New maintainer (Will Robertson)
+%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{anonchap}[2009/08/03 v1.1a typeset chapter like section]
+
+\newcommand{\simplechapter}[1][\@empty]{%
+ \let\@tbiold@makechapterhead\@makechapterhead
+ \renewcommand{\@makechapterhead}[1]{%
+ \vspace*{50\p@}%
+ {\parindent \z@ \raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \Huge\bfseries #1\space\thechapter\simplechapterdelim\space
+ ##1\par\nobreak
+ \vskip 40\p@
+ }}
+}
+
+\newcommand{\restorechapter}{%
+ \let\@makechapterhead\@tbiold@makechapterhead
+}
+
+\newcommand{\simplechapterdelim}{}
+
+\endinput
+
+% Usage:
+% \simplechapter[<name>] and \simplechapterdelim{<delim>} act together
+% so that any subsequent \chapter commands, for example \chapter{First}
+% ... \chapter{Second}...,
+% will be typeset in the style of a \section (or numbered \chapter*) as:
+% <name> 1<delim> First
+% ...
+% <name> 2<delim> Second
+%
+% 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 \newcommand{\simplechapterdelim}{}.
+%
+% Extending the above example:
+% \simplechapter
+% \chapter{First}
+% ...
+% \renewcommand{\simplechapterdelim}{:}
+% \chapter{Second}
+% ...
+% \restorechapter % restore before issuing a modified \simplechapter
+% \simplechapter[Chap]
+% \chapter{Third}
+% ...
+% \restorechapter
+% \chapter{Fourth}
+% ...
+% Will be typeset as:
+% 1 First
+% ...
+% 2: Second
+% ...
+% Chap 3: Third
+% ...
+% Chapter 4
+% Fourth
+% ...
+%
+