summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/chngcntr/chngcntr.tex
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/chngcntr/chngcntr.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/chngcntr/chngcntr.tex')
-rw-r--r--macros/latex/contrib/chngcntr/chngcntr.tex77
1 files changed, 77 insertions, 0 deletions
diff --git a/macros/latex/contrib/chngcntr/chngcntr.tex b/macros/latex/contrib/chngcntr/chngcntr.tex
new file mode 100644
index 0000000000..76f40d0a63
--- /dev/null
+++ b/macros/latex/contrib/chngcntr/chngcntr.tex
@@ -0,0 +1,77 @@
+\documentclass[DIV=7, pagesize=auto]{scrartcl}
+
+\usepackage{fixltx2e}
+\usepackage{etex}
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage{microtype}
+\usepackage[unicode=true]{hyperref}
+
+\newcommand*{\pkg}[1]{\textsf{#1}}
+\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
+\makeatletter
+\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
+\makeatother
+\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
+\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
+\newcommand*{\oarg}[1]{\texttt{[}\meta{#1}\texttt{]}}
+\newcommand*{\ml}[1]{\leavevmode\marginline{\small#1}\ignorespaces}
+
+\reversemarginpar
+
+\addtokomafont{title}{\rmfamily}
+
+\title{The \pkg{chngcntr} package\thanks{This manual corresponds to \pkg{chngcntr}~v1.0a, dated~2009/09/02.}}
+\author{Author: Peter Wilson\and Maintainer: Will Robertson}
+\date{2018/04/09}
+
+
+\begin{document}
+
+\maketitle
+
+\section{Usage}
+
+In \LaTeX, a new counter called, say `\meta{ctr}', is created by the command
+\cmd{\newcounter}\marg{ctr}\oarg{within}. If the optional \meta{within} argument is given
+the the counter `\meta{ctr}' is reset to zero each time the counter `\meta{within}'
+changes. The command \cmd{\the\meta{ctr}} typesets the value of the counter \meta{ctr}.
+This is automatically defined by \cmd{\newcounter} and is initialised
+to typeset arabic numerals.
+
+\ml{\cmd{\counterwithin}\\\cmd{\counterwithin*}}
+It is sometimes desireable to change a counter that has been defined
+by \cmd{\newcounter}\marg{ctr} to act as though it had been defined as
+\cmd{\newcounter}\marg{ctr}\oarg{within}. The package provides the command
+\cmd{\counterwithin}\marg{ctr}\marg{within} that accomplishes this. By default,
+it also redefines the \cmd{\the\meta{ctr}} command so that it typesets values
+in the style \texttt{\cmd{\the\meta{within}}.\cmd{\arabic}\marg{ctr}}. The starred version of the
+command suppresses the redefinition of \cmd{\the\meta{ctr}}
+(e.\,g., \cmd{\counter\-within*}\verb+{ctr}{within}+).
+
+\ml{\cmd{\counterwithout}\\\cmd{\counterwithout*}}
+Likewise, the command \cmd{\counterwithout}\marg{ctr}\marg{within} changes a
+counter that has been created by \cmd{\newcounter}\marg{ctr}\oarg{within} to act
+as though it had been created by \cmd{\newcounter}\marg{ctr}. By default it
+also redefines the \cmd{\the\meta{ctr}} command so that it just typesets an arabic
+numeral. The starred version of the command suppresses the redefinition
+of \cmd{\the\meta{ctr}}.
+
+Any number of \cmd{\counterwithin}\marg{ctr}\marg{\ldots} and \cmd{\counterwith\-out}\marg{ctr}\marg{\ldots}
+commands can be issued for a given counter, \meta{ctr}, if you wish to toggle
+between the two styles. The current value of \meta{ctr} is unaffected by
+\cmd{\counterwithin} and \cmd{\counterwithout}. If you want to change the value
+after one of these commands, use \cmd{\set\-counter}\marg{ctr}\marg{\ldots}, and to change
+the typeseting style use \cmd{\renew\-command}\texttt{\{}\cmd{\the\meta{ctr}}\texttt{\}}\marg{\ldots}.
+
+
+\section{Change History:}
+
+\begin{tabular}{@{}l@{ -- }l@{}}
+ v1.0a & New maintainer (Will Robertson)\\
+ v1.1a & The package commands are now defined in the format
+\end{tabular}
+
+\end{document}
+