summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/verse/verse.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/verse/verse.sty')
-rw-r--r--Master/texmf-dist/tex/latex/verse/verse.sty28
1 files changed, 20 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/verse/verse.sty b/Master/texmf-dist/tex/latex/verse/verse.sty
index 97720bca8bf..0f8648c9893 100644
--- a/Master/texmf-dist/tex/latex/verse/verse.sty
+++ b/Master/texmf-dist/tex/latex/verse/verse.sty
@@ -9,7 +9,7 @@
%% -----------------------------------------------------------------
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2005 Peter R. Wilson
+%% Copyright 2001--2006 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -43,18 +43,22 @@
}
\poemlines{0}
-\newcommand{\getmodulo@vs}{{\@tempcnta\c@poemline
+\newcommand*{\verselinenumfont}[1]{\def\vlnumfont{#1}}
+\verselinenumfont{\rmfamily}
+
+\newcommand{\getmodulo@vs}{\bgroup
+ \@tempcnta\c@poemline
\ifnum\c@modulo@vs<\@ne % no line numbers
\else
\ifnum\c@modulo@vs<\tw@ % number every line
- \thepoemline
+ \vlnumfont\thepoemline
\else
\divide\@tempcnta\c@modulo@vs
\multiply\@tempcnta\c@modulo@vs
- \ifnum\@tempcnta=\c@poemline\thepoemline\fi
+ \ifnum\@tempcnta=\c@poemline\vlnumfont\thepoemline\fi
\fi
\fi
-}}
+\egroup}
\newif\ifaltindent
\altindentfalse
@@ -77,8 +81,7 @@
\newcommand{\flagverse}[1]{\hskip-\vleftskip\llap{#1}\hskip\vleftskip\ignorespaces}
-\newcommand{\verselinebreak}[1][\z@]{\newline\hspace*{#1}% extra verseindent
-}
+\newcommand*{\verselinebreak}[1][\z@]{\newline\hspace*{#1}\ignorespaces}
\newcommand{\incr@vsline}{%
\refstepcounter{poemline}%
\stepcounter{vslineno}}
@@ -86,9 +89,18 @@
\newcommand{\@vsifbang}[1]{\@ifnextchar !{\@firstoftwo{#1}}}
\newcommand{\@vsifgt}[1]{\@ifnextchar >{\@firstoftwo{#1}}}
+\newcommand*{\@vstypelinenumright}{%
+ \hfill\rlap{\kern\vrightskip\kern\rightmargin\getmodulo@vs}}
+\newcommand*{\@vstypelinenumleft}{%
+ \hfill\rlap{\kern-\textwidth\kern-\vrightskip\getmodulo@vs}}
+\newcommand*{\verselinenumbersright}{\def\@vstypelinenum{\@vstypelinenumright}}
+\newcommand*{\verselinenumbersleft}{\def\@vstypelinenum{\@vstypelinenumleft}}
+\verselinenumbersright
+
\newcommand{\@vscentercr}{%
\ifhmode \unskip\else \@nolnerr\fi
- \hfill\rlap{\kern\vrightskip\kern\rightmargin\getmodulo@vs}%
+ \@vstypelinenum%
+%%%% \hfill\rlap{\kern\vrightskip\kern\rightmargin\getmodulo@vs}%
\@vsifgt{\verselinebreak}{%
\incr@vsline
\par\@ifstar{\nobreak\@vsxcentercr}{%