diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty | 28 |
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 |