summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-01-12 17:32:10 +0000
committerKarl Berry <karl@freefriends.org>2007-01-12 17:32:10 +0000
commit5f808ed3800d80a9057c944ba3f6a26493399642 (patch)
tree3a2b325175161fae638c8f39b78417096000199c /Master/texmf-dist/source
parent5b9498e7c4afd9ee9d00349d2d877f1aee917b02 (diff)
verse update (11jan07)
git-svn-id: svn://tug.org/texlive/trunk@3385 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/verse/verse.dtx87
-rw-r--r--Master/texmf-dist/source/latex/verse/verse.ins4
2 files changed, 81 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/verse/verse.dtx b/Master/texmf-dist/source/latex/verse/verse.dtx
index a4395e105fa..974def4d690 100644
--- a/Master/texmf-dist/source/latex/verse/verse.dtx
+++ b/Master/texmf-dist/source/latex/verse/verse.dtx
@@ -3,7 +3,7 @@
% verse.dtx
% Author: Peter Wilson (herries dot press at earthlink dot net)
% Herries Press
-% Copyright 2001--2006 Peter R. Wilson
+% Copyright 2001--2007 Peter R. Wilson
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -19,9 +19,22 @@
% This work consists of the files listed in the README file.
%
%<*driver>
-\documentclass{ltxdoc}
+\documentclass[twoside]{ltxdoc}
\usepackage{alltt}
\usepackage{verse}
+\usepackage[draft=false,
+ plainpages=false,
+ pdfpagelabels,
+ bookmarksnumbered,
+ hyperindex=false
+ ]{hyperref}
+\providecommand{\phantomsection}
+\show\makeatletter
+\makeatletter
+ \@mparswitchfalse
+\makeatother
+\renewcommand{\MakeUppercase}[1]{#1}
+\pagestyle{headings}
\EnableCrossrefs
\CodelineIndex
%%\OnlyDescription
@@ -33,7 +46,7 @@
%
% \fi
%
-% \CheckSum{524}
+% \CheckSum{555}
%
% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
% \DoNotIndex{\@centercr,\@cite}
@@ -85,6 +98,7 @@
% \changes{v2.21}{2004/03/21}{Made compatible with hangul package}
% \changes{v2.22}{2005/08/22}{Made compatible with hyperref package}
% \changes{v2.3}{2006/01/14}{Added switch for linenumber side}
+% \changes{v2.4}{2007/01/10}{Added code to start numbering at a given line}
%
% \def\dtxfile{verse.dtx}
% ^^A \def\fileversion{v1.0}
@@ -100,6 +114,7 @@
% \def\fileversion{v2.21} \def\filedate{2004/03/21}
% \def\fileversion{v2.22} \def\filedate{2005/08/22}
% \def\fileversion{v2.3} \def\filedate{2006/01/14}
+% \def\fileversion{v2.4} \def\filedate{2007/01/10}
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
@@ -376,6 +391,24 @@
% will number every fifth line. The default is |\poemlines{0}| which prevents
% any numbering.
%
+% \DescribeMacro{\setverselinenums}
+% The command \cs{setverselinenums}\marg{firstlinenum}\marg{startnumsat}
+% can be used to set the number of the first verse line to \meta{firstlinenum}
+% instead of the default `1' and to specify that the first printed line number
+% should be for line number \meta{startnumsat}. If used the command must be
+% given within the \texttt{verse} environment before the first line of the
+% verses. For example, if you were quoting portions of poems from a source
+% where the lines were numbered, your first line might be the 112th of the
+% original and that line was originally numbered: \\
+% \verb?\setverselinenums{112}{112}? \\
+% or if it was line 115 that was first numbered: \\
+% \verb?\setverselinenums{112}{115}?
+%
+% Note that the numbers must be such that the relationship \\
+% \verb?firstlinenum <= startnumsat < firstlinenum + poemlines? \\
+% holds.
+%
+%
% \DescribeMacro{\thepoemline}
% \DescribeMacro{\verselinenumfont}
% Lines are numbered via \cs{thepoemline} which defaults to typesetting
@@ -837,7 +870,7 @@
% \begin{macrocode}
%<*usc>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{verse}[2005/08/22 v2.22 verse typesetting]
+\ProvidesPackage{verse}[2007/01/10 v2.4 verse typesetting]
% \end{macrocode}
%
@@ -860,17 +893,22 @@
%
% \begin{macro}{vslineno}
% \begin{macro}{poemline}
+% \begin{macro}{\c@fvsline}
% \begin{macro}{modulo@vs}
% \begin{macro}{verse@envctr}
% \begin{macro}{\theHpoemlines}
% We need a counter for verse lines and poem lines, and one for unique
-% hyperref anchors (based on the verse environment).
+% hyperref anchors (based on the verse environment). Also one for specifying
+% the start of line numbering.
% \changes{v2.0}{2002/03/24}{Added poemline and modulo@vs counters}
% \changes{v2.22}{2005/08/22}{Added verse@envctr counter and
% \cs{theHpoemlines} for hyperref}
+% \changes{v2.4}{2007/01/10}{Added fvsline counter}
% \begin{macrocode}
\newcounter{vslineno}
\newcounter{poemline}
+\newcounter{fvsline}
+ \setcounter{fvsline}{0}
\newcounter{modulo@vs}
\newcounter{verse@envctr}\setcounter{verse@envctr}{0}
\newcommand*{\theHpoemline}{\arabic{verse@envctr}.\arabic{poemline}}
@@ -881,6 +919,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\poemlines}
% |\poemlines{|\meta{nth}|}| specifies that every \meta{nth} poem line
@@ -911,19 +950,51 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\setverselinenums}
+% \cs{setverslinenums}\marg{firstlinenum}\marg{startnumsat} sets the
+% number of the first verse line to be \meta{firstlinenum} and the
+% first line to be numbered to be \meta{startnumsat}. Note that
+% \verb?startnumsat < (firstlinenum + poemlines)?
+% \changes{v2.4}{2007/01/10}{Added \cs{setverselinenums}}
+% \begin{macrocode}
+\newcommand*{\setverselinenums}[2]{%
+% \end{macrocode}
+% Set the poemline counter to \verb?#1?.
+% \begin{macrocode}
+ \setcounter{poemline}{#1}\addtocounter{poemline}{\m@ne}%
+ \refstepcounter{poemline}%
+ \ifnum\c@modulo@vs>\z@
+% \end{macrocode}
+% If line numbers are to be printed, set \cs{c@fvsline} to a suitable
+% value so that the first number to be printed will be line \verb?#2?.
+% \begin{macrocode}
+ \@tempcnta #2\relax
+ \divide\@tempcnta\c@modulo@vs
+ \multiply\@tempcnta\c@modulo@vs
+ \c@fvsline #2\relax
+ \advance\c@fvsline-\@tempcnta
+ \fi}
+
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\getmodulo@vs}
% This returns either nothing or a poem line number for printing.
% \changes{v2.0}{2002/03/24}{Added \cs{getmodulo@vs}}
+% \changes{v2.4}{2007/01/10}{Modified \cs{getmodulo@vs} for specified start
+% of line numbers}
% \begin{macrocode}
\newcommand{\getmodulo@vs}{\bgroup
- \@tempcnta\c@poemline
- \ifnum\c@modulo@vs<\@ne % no line numbers
+ \ifnum\c@modulo@vs<\@ne% no line numbers
\else
- \ifnum\c@modulo@vs<\tw@ % number every line
+ \ifnum\c@modulo@vs<\tw@% every line numbered
\vlnumfont\thepoemline
\else
+ \@tempcnta\c@poemline
+ \advance\@tempcnta -\c@fvsline
\divide\@tempcnta\c@modulo@vs
\multiply\@tempcnta\c@modulo@vs
+ \advance\@tempcnta\c@fvsline
\ifnum\@tempcnta=\c@poemline\vlnumfont\thepoemline\fi
\fi
\fi
diff --git a/Master/texmf-dist/source/latex/verse/verse.ins b/Master/texmf-dist/source/latex/verse/verse.ins
index c01e47a65be..73557511a7f 100644
--- a/Master/texmf-dist/source/latex/verse/verse.ins
+++ b/Master/texmf-dist/source/latex/verse/verse.ins
@@ -1,7 +1,7 @@
%% verse.ins
%% Author: Peter Wilson (herries dot press at earthlink dot net
%% Herries Press
-%% Copyright 2001--2006 Peter R. Wilson
+%% Copyright 2001--2007 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -32,7 +32,7 @@
-----------------------------------------------------------------
Author: Peter Wilson (herries dot press at earthlink dot net)
Herries Press
- Copyright 2001--2006 Peter R. Wilson
+ Copyright 2001--2007 Peter R. Wilson
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either