summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/poemscol
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-08-27 22:08:16 +0000
committerKarl Berry <karl@freefriends.org>2012-08-27 22:08:16 +0000
commit1aa9f96a824274478f102d5a8fdc0c41b6f7092a (patch)
treea65fecd3434ffc55c5c3370dfa76cd4ac861d306 /Master/texmf-dist/tex/latex/poemscol
parent887a70c28d2ce68364f5f20f59e717875591c23e (diff)
poemscol (27aug12)
git-svn-id: svn://tug.org/texlive/trunk@27535 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/poemscol')
-rw-r--r--Master/texmf-dist/tex/latex/poemscol/poemscol.sty73
1 files changed, 39 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/poemscol/poemscol.sty b/Master/texmf-dist/tex/latex/poemscol/poemscol.sty
index 1e2c6d6d511..8e14ff22cb5 100644
--- a/Master/texmf-dist/tex/latex/poemscol/poemscol.sty
+++ b/Master/texmf-dist/tex/latex/poemscol/poemscol.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
\NeedsTeXFormat{LaTeX2e}[1997/12/01]
\ProvidesPackage{poemscol}
- [2011/08/30 v2.54 poemscol file]
+ [2012/08/30 v2.6 poemscol file]
@@ -121,19 +121,22 @@
\newcommand{\runoverindent}[1]{\global\edef\runoverindentvalue{#1}
}
\runoverindent{6em}
-\newenvironment{pmclverse}{%
+\newenvironment{pmclverse}[1][\linewidth]{%
\let\\=\@centercr%
-\list{}{\itemsep\z@ \itemindent -\runoverindentvalue\listparindent \itemindent
- \rightmargin 1sp\leftmargin 1sp\advance\leftmargin
- \runoverindentvalue}\item[]}
+\list{}{\itemsep\z@
+\itemindent -\runoverindentvalue
+\listparindent \itemindent
+ \ifdim #1 < \linewidth
+ \rightmargin \z@
+ \setlength{\leftmargin}{\linewidth}%
+ \addtolength{\leftmargin}{-#1}%
+ \addtolength{\leftmargin}{-0.5\leftmargin}%
+ \else
+ \rightmargin \leftmargin
+ \fi
+\advance\leftmargin\runoverindentvalue}
+\item[]}
{\endlist}
-\newif\ifrfv
-\rfvfalse
-\newcommand{\rightflushrunoververse}{\global\rfvtrue}
-\newcommand{\indentrunoververse}{\global\rfvfalse}
-\newenvironment{rfoverse}{\begin{pmclverse}}{\end{pmclverse}}
-\renewenvironment{verse}{\ifrfv\begin{rfoverse}\else\begin{pmclverse}\fi}
-{\ifrfv\end{rfoverse}\else\end{pmclverse}\fi}
\newcounter{verselinenumber}
\newcounter{printlineindex}
@@ -317,14 +320,16 @@
\itemsep\z@ \itemindent -\titleentryoverrun\listparindent \itemindent
\rightmargin 1sp\leftmargin 1sp\advance\leftmargin
\titleentryoverrun}\item[]}{\endlist}
-\newenvironment{poem}{\raggedright%
+\newlength{\versewidth}
+\newenvironment{poem}[1][\linewidth]
+{\raggedright%
\language=255%no hyphenation in verse
\noemendyettrue%
\noexplainyettrue%
\setcounter{verselinenumber}{0}\setcounter{printlineindex}{0}%
- \nobreak\begin{verse}%
+ \nobreak\begin{pmclverse}[#1]%
\inpoemtrue\nobreak\mark{\relax}%
- }{\end{verse}%
+ }{\end{pmclverse}%
\inpoemfalse\mark{\relax}%
\goodbreak\afterpoemskip%\bigskip
}
@@ -455,24 +460,20 @@
\numbersgutterfalse}
\newcommand{\putverselinenumber}{\nolinebreak\begin{marginenvironment}%
\nolinebreak%
- \ifnumbersswitch\pmclsidepar{\textrm{\scriptsize\theverselinenumber}}%
+ \ifnumbersswitch\pmclsidepar{\hfil\textrm{\scriptsize\theverselinenumber}}%
\else%
- \ifnumbersright\pmclrightsidepar{\textrm{\scriptsize\theverselinenumber}}%
+ \ifnumbersright\pmclrightsidepar{\hfil\textrm{\scriptsize\theverselinenumber}}%
\else%
- \pmclleftsidepar{\textrm{\scriptsize\theverselinenumber}}%
+ \pmclleftsidepar
+{\textrm{\scriptsize\theverselinenumber}\hfil}%
\fi%
\fi%
\nolinebreak%
\end{marginenvironment}%
\nolinebreak%
}
-
\newif\ifspeciallinelock
\speciallinelockfalse
-\newcounter{margnumbegin}
-\setcounter{margnumbegin}{0}
-\newcommand{\setmargnumbegin}[1]{\setcounter{margnumbegin}{#1}%
-\addtocounter{margnumbegin}{-1}}
\newcommand{\verseline}{\ifspeciallinelock%
\relax\else%
\nolinebreak\incrementverselinenumber%
@@ -483,13 +484,12 @@
\newcommand{\incrementverselinenumber}{%
\nolinebreak\addtocounter{verselinenumber}{1}%
\addtocounter{printlineindex}{1}%
-\ifnum\theverselinenumber>\themargnumbegin
\ifnum\theprintlineindex>\thelineindexrepeat%
\ifverselinenumbers\nobreak%
\putverselinenumber\nobreak%
\fi\nobreak%
\setcounter{printlineindex}{0}%
- \fi\fi%
+ \fi%
}
\newcommand{\setverselinemodulo}[1]{%
\setcounter{lineindexrepeat}{#1}%
@@ -798,15 +798,20 @@
\fi
\fi
}
-
+\newif\ifcentertitleson
+\newcommand{\centertitles}{\centertitlesontrue}
+\makeatletter
\newcommand{\set@p@emtitle}[6]{\setlength{\titleentryoverrun}{#6}%
{#2}%
-{#3 \begin{titleentryenvironment}{#4 #1}\end{titleentryenvironment}}%
+{#3 \begin{titleentryenvironment}%
+{\ifcentertitleson\begin{center}#4 #1\end{center}\else #4 #1\fi}%
+\end{titleentryenvironment}}%
{#5}%
\m@kep@emlabel
\m@ken@teholder{#1}%
\setlength{\titleentryoverrun}{\z@}}
+
\newcommand{\setcontentsleaders}[1]{%
\def\contentsleaders{#1\nobreak%
}}
@@ -1614,13 +1619,13 @@
\pmresetlemmacounters\unskip%
}
\makeatletter
-\appendtomacro{\poem}{\global\expandafter\csname no#1yettrue\endcsname}
+\appendtomacro{\endpoem}{\global\expandafter\csname no#1yettrue\endcsname}
\makeatother
\makeatletter
-\appendtomacro{\prosesection}{\global\expandafter\csname no#1yettrue\endcsname}
+\appendtomacro{\endprosesection}{\global\expandafter\csname no#1yettrue\endcsname}
\makeatother
\makeatletter
-\appendtomacro{\pmsection}{\global\expandafter\csname no#1yettrue\endcsname}
+\appendtomacro{\endpmsection}{\global\expandafter\csname no#1yettrue\endcsname}
\makeatother
\expandafter\newcommand\csname put#1s\endcsname{
@@ -2266,7 +2271,7 @@ r@#2\endcsname{}{}\@nil
\noemendyettrue
\noexplainyettrue
\setcounter{verselinenumber}{0}\setcounter{printlineindex}{0}
- \nobreak\begin{verse}
+ \nobreak\begin{pmclverse}
\inpoemtrue\nobreak\mark{\relax}}
% must end poem if parallel text. Don't worry,
% begin recto page and begin verso page will
@@ -2274,14 +2279,14 @@ r@#2\endcsname{}{}\@nil
% if it was finish recto page or finish verso page
% that closed the poem rather than your own declaration.
{\ifversopoemstillopen
- \end{verse}
+ \end{pmclverse}
\inpoemfalse\mark{\relax}
\else
\ifrectopoemstillopen
- \end{verse}
+ \end{pmclverse}
\inpoemfalse\mark{\relax}
\else
-\end{verse}
+\end{pmclverse}
\inpoemfalse\mark{\relax}
\goodbreak\afterpoemskip%\bigskip
\fi\fi }