diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-29 22:52:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-29 22:52:33 +0000 |
commit | 6ba407cece356e54f1144fc1d9c3fd38a65a2c2e (patch) | |
tree | e473c8af06b48bceb4aa7b9822a24c047905a59b /Master/texmf-dist/source/latex/autonum/autonum.ins | |
parent | 9de37ad7dbd5b10933f4fc87f93ddf5a77501004 (diff) |
autonum (29may12)
git-svn-id: svn://tug.org/texlive/trunk@26721 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/autonum/autonum.ins')
-rw-r--r-- | Master/texmf-dist/source/latex/autonum/autonum.ins | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/autonum/autonum.ins b/Master/texmf-dist/source/latex/autonum/autonum.ins new file mode 100644 index 00000000000..623c434f7cb --- /dev/null +++ b/Master/texmf-dist/source/latex/autonum/autonum.ins @@ -0,0 +1,158 @@ +%% +%% This is file `autonum.ins', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% autonum.dtx (with options: `install') +%% ---------------------------------------------------------------- +%% autonum --- Automatic number referenced equations +%% E-mail: pat_h@web.de +%% Released under the LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% ---------------------------------------------------------------- +%% +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble +---------------------------------------------------------------- +autonum --- Automatic number referenced equations +E-mail: pat_h@web.de +Released under the LaTeX Project Public License v1.3c or later +See http://www.latex-project.org/lppl.txt +---------------------------------------------------------------- + +\endpreamble +\postamble + +Copyright (C) 2012 by Patrick Häcker <pat_h@web.de> + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License (LPPL), either +version 1.3c of this license or (at your option) any later +version. The latest version of this license is in the file: + +http://www.latex-project.org/lppl.txt + +This work is "maintained" (as per LPPL maintenance status) by +Patrick Häcker. + +This work consists of the file autonum.dtx +and the derived files autonum.ins, + autonum.pdf and + autonum.sty. + +\endpostamble +\usedir{tex/latex/autonum} +\generate{ + \file{autonum.sty}{\from{autonum.dtx}{package}} +} +\endbatchfile + +\newcommand{\csxdefaux}[2]{% +\protected@write\@mainaux{}{% +\expandafter\string\expandafter\xdef\expandafter\string\csname #1\endcsname{#2}% +}% +} + +\newcommand{\csxdefall}[2]{% +\csxdefaux{#1}{#2}% +\csxdef{#1}{#2}% +} + +\newcounter{autonum@counter} + +\newcommand{\autonum@patchEnvironment}[1]{ +\csletcs{autonum@#1Old}{#1}% +\csletcs{autonum@end#1Old}{end#1}% +\autonum@saveOldEnvironment{#1}% +\autonum@changeEnvironment{#1}% +} + +\newcommand{\autonum@saveOldEnvironment}[1]{ +\newenvironment{#1+}{% +\csuse{autonum@#1Old}% +}{% +\csuse{autonum@end#1Old}% +}% +} + +\newcommand{\autonum@changeEnvironment}[1]{ +\renewenvironment{#1}{% +\autonum@IfReferenced{\Roman{autonum@counter}}{% +\csuse{autonum@#1Old}% +}{% +\begin{#1*}% +}% +}{% +\autonum@IfReferenced{\Roman{autonum@counter}}{% +\csuse{autonum@end#1Old}% +}{% +\end{#1*}% +\ignorespacesafterend +}% +\stepcounter{autonum@counter}% +}% +} + +\AfterPreamble{ +\autonum@patchEnvironment{equation} +%% \forcsvlist{\autonum@patchEnvironment}{gather,multline,align.flalign,alignat} + +\ifcsundef{equation*}{% +\newenvironment{equation*}{\[}{\]}% +}{} + +\newcommand{\autonum@IfReferenced}[3]{% +\ifcsdef{autonum@#1Referenced}{#2}{#3}% +} + +\newcommand{\autonum@patchLabel}[1]{% +\letcs{\autonum@labelOld}{#1}% +\csdef{#1}##1{% +\csxdefall{autonum@##1Labeled}{\Roman{autonum@counter}}% +\autonum@labelOld{##1}% +}% +} +\ifdef{\label@in@display}{% +\autonum@patchLabel{label@in@display}% +}{% +\autonum@patchLabel{label}% +} + +\newcommand{\autonum@patchReference}[1]{% +\letcs{\autonum@referenceOld}{#1}% +\csdef{#1}##1{% +\ifcsdef{autonum@##1Labeled}{% +\csxdefall{autonum@\csuse{autonum@##1Labeled}Referenced}{}% +}{}% +\autonum@referenceOld{##1}% +}% +} +\autonum@patchReference{ref}% +\ifdef{\cref}{% +\autonum@patchReference{cref}% +}{}% +} + +%% +%% Copyright (C) 2012 by Patrick Häcker <pat_h@web.de> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License (LPPL), either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) by +%% Patrick Häcker. +%% +%% This work consists of the file autonum.dtx +%% and the derived files autonum.ins, +%% autonum.pdf and +%% autonum.sty. +%% +%% +%% End of file `autonum.ins'. |