diff options
author | Karl Berry <karl@freefriends.org> | 2009-05-19 18:54:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-05-19 18:54:54 +0000 |
commit | 2d248026682e0a02fa2b004a0ad2f13f57d8535c (patch) | |
tree | 7088bbd745de030191c2d843c4b3f4d9d5c46d91 /Master/texmf-dist/doc/latex/latex-tipps-und-tricks/verscnt.sty | |
parent | eecee5a57aa7fbeb22e0df8440fb3b06c5117fc7 (diff) |
move german latex docs out of texmf-doc
git-svn-id: svn://tug.org/texlive/trunk@13264 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/latex-tipps-und-tricks/verscnt.sty')
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-tipps-und-tricks/verscnt.sty | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/verscnt.sty b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/verscnt.sty new file mode 100644 index 00000000000..fdedb1c3dd1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/verscnt.sty @@ -0,0 +1,38 @@ +% verscnt.sty +% \begin{versenumber}[Start] +% \item Vers <Start> ... +% \item Vers <Start>+1 ... +% \item Vers <Start>+2 ... +% \end{versenumber} +% Start kann entfallen, Zaehlung dann fortlaufend +\RequirePackage{calc} + +% entweder (Nummer) oder (Kapitel--Nummer) +\@ifundefined{chapter} + {\newcounter{verscnt} + \renewcommand{\theverscnt} + {(\arabic{verscnt})}} + {\newcounter{verscnt}[chapter] + \renewcommand{\theverscnt} + {(\thechapter--\arabic{verscnt})}} +\setcounter{verscnt}{0} + +% damit Zaehler nicht mit 0 initialisiert wird +\newcommand{\myusecounter}[1] + {\@nmbrlisttrue\def\@listctr{#1}} + +% Verse mit \item einleiten +% optional: Start-Versnummer-1 +\newenvironment{versenumber}[1][\value{verscnt}] + {\begin{list} + {\theverscnt} + {\myusecounter{verscnt} + \setcounter{verscnt}{#1} + \@ifundefined{chapter} + {\settowidth{\labelwidth}{(999)}} + {\settowidth{\labelwidth}{(99--999)}} + \setlength{\labelsep}{1ex} + \setlength{\itemindent}{\labelwidth+\labelsep} + } + } + {\end{list}} |