summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/poetrytex
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2012-10-06 09:18:03 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2012-10-06 09:18:03 +0000
commit853ebcc3f6ede559a9dffb9d9278446cddc7808b (patch)
tree28ca5d35f1df57a0e9ebd70726955ff1ad3cd714 /Master/texmf-dist/tex/latex/poetrytex
parent99b6adc076aa7516825a10d1d52fe47e8f8730f9 (diff)
poetrytex update
git-svn-id: svn://tug.org/texlive/trunk@27893 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/poetrytex')
-rw-r--r--Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty28
1 files changed, 20 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
index 33ccdcdce86..7dbc5a63eef 100644
--- a/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
+++ b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
@@ -18,10 +18,19 @@
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2008/05/04 or later.
%%
-\ProvidesPackage{poetrytex}
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{poetrytex}[2012/10/03]
\RequirePackage{expl3}
-\RequirePackage[pdfborder=0, bookmarks, colorlinks=false, hidelinks]{hyperref}
-\RequirePackage[parfill]{parskip}
+\AtEndOfPackage{\RequirePackage{hyperref}}
+\DeclareOption{verse}{\usepackage{verse}}
+\DeclareOption{numbertop}{\numbertop}
+\DeclareOption{resetnumongroup}{\resetnumongroup}
+\DeclareOption{numberpoems}{\numberpoems}
+\DeclareOption{clearpageafterpoem}{\clearpageafterpoem}
+\DeclareOption{clearpageafterpoems}{\clearpageafterpoem}
+\DeclareOption*{%
+ \PassOptionsToPackage{\CurrentOption}{hyperref}%
+}
\newcommand*{\pttitle}{Title}
\newcommand*{\ptsubtitle}{Subtitle}
\newcommand*{\ptauthor}{Author}
@@ -35,6 +44,8 @@
\newcommand*{\@ptpoemlabeltext}{poetrytexpoem:}
\newcounter{poemnum}
\newcounter{absolutepoemnum}
+\newcommand*{\ptdefaultenv}{verse}
+\newcommand*{\ptannotationenv}{flushleft}
\newcommand*{\ptdedication}{Renew \textsf{\textbackslash ptdedication}}
\newcommand*{\makededication}[1][flushright]{%
\thispagestyle{empty}
@@ -70,7 +81,7 @@
\clearpage
}
\newcommand*{\numbertop}{\newcommand*{\@ptnumbertop}{}}
-\newenvironment{poem}[3][verse]{%
+\newenvironment{poem}[3][\ptdefaultenv]{%
\newcommand*{\@ptwrapenvironment}{#1}
\poetryheadings
\addtocounter{poemnum}{1}
@@ -83,7 +94,7 @@
\else%
\arabic{poemnum}.\ %
\fi#2}%
- \label{\@ptpoemlabeltext\arabic{absolutepoemnum}}
+ \hypertarget{\@ptpoemlabeltext\arabic{absolutepoemnum}}{}
{\poemtitleformat%
\ifx\@ptnumberpoems\@ptundefined
\relax
@@ -149,9 +160,9 @@
\ExplSyntaxOff
\newcommand*{\linktopoem}[2][ptnull]{%
\ifx{#1}{ptnull}
- \hyperref[\@ptpoemlabeltext#2]{#2}\relax
+ \hyperlink{\@ptpoemlabeltext#2}{#2}\relax
\else
- \hyperref[\@ptpoemlabeltext#1]{#2}\relax
+ \hyperlink{\@ptpoemlabeltext#1}{#2}\relax
\fi
}
\newcommand*{\ptgroup}{}
@@ -195,7 +206,7 @@
\vspace*{\fill}
\clearpage
}
-\newenvironment{annotation}[2][flushleft]{%
+\newenvironment{annotation}[2][\ptannotationenv]{%
\newcommand*{\@ptwrapenvironment}{#1}
\cleardoublepage
\poetryheadings
@@ -206,6 +217,7 @@
\end{\@ptwrapenvironment}
\clearpage
}
+\ProcessOptions\relax
%%
%% ___________
%% Maintainer: Sam Whited