summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/poetrytex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-23 22:47:09 +0000
committerKarl Berry <karl@freefriends.org>2014-08-23 22:47:09 +0000
commit3045d9add41e90eba12baa4f6449b6669a43d2b9 (patch)
tree8f0f603b7bd071d61ef9ee88b1153806dc6ec3ff /Master/texmf-dist/tex/latex/poetrytex
parente13d3a1a15e5a9c08be12384c74b2e60e3803f6f (diff)
poetrytex (23aug14)
git-svn-id: svn://tug.org/texlive/trunk@35028 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/poetrytex')
-rw-r--r--Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty40
1 files changed, 33 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
index 3b8ccb7512e..ee7e12930c1 100644
--- a/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
+++ b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
@@ -19,7 +19,7 @@
%% LaTeX version 2008/05/04 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
-\ProvidesPackage{poetrytex}[2013/02/13]
+\ProvidesPackage{poetrytex}[2013/08/17]
\RequirePackage{expl3}
\RequirePackage{tocloft}
\AtEndOfPackage{\RequirePackage{hyperref}}
@@ -55,6 +55,8 @@
\newcounter{absolutepoemnum}
\newcounter{untitledpoemnum}
\newcounter{absoluteuntitledpoemnum}
+\newcounter{titledpoemnum}
+\newcounter{absolutetitledpoemnum}
\newcounter{poemgroupnum}
\newlength{\poemvspace}
\setlength{\poemvspace}{0em}
@@ -79,6 +81,8 @@
\newlength{\postgroupvspace}
\setlength{\pregroupvspace}{\fill}
\setlength{\postgroupvspace}{\fill}
+\newcounter{annotationnum}
+\newcounter{absoluteannotationnum}
\newcommand*{\ptannotationenv}{flushleft}
\newcommand*{\ptdedication}{Renew \textsf{\textbackslash ptdedication}}
\newcommand*{\makededication}[1][flushright]{%
@@ -150,24 +154,41 @@
\newcommand{\aftertop}{}
\newcommand*{\beforepoemgroup}{\cleardoublepage}
\newcommand*{\afterpoemgroup}{\clearpage}
-\newcommand*{\theincipit}{%
- \csname @poem\arabic{absolutepoemnum} incipit\endcsname%
-}
\newenvironment{poem}[3][\ptdefaultenv]{%
\newcommand*{\@ptwrapenvironment}{#1}
-\newcommand*{\incipit}[1]{%
+\newcommand*{\incipit}{%
+ \@ifstar{%
+ \@ptincipitStar
+ }{%
+ \@ptincipitNoStar
+ }
+}
+\newcommand*{\@ptincipitNoStar}[1]{%
\global\expandafter\def%
\csname%
@poem\arabic{absolutepoemnum} incipit%
\endcsname{##1}%
##1%
}
- \poetryheadings
+\newcommand*{\@ptincipitStar}[1]{%
+ \global\expandafter\def%
+ \csname%
+ @poem\arabic{absolutepoemnum} incipit%
+ \endcsname{##1}%
+}
+
+\newcommand*{\theincipit}{%
+ \csname @poem\arabic{absolutepoemnum} incipit\endcsname%
+}
\addtocounter{poemnum}{1}
\addtocounter{absolutepoemnum}{1}
+ \poetryheadings
\ifx&#2&%
\addtocounter{untitledpoemnum}{1}
\addtocounter{absoluteuntitledpoemnum}{1}
+ \else
+ \addtocounter{titledpoemnum}{1}
+ \addtocounter{absolutetitledpoemnum}{1}
\fi
\vspace*{\poemvspace}
\begin{\pttitleenv}
@@ -308,6 +329,8 @@
\else
\setcounter{poemnum}{0}
\setcounter{untitledpoemnum}{0}
+ \setcounter{titledpoemnum}{0}
+ \setcounter{annotationnum}{0}
\fi
\beforepoemgroup
\vspace*{\pregroupvspace}
@@ -333,7 +356,9 @@
\newenvironment{annotation}[2][\ptannotationenv]{%
\newcommand*{\@ptwrapenvironment}{#1}
\cleardoublepage
- \poetryheadings
+ \addtocounter{annotationnum}{1}
+ \addtocounter{absoluteannotationnum}{1}
+ \annotationheadings
\begin{\@ptwrapenvironment}
\subsection{#2}
\nopagebreak
@@ -342,6 +367,7 @@
\end{\@ptwrapenvironment}
\clearpage
}
+\newcommand*{\annotationheadings}[0]{\poetryheadings}
\ProcessOptions\relax
%%
%% ___________