summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/anonchap
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/anonchap
Initial commit
Diffstat (limited to 'macros/latex/contrib/anonchap')
-rw-r--r--macros/latex/contrib/anonchap/anonchap.pdfbin0 -> 191020 bytes
-rw-r--r--macros/latex/contrib/anonchap/anonchap.sty82
-rw-r--r--macros/latex/contrib/anonchap/anonchap.tex96
3 files changed, 178 insertions, 0 deletions
diff --git a/macros/latex/contrib/anonchap/anonchap.pdf b/macros/latex/contrib/anonchap/anonchap.pdf
new file mode 100644
index 0000000000..5d82345646
--- /dev/null
+++ b/macros/latex/contrib/anonchap/anonchap.pdf
Binary files differ
diff --git a/macros/latex/contrib/anonchap/anonchap.sty b/macros/latex/contrib/anonchap/anonchap.sty
new file mode 100644
index 0000000000..ded5f74242
--- /dev/null
+++ b/macros/latex/contrib/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
+% ...
+%
+
diff --git a/macros/latex/contrib/anonchap/anonchap.tex b/macros/latex/contrib/anonchap/anonchap.tex
new file mode 100644
index 0000000000..54d417445e
--- /dev/null
+++ b/macros/latex/contrib/anonchap/anonchap.tex
@@ -0,0 +1,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}