summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/etaremune
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:55:07 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:55:07 +0000
commita8f7dd2188a3be7ad9bacf511a79c28c2de2f14a (patch)
tree48a676506be88dac13ba3bdaf49bd02d5dc9d242 /Master/texmf-dist/tex/latex/etaremune
parentaf54ed537302d7d2488a3bc7ab7ce69d207c49f9 (diff)
etaremune
git-svn-id: svn://tug.org/texlive/trunk@879 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/etaremune')
-rw-r--r--Master/texmf-dist/tex/latex/etaremune/etaremune.sty98
1 files changed, 98 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/etaremune/etaremune.sty b/Master/texmf-dist/tex/latex/etaremune/etaremune.sty
new file mode 100644
index 00000000000..f860abc4b77
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/etaremune/etaremune.sty
@@ -0,0 +1,98 @@
+%%
+%% This is file `etaremune.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% etaremune.dtx (with options: `etaremune')
+%%
+%% ----------------------------------
+%% Copyright (C) 2005 Hendri Adriaens
+%% ----------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Hendri Adriaens.
+%%
+%% This work consists of the file etaremune.dtx and the
+%% derived file etaremune.sty.
+%%
+%% The following files constitute the etaremune package and must be
+%% distributed as a whole: readme, etaremune.dtx, etaremune.pdf and
+%% etaremune.sty.
+%%
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{etaremune}[2005/06/01 v1.2 Reversed enumerate (HA)]
+\RequirePackage{xkeyval}
+\def\@tempa#1#2{%
+ \DeclareOptionX{#1}{\presetkeys[EM]{template}{#1=##1}{}}%
+ \define@key[EM]{template}{#1}{\setlength#2{##1}}%
+}
+\XKV@for@n{topsep,partopsep,itemsep,parsep,leftmargin,rightmargin,%
+ listparindent,itemindent,labelwidth,labelsep}\@tempb{%
+ \edef\@tempb{%
+ {\@tempb}\expandafter\noexpand\csname\@tempb\endcsname
+ }%
+ \expandafter\@tempa\@tempb
+}
+\DeclareOptionX*{%
+ \PackageWarning{etaremune}{Unknown option `\CurrentOption'}%
+}
+\ProcessOptionsX
+\define@cmdkey[EM]{etaremune}[EM@]{start}{}
+\presetkeys[EM]{etaremune}{start=-1}{}
+\newcounter{EM@itemctr}
+\newcounter{EM@etaremunectr}
+\newenvironment{etaremune}[1][]{%
+ \ifnum\@enumdepth>\thr@@\@toodeep\else
+ \setkeys*[EM]{etaremune}{#1}%
+ \advance\@enumdepth\@ne
+ \stepcounter{EM@etaremunectr}%
+ \edef\EM@currnum{\the\c@EM@itemctr}%
+ \edef\EM@currlist{\romannumeral\c@EM@etaremunectr}%
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+ \setcounter{EM@itemctr}\z@
+ \let\EM@step\m@ne
+ \ifnum\EM@start<\z@
+ \@ifundefined{etaremune@\EM@currlist}{%
+ \let\EM@step\@ne
+ \setcounter\@enumctr\m@ne
+ \gdef\EM@rerun{%
+ \@latex@warning@no@line{Etaremune labels have changed.^^J
+ \@spaces\@spaces\@spaces\space\space Rerun to get them right}%
+ }%
+ }{%
+ \setcounter\@enumctr{\csname etaremune@\EM@currlist\endcsname}%
+ }%
+ \else\setcounter\@enumctr\EM@start\fi
+ \stepcounter\@enumctr
+ \list{%
+ \addtocounter\@enumctr\EM@step
+ \ifnum\csname c@\@enumctr\endcsname<\z@\setcounter\@enumctr\z@\fi
+ \stepcounter{EM@itemctr}%
+ \xdef\@currentlabel{%
+ \csname p@\@enumctr\endcsname\csname the\@enumctr\endcsname
+ }%
+ \csname label\@enumctr\endcsname
+ }{\def\makelabel##1{\hss\llap{##1}}\setrmkeys[EM]{template}}%
+ \fi
+}{%
+ \endlist
+ \immediate\write\@auxout{\string\gdef\expandafter\string
+ \csname etaremune@\EM@currlist\endcsname{\the\c@EM@itemctr}%
+ }%
+ \setcounter{EM@itemctr}\EM@currnum
+}
+\AtEndDocument{\EM@rerun}
+\let\EM@rerun\relax
+\endinput
+%%
+%% End of file `etaremune.sty'.