summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/poetrytex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/poetrytex')
-rw-r--r--Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty222
1 files changed, 222 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
new file mode 100644
index 00000000000..43f6af20d17
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
@@ -0,0 +1,222 @@
+%%
+%% This is file `poetrytex.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% poetrytex.dtx (with options: `poetrytex')
+%%
+%% Copyright 2012 Samuel Whited
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of
+%% LaTeX version 2008/05/04 or later.
+%%
+\ProvidesPackage{poetrytex}
+\RequirePackage{expl3}
+\RequirePackage[pdfborder=0, bookmarks, colorlinks=false, hidelinks]{hyperref}
+\RequirePackage[parfill]{parskip}
+\newcommand*{\pttitle}{Title}
+\newcommand*{\ptsubtitle}{Subtitle}
+\newcommand*{\ptauthor}{Author}
+\newcommand*{\ptdate}{\today}
+\title{%
+ \pttitle%
+ \ifx\ptsubtitle\@ptundefined\relax\else\\\ptsubtitle\fi%
+}
+\author{\ptauthor}
+\date{\ptdate}
+\newcommand*{\@ptpoemlabeltext}{poetrytexpoem:}
+\newcounter{poemnum}
+\newcounter{absolutepoemnum}
+\newcommand*{\ptdedication}{}
+\newcommand*{\makededication}[0]{%
+ \thispagestyle{empty}
+ \vspace*{\fill}
+ \begin{flushright}
+ \emph{\ptdedication}
+ \end{flushright}
+ \vspace*{\fill}
+}
+\setcounter{secnumdepth}{-1}
+\setcounter{tocdepth}{2}
+\newcommand*{\toptitle}{List of Poems}
+\renewcommand*{\listtablename}{\toptitle}
+\newcommand*{\topentrytype}{subsection}
+\newcommand*{\maketoc}{%
+ \tableofcontents
+ \pagestyle{plain}
+ \clearpage
+ \thispagestyle{empty}
+}
+\newcommand*{\maketop}{\@ifstar{\@ptmaketopStar}{\@ptmaketopNoStar}}
+\newcommand*{\@ptmaketopStar}{%
+ \listoftables
+ \pagestyle{plain}
+ \clearpage
+}
+\newcommand*{\@ptmaketopNoStar}{%
+ \cleardoublepage
+ \phantomsection
+ \addcontentsline{toc}{section}{\toptitle}
+ \listoftables
+ \pagestyle{plain}
+ \clearpage
+}
+\newcommand*{\numbertop}{\newcommand*{\@ptnumbertop}{}}
+\newenvironment{poem}[3][verse]{%
+ \newcommand*{\@ptwrapenvironment}{#1}
+ \poetryheadings
+ \addtocounter{poemnum}{1}
+ \addtocounter{absolutepoemnum}{1}
+ \begin{center}
+ \phantomsection%
+ \addcontentsline{lot}{\topentrytype}{%
+ \ifx\@ptnumbertop\@ptundefined%
+ \relax%
+ \else%
+ \arabic{poemnum}.\ %
+ \fi#2}%
+ \label{\@ptpoemlabeltext\arabic{absolutepoemnum}}
+ {\poemtitleformat%
+ \ifx\@ptnumberpoems\@ptundefined
+ \relax
+ \else
+ \arabic{poemnum}\\%
+ \fi#2}\\%
+ #3
+ \end{center}
+ \begin{\@ptwrapenvironment}
+ \begingroup\setlength{\parskip}{\stanzaparskip}
+}{%
+ \endgroup
+ \end{\@ptwrapenvironment}
+ \ifx\@ptclearpageafterpoem\@ptundefined
+ \relax
+ \else
+ \clearpage
+ \fi
+}
+\newcommand*{\poetryheadings}[0]{%
+ \pagestyle{myheadings}
+ \markboth{ | \MakeUppercase{\pttitle}\hfill }
+ {\hfill\MakeUppercase{\ptgroup}\ | }
+}
+\newcommand*{\resetnumongroup}{\newcommand*{\@ptresetnumongroup}{}}
+\newcommand*{\numberpoems}{\newcommand*{\@ptnumberpoems}{}}
+\newlength{\stanzaparskip}
+\setlength{\stanzaparskip}{0.7em}
+\newcommand*{\clearpageafterpoem}{\newcommand*{\@ptclearpageafterpoem}{}}
+\newlength{\ptgap}
+\setlength{\ptgap}{2em}
+\newcommand*{\ptind}{%
+ \@ifstar{%
+ \@ptindStar
+ }{%
+ \@ptindNoStar
+ }
+}
+\newcommand*{\@ptindStar}{\hspace*{\ptgap}}
+\newcommand*{\@ptindNoStar}{\hspace{\ptgap}}
+\newcommand*{\poemtitleformat}{\normalfont\bfseries\large\centering}
+\newlength{\ptspacergap}
+\setlength{\ptspacergap}{4em}
+\newcommand*{\ptspacerchar}{\S}
+\newcommand*{\ptspacernum}{3}
+\newcommand*{\ptspacer}{%
+ \@ifstar{%
+ \@ptspacerStar
+ }{%
+ \@ptspacerNoStar
+ }
+}
+\newcommand*{\@ptspacerStar}{%
+ \hspace*{\ptspacergap}%
+ \@ptrepeat{\ptspacernum}{\ptspacerchar}%
+}
+\newcommand*{\@ptspacerNoStar}{%
+ \hspace{\ptspacergap}%
+ \@ptrepeat{\ptspacernum}{\ptspacerchar}%
+}
+\ExplSyntaxOn
+\cs_new_eq:NN \@ptrepeat \prg_replicate:nn
+\ExplSyntaxOff
+\newcommand*{\linktopoem}[2][false]{%
+ \newcommand*{\@ptfirstarg}{#1}
+ \newcommand*{\@ptfalse}{false}
+ \ifx \@ptfirstarg \@ptfalse
+ \hyperref[\@ptpoemlabeltext#2]{#2}\relax
+ \else
+ \hyperref[\@ptpoemlabeltext#1]{#2}\relax
+ \fi
+}
+\newcommand*{\ptgroup}{}
+\newcommand*{\poemgroup}{%
+ \@ifstar{%
+ \@ptpoemgroupStar
+ }{%
+ \@ptpoemgroupNoStar
+ }
+}
+\newcommand*{\@ptpoemgroupStar}[1]{%
+ \ifx\@ptresetnumongroup\@ptundefined
+ \relax
+ \else
+ \setcounter{poemnum}{0}
+ \fi
+ \cleardoublepage
+ \vspace*{\fill}
+ \renewcommand*{\ptgroup}{#1}
+ \pagestyle{empty}
+ \begin{center}
+ \section*{#1}
+ \end{center}
+ \vspace*{\fill}
+ \clearpage
+}
+\newcommand*{\@ptpoemgroupNoStar}[1]{%
+ \ifx\@ptresetnumongroup\@ptundefined
+ \relax
+ \else
+ \setcounter{poemnum}{0}
+ \fi
+ \cleardoublepage
+ \vspace*{\fill}
+ \renewcommand*{\ptgroup}{#1}
+ \pagestyle{empty}
+ \begin{center}
+ \section{#1}
+ \addcontentsline{lot}{section}{#1}
+ \end{center}
+ \vspace*{\fill}
+ \clearpage
+}
+\newenvironment{annotation}[1]{%
+ \cleardoublepage
+ \poetryheadings
+ \begin{flushleft}
+ \subsection{#1}
+}{%
+
+ \end{flushleft}
+ \clearpage
+}
+%%
+%% ___________
+%% Maintainer: Sam Whited
+%% Website: https://samwhited.com
+%% Contact: sam@samwhited.com
+%% Public key: 0xEC2C9934
+%%
+%% This work consists of this file poetrytex.dtx
+%% and the derived files poetrytex.sty
+%% and poetrytex.pdf
+%%
+%%
+%% End of file `poetrytex.sty'.