diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/poetrytex/poetrytex-style.sty | 73 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdf | bin | 254829 -> 262210 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/poetrytex/Makefile | 11 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx | 269 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty | 81 |
5 files changed, 376 insertions, 58 deletions
diff --git a/Master/texmf-dist/doc/latex/poetrytex/poetrytex-style.sty b/Master/texmf-dist/doc/latex/poetrytex/poetrytex-style.sty new file mode 100644 index 00000000000..5ea7960520c --- /dev/null +++ b/Master/texmf-dist/doc/latex/poetrytex/poetrytex-style.sty @@ -0,0 +1,73 @@ +%% +%% This is file `poetrytex-style.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% poetrytex.dtx (with options: `doc-style') +%% +%% 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-style} + +\usepackage{fancyvrb,hologo,framed,multicol,tipa,url} +\usepackage[pdfborder=0, bookmarks, colorlinks=false, hidelinks]{hyperref} +\usepackage[parfill]{parskip} + +\fvset{gobble=2} + +\newenvironment{Example}{% + \begingroup\setlength{\columnseprule}{.4pt} + \begin{minipage}{\textwidth} + \begin{multicols}{2} +}{ + \end{multicols} + \end{minipage} + \endgroup +} + +\newcommand*{\gitdescribe}{% + \immediate\write18{% + rm gitdescribe.tex 2> /dev/null; (git describe --tags --dirty ||% + echo "v0.0") 2> /dev/null > gitdescribe.tex + }% + \InputIfFileExists{gitdescribe.tex}{}{}\unskip% + \immediate\write18{% + rm gitdescribe.tex 2> /dev/null + }% +} + +\newcommand\XeTeX{\hologo{XeTeX}} +\newcommand\XeLaTeX{\hologo{XeLaTeX}} +\newcommand\LuaTeX{\hologo{LuaTeX}} +\newcommand\LuaLaTeX{\hologo{LuaLaTeX}} + +\newcommand*\name[1]{\textsc{#1}} +\newcommand*\fname[1]{\textsf{#1}} +\newcommand*\pkg[1]{\textsf{#1}} +\newcommand*\code[1]{\texttt{#1}} + +\renewcommand\partname{Part} +%% +%% ___________ +%% 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-style.sty'. diff --git a/Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdf b/Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdf Binary files differindex cb5a9d587ac..60448b3ccb6 100644 --- a/Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdf +++ b/Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdf diff --git a/Master/texmf-dist/source/latex/poetrytex/Makefile b/Master/texmf-dist/source/latex/poetrytex/Makefile index 6f406545723..01a07c9d065 100644 --- a/Master/texmf-dist/source/latex/poetrytex/Makefile +++ b/Master/texmf-dist/source/latex/poetrytex/Makefile @@ -20,6 +20,7 @@ help: @echo ' all - unpack & doc' @echo ' world - all & ctan' @echo ' clean - remove all generated and built files' + @echo ' preview - preview the documentation' @echo ' ' @echo ' install - install the complete package into your home texmf tree' @echo ' sty-install - install the package code only' @@ -82,6 +83,10 @@ gendoc: $(DTX) grep -q "Rerun to get" $(NAME).log ) do true; \ done +COMMAND = command -v $(1) >/dev/null 2>&1 +preview: $(DOC) + ($(COMMAND) evince && evince $(NAME).pdf) || ($(COMMAND) open && open $(NAME).pdf) + $(DOC): $(DTX) @echo "Compiling documentation" $(DO_LATEX) @@ -95,13 +100,13 @@ $(DOC): $(DTX) $(UNPACKED): $(DTX) @$(DO_TEX) -$(CTAN_ZIP): $(CTAN_FILES) $(TDS_ZIP) +$(CTAN_ZIP): $(CTAN_FILES) @echo "Making $@ for CTAN upload." @$(RM) -- $@ @mkdir -p $(NAME)/ @cp $^ $(NAME)/ - @rm $(NAME)/*.zip - @zip -9 $@ $(NAME)/* $(NAME).tds.zip >/dev/null + @rm -f $(NAME)/*.zip + @zip -9 $@ $(NAME)/* >/dev/null @rm -rf $(NAME)/ define run-install diff --git a/Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx b/Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx index 7761a7a1c21..8d8dcee0400 100644 --- a/Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx +++ b/Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx @@ -56,7 +56,7 @@ % %<*poetrytex> \NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesPackage{poetrytex}[2012/10/03] +\ProvidesPackage{poetrytex}[2013/02/13] %</poetrytex>% % %<*driver> @@ -82,7 +82,7 @@ % \name{Sam Whited}\\ % \texttt{sam@samwhited.com} % } -% \date{\today\\v1.3\githead\gitdirty\gituncommitted} +% \date{\today\\\gitdescribe} % % \maketitle % \maketoc @@ -181,6 +181,8 @@ % \begin{macro}{numbertop} % \begin{macro}{resetnumongroup} % \begin{macro}{numberpoems} +% \begin{macro}{usedefaulttitles} +% \changes{1.4}{2012/02/13}{Add package option to use default titles} % \begin{macro}{clearpageafterpoem} % The package can also be loaded with any of the following options: % \begin{macrocode} @@ -188,6 +190,7 @@ \DeclareOption{numbertop}{\numbertop} \DeclareOption{resetnumongroup}{\resetnumongroup} \DeclareOption{numberpoems}{\numberpoems} +\DeclareOption{usedefaulttitles}{\ptusedefaulttitles} \DeclareOption{clearpageafterpoem}{\clearpageafterpoem} \DeclareOption{clearpageafterpoems}{\clearpageafterpoem} \DeclareOption*{% @@ -199,6 +202,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % For instance: % @@ -276,26 +280,99 @@ % % \begin{macro}{poemnum} % \begin{macro}{absolutepoemnum} +% \begin{macro}{untitledpoemnum} +% \changes{1.4}{2013/02/12}{Create a new counter to keep track of untitled% +% poems} +% \begin{macro}{absoluteuntitledpoemnum} +% \changes{1.4}{2013/02/12}{Create a new counter to keep track of untitled% +% poems} % The \code{poemnum} and \code{absolutepoemnum} counters will be incremented % every time we include a poem in our document and can be used later to number % the poems. The \code{absolutepoemnum} counter will never be reset by \pkg{% % poetrytex} while \code{poemnum} may sometimes be reset to 0 (at the beginning -% of a new \code{poemgroup} for instance). +% of a new \code{poemgroup} for instance). The \code{untitledpoemnum} and +% \code{absoluteuntitledpoemnum} are similar except that they are only +% incremented when the poem does not have a title. % \begin{macrocode} \newcounter{poemnum} \newcounter{absolutepoemnum} +\newcounter{untitledpoemnum} +\newcounter{absoluteuntitledpoemnum} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\poemvspace} +% \changes{1.4}{2013/02/11}{Allow whitespace before every poem} +% Sometimes you might want to insert a certain amount of vertical space before +% every poem. For instance, maybe you have several poems without titles and you +% need a visual cue to let your readers know that a new poem is starting. This +% can be acomplished by setting \code{\textbackslash poemvspace}: +% +% \begin{macrocode} +\newlength{\poemvspace} +\setlength{\poemvspace}{0em} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\pttitleleftspace} +% \changes{1.4}{2013/02/14}{Add macro to define poem title left hspace} +% \begin{macro}{\pttitlerightspace} +% \changes{1.4}{2013/02/14}{Add macro to define poem title right hspace} +% \begin{macro}{\ptsubtitleleftspace} +% \changes{1.4}{2013/02/14}{Add macro to define poem subtitle left hspace} +% \begin{macro}{\ptsubtitlerightspace} +% \changes{1.4}{2013/02/14}{Add macro to define poem subtitle right hspace} +% To indent the poems title or subtitle to the left or the right, set the length +% of \code{\textbackslash pttitleleftspace} and \code{\textbackslash% +% pttitlerightspace}. +% +% \begin{macrocode} +\newlength{\pttitleleftspace} +\setlength{\pttitleleftspace}{0em} +\newlength{\pttitlerightspace} +\setlength{\pttitlerightspace}{0em} +\newlength{\ptsubtitleleftspace} +\setlength{\ptsubtitleleftspace}{0em} +\newlength{\ptsubtitlerightspace} +\setlength{\ptsubtitlerightspace}{0em} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\ptusedefaulttitles} +% \begin{macro}{\ptdefaulttitle} +% \changes{1.4}{2013/02/12}{Add a default poem title} +% The default title for poems that don't include one. If \code{\textbackslash +% ptusedefaulttitles} is called the default title will be displayed above the +% poem itself as well as in the table of contents. Otherwise the title is left +% blank. +% +% \begin{macrocode} +\newcommand*{\ptusedefaulttitles}{\newcommand*{\@ptusedefaulttitles}{}} +\newcommand*{\ptdefaulttitle}{% + Untitled No. \arabic{absoluteuntitledpoemnum}% +} % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{\ptdefaultenv} % \changes{1.2}{2012/09/20}{Added an option to change the default environment} -% This contains the name of the default environment in which we should wrap -% poems. +% \begin{macro}{\pttitleenv} +% \changes{1.4}{2013/02/13}{Allow changing of the poem title environment} +% These macros contain the names of the default environments in which we should +% wrap poems and poem titles. % \begin{macrocode} \newcommand*{\ptdefaultenv}{verse} +\newcommand*{\pttitleenv}{center} % \end{macrocode} % \end{macro} +% \end{macro} % % \begin{macro}{\ptannotationenv} % \changes{1.3}{2012/10/30}{Added an option to change the default annotation @@ -361,6 +438,27 @@ \renewcommand*{\listtablename}{\toptitle} % \end{macrocode} % +% \begin{macro}{\beforetoc} +% \changes{1.4}{2012/02/18}{Add hook before table of contents} +% \begin{macro}{\aftertoc} +% \changes{1.4}{2012/02/18}{Add hook after table of contents} +% \begin{macro}{\beforetop} +% \changes{1.4}{2012/02/18}{Add hook before table of poems} +% \begin{macro}{\aftertop} +% \changes{1.4}{2012/02/18}{Add hook after table of poems} +% Several hooks are provided which allow you to insert content before or after +% the tables: +% \begin{macrocode} +\newcommand{\beforetoc}{} +\newcommand{\aftertoc}{} +\newcommand{\beforetop}{} +\newcommand{\aftertop}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% % \begin{macro}{\maketoc} % \begin{macro}{\maketop} % \begin{macro}{\maketop*} @@ -373,23 +471,30 @@ % document. % \begin{macrocode} \newcommand*{\maketoc}{% + \beforetoc \tableofcontents \pagestyle{plain} + \aftertoc \clearpage \thispagestyle{empty} } \newcommand*{\maketop}{\@ifstar{\@ptmaketopStar}{\@ptmaketopNoStar}} \newcommand*{\@ptmaketopStar}{% + \cleardoublepage + \beforetop \listoftables \pagestyle{plain} + \aftertop \clearpage } \newcommand*{\@ptmaketopNoStar}{% \cleardoublepage + \beforetop \phantomsection \addcontentsline{toc}{section}{\toptitle} \listoftables \pagestyle{plain} + \aftertop \clearpage } % \end{macrocode} @@ -422,14 +527,16 @@ \newenvironment{poem}[3][\ptdefaultenv]{% % \end{macrocode} % +% \begin{macro}{\@ptwrapenvironment} % By default \code{poem} re-wraps your text in the \code{verse} environment. % However, this can be changed by passing in an optional argument with the name % of another environment to wrap it in (eg. \code{center}) or, for all poems, by % redefining \code{ptdefaultenv}. -% % \begin{macrocode} \newcommand*{\@ptwrapenvironment}{#1} % \end{macrocode} +% \end{macro} +% % For example, a poem wrapped in the \code{center} environment might look like % this: % @@ -473,27 +580,49 @@ \poetryheadings \addtocounter{poemnum}{1} \addtocounter{absolutepoemnum}{1} - \begin{center} + \ifx&% + \addtocounter{untitledpoemnum}{1} + \addtocounter{absoluteuntitledpoemnum}{1} + \fi + \vspace*{\poemvspace} + \begin{\pttitleenv} \phantomsection% \addcontentsline{lot}{\topentrytype}{% \ifx\@ptnumbertop\@ptundefined% \relax% \else% - \arabic{poemnum}.\ % - \fi#2}% + \toppoemnum% + \fi% + \ifx&% + \ptdefaulttitle% + \else% + #2% + \fi% + }% \hypertarget{\@ptpoemlabeltext\arabic{absolutepoemnum}}{} {\poemtitleformat% \ifx\@ptnumberpoems\@ptundefined \relax \else - \arabic{poemnum}\\% - \fi#2}\\% - #3 - \end{center} + \titlepoemnum + \fi% + \ifx&% + \ifx\@ptusedefaulttitles\@ptundefined% + \relax% + \else% + \hspace*{\pttitleleftspace}\ptdefaulttitle% + \hspace*{\pttitlerightspace}\\% + \fi% + \else + \hspace*{\pttitleleftspace}#2\hspace*{\pttitlerightspace}\\% + \fi% + }% + \hspace*{\ptsubtitleleftspace}#3\hspace*{\ptsubtitlerightspace} + \end{\pttitleenv} \begin{\@ptwrapenvironment} - \begingroup\setlength{\parskip}{\stanzaparskip} + \begingroup\setlength{\parskip}{\stanzaparskip}% }{% - \endgroup + \endgroup \end{\@ptwrapenvironment} \ifx\@ptclearpageafterpoem\@ptundefined \relax @@ -519,8 +648,8 @@ % \begin{macrocode} \newcommand*{\poetryheadings}[0]{% \pagestyle{myheadings} - \markboth{ | \MakeUppercase{\pttitle}\hfill } - {\hfill\MakeUppercase{\ptgroup}\ | } + \markboth{\ |\ \textsc{\pttitle}\hfill } + {\hfill\textsc{\ptgroup}\ |\ } } % \end{macrocode} % \end{macro} @@ -545,6 +674,7 @@ % \begin{Example} % \begin{Verbatim} % \numberpoems +% \numbertop % % \begin{poem}{The Highwayman} % {Alfred Noyes} @@ -559,6 +689,7 @@ % \end{Verbatim} % \columnbreak % \numberpoems +% \numbertop % % \begin{poem}{The Highwayman}{Alfred Noyes} % The wind was a torrent of @@ -571,6 +702,76 @@ % \end{poem} % \end{Example} % +% \begin{macro}{\titlepoemnum} +% \changes{1.4}{2012/02/18}{Add hook for poem number formatting} +% \begin{macro}{\toppoemnum} +% \changes{1.4}{2012/02/18}{Add hook for Table of Poems poem number formatting} +% These commands are used to insert the poem number into the poem title and the +% table of poems respectively. By redefining them you can customize how the +% numbering looks. +% \begin{macrocode} +\newcommand*{\titlepoemnum}{\arabic{poemnum}\\} +\newcommand*{\toppoemnum}{\arabic{poemnum}.\ } +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% If we want to use uppercase roman numerals on the poems, and lowercase roman +% numerals in the \code{\hyperlink{POETRYTEX:TOP}{Table of Poems}}, we could +% redefine them like so: +% +% \begin{Example} +% \begin{Verbatim} +% \numberpoems +% \numbertop +% \renewcommand*{\titlepoemnum}{% +% \unskip\Roman{poemnum}\\} +% \renewcommand*{\toppoemnum}{ +% \unskip\roman{poemnum}.\ } +% +% \begin{poem}% +% {The Lady of Shalott}% +% {Alfred Tennyson (1842)} +% On either side the river lie\\ +% Long fields of barley and +% of rye,\\ +% That clothe the wold and meet +% the sky;\\ +% And through the field the road +% runs by\\ +% To many-towered Camelot;\\ +% And up and down the people go,\\ +% Gazing where the lilies blow\\ +% Round an island there below,\\ +% The island of Shalott--- +% \end{poem} +% \end{Verbatim} +% \columnbreak +% \numberpoems +% \numbertop +% \renewcommand*{\titlepoemnum}{% +% \unskip\Roman{poemnum}\\} +% \renewcommand*{\toppoemnum}{ +% \unskip\roman{poemnum}.\ } +% +% \begin{poem}% +% {The Lady of Shalott}% +% {Alfred Tennyson (1842)} +% On either side the river lie\\ +% Long fields of barley and +% of rye,\\ +% That clothe the wold and meet +% the sky;\\ +% And through the field the road +% runs by\\ +% To many-towered Camelot;\\ +% And up and down the people go,\\ +% Gazing where the lilies blow\\ +% Round an island there below,\\ +% The island of Shalott--- +% \end{poem} +% \end{Example} +% % \subsection{Spacing and indentation} % % \begin{macro}{\stanzaparskip} @@ -662,7 +863,7 @@ % By redefining \code{\textbackslash poemtitleformat} we can change how the poem % title is rendered. % \begin{macrocode} -\newcommand*{\poemtitleformat}{\normalfont\bfseries\large\centering} +\newcommand*{\poemtitleformat}{\normalfont\bfseries\large} % \end{macrocode} % \end{macro} % @@ -811,6 +1012,7 @@ \relax \else \setcounter{poemnum}{0} + \setcounter{untitledpoemnum}{0} \fi \cleardoublepage \vspace*{\fill} @@ -827,6 +1029,7 @@ \relax \else \setcounter{poemnum}{0} + \setcounter{untitledpoemnum}{0} \fi \cleardoublepage \vspace*{\fill} @@ -895,6 +1098,7 @@ % \addcontentsline{toc}{section}{Change History} % \PrintChanges % \changes{1.1}{2012/07/19}{Added an example table of poems} +% \renewcommand*{\beforetop}{\hypertarget{POETRYTEX:TOP}{}} % \maketop % \Finale % @@ -919,33 +1123,14 @@ \endgroup } -\newcommand*{\githead}{% - \immediate\write18{% - rm githead.tex 2> /dev/null; git rev-parse --short HEAD > githead.tex - }% - \InputIfFileExists{githead.tex}{.}{}\unskip% - \immediate\write18{% - rm githead.tex 2> /dev/null - }% -} - -\newcommand*{\gitdirty}{% - \immediate\write18{% - rm gitdirty.tex 2> /dev/null; git diff-files --quiet || echo "*" > gitdirty.tex - }% - \InputIfFileExists{gitdirty.tex}{\endlinechar=-1\relax}{}\unskip% - \immediate\write18{% - rm gitdirty.tex 2> /dev/null - }% -} - -\newcommand*{\gituncommitted}{% +\newcommand*{\gitdescribe}{% \immediate\write18{% - rm gituncommitted.tex 2> /dev/null; git diff-index --quiet --cached HEAD || echo "+" > gituncommitted.tex + rm gitdescribe.tex 2> /dev/null; (git describe --tags --dirty ||% + echo "v0.0") 2> /dev/null > gitdescribe.tex }% - \InputIfFileExists{gituncommitted.tex}{\endlinechar=-1\relax}{}\unskip% + \InputIfFileExists{gitdescribe.tex}{}{}\unskip% \immediate\write18{% - rm gituncommitted.tex 2> /dev/null + rm gitdescribe.tex 2> /dev/null }% } diff --git a/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty index 7dbc5a63eef..7dea683048c 100644 --- a/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty +++ b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty @@ -19,13 +19,14 @@ %% LaTeX version 2008/05/04 or later. %% \NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesPackage{poetrytex}[2012/10/03] +\ProvidesPackage{poetrytex}[2013/02/13] \RequirePackage{expl3} \AtEndOfPackage{\RequirePackage{hyperref}} \DeclareOption{verse}{\usepackage{verse}} \DeclareOption{numbertop}{\numbertop} \DeclareOption{resetnumongroup}{\resetnumongroup} \DeclareOption{numberpoems}{\numberpoems} +\DeclareOption{usedefaulttitles}{\ptusedefaulttitles} \DeclareOption{clearpageafterpoem}{\clearpageafterpoem} \DeclareOption{clearpageafterpoems}{\clearpageafterpoem} \DeclareOption*{% @@ -44,7 +45,24 @@ \newcommand*{\@ptpoemlabeltext}{poetrytexpoem:} \newcounter{poemnum} \newcounter{absolutepoemnum} +\newcounter{untitledpoemnum} +\newcounter{absoluteuntitledpoemnum} +\newlength{\poemvspace} +\setlength{\poemvspace}{0em} +\newlength{\pttitleleftspace} +\setlength{\pttitleleftspace}{0em} +\newlength{\pttitlerightspace} +\setlength{\pttitlerightspace}{0em} +\newlength{\ptsubtitleleftspace} +\setlength{\ptsubtitleleftspace}{0em} +\newlength{\ptsubtitlerightspace} +\setlength{\ptsubtitlerightspace}{0em} +\newcommand*{\ptusedefaulttitles}{\newcommand*{\@ptusedefaulttitles}{}} +\newcommand*{\ptdefaulttitle}{% + Untitled No. \arabic{absoluteuntitledpoemnum}% +} \newcommand*{\ptdefaultenv}{verse} +\newcommand*{\pttitleenv}{center} \newcommand*{\ptannotationenv}{flushleft} \newcommand*{\ptdedication}{Renew \textsf{\textbackslash ptdedication}} \newcommand*{\makededication}[1][flushright]{% @@ -60,24 +78,35 @@ \setcounter{secnumdepth}{-1} \setcounter{tocdepth}{2} \renewcommand*{\listtablename}{\toptitle} +\newcommand{\beforetoc}{} +\newcommand{\aftertoc}{} +\newcommand{\beforetop}{} +\newcommand{\aftertop}{} \newcommand*{\maketoc}{% + \beforetoc \tableofcontents \pagestyle{plain} + \aftertoc \clearpage \thispagestyle{empty} } \newcommand*{\maketop}{\@ifstar{\@ptmaketopStar}{\@ptmaketopNoStar}} \newcommand*{\@ptmaketopStar}{% + \cleardoublepage + \beforetop \listoftables \pagestyle{plain} + \aftertop \clearpage } \newcommand*{\@ptmaketopNoStar}{% \cleardoublepage + \beforetop \phantomsection \addcontentsline{toc}{section}{\toptitle} \listoftables \pagestyle{plain} + \aftertop \clearpage } \newcommand*{\numbertop}{\newcommand*{\@ptnumbertop}{}} @@ -86,27 +115,49 @@ \poetryheadings \addtocounter{poemnum}{1} \addtocounter{absolutepoemnum}{1} - \begin{center} + \ifx&% + \addtocounter{untitledpoemnum}{1} + \addtocounter{absoluteuntitledpoemnum}{1} + \fi + \vspace*{\poemvspace} + \begin{\pttitleenv} \phantomsection% \addcontentsline{lot}{\topentrytype}{% \ifx\@ptnumbertop\@ptundefined% \relax% \else% - \arabic{poemnum}.\ % - \fi#2}% + \toppoemnum% + \fi% + \ifx&% + \ptdefaulttitle% + \else% + #2% + \fi% + }% \hypertarget{\@ptpoemlabeltext\arabic{absolutepoemnum}}{} {\poemtitleformat% \ifx\@ptnumberpoems\@ptundefined \relax \else - \arabic{poemnum}\\% - \fi#2}\\% - #3 - \end{center} + \titlepoemnum + \fi% + \ifx&% + \ifx\@ptusedefaulttitles\@ptundefined% + \relax% + \else% + \hspace*{\pttitleleftspace}\ptdefaulttitle% + \hspace*{\pttitlerightspace}\\% + \fi% + \else + \hspace*{\pttitleleftspace}#2\hspace*{\pttitlerightspace}\\% + \fi% + }% + \hspace*{\ptsubtitleleftspace}#3\hspace*{\ptsubtitlerightspace} + \end{\pttitleenv} \begin{\@ptwrapenvironment} - \begingroup\setlength{\parskip}{\stanzaparskip} + \begingroup\setlength{\parskip}{\stanzaparskip}% }{% - \endgroup + \endgroup \end{\@ptwrapenvironment} \ifx\@ptclearpageafterpoem\@ptundefined \relax @@ -116,11 +167,13 @@ } \newcommand*{\poetryheadings}[0]{% \pagestyle{myheadings} - \markboth{ | \MakeUppercase{\pttitle}\hfill } - {\hfill\MakeUppercase{\ptgroup}\ | } + \markboth{\ |\ \textsc{\pttitle}\hfill } + {\hfill\textsc{\ptgroup}\ |\ } } \newcommand*{\resetnumongroup}{\newcommand*{\@ptresetnumongroup}{}} \newcommand*{\numberpoems}{\newcommand*{\@ptnumberpoems}{}} +\newcommand*{\titlepoemnum}{\arabic{poemnum}\\} +\newcommand*{\toppoemnum}{\arabic{poemnum}.\ } \newlength{\stanzaparskip} \setlength{\stanzaparskip}{0.7em} \newcommand*{\clearpageafterpoem}{\newcommand*{\@ptclearpageafterpoem}{}} @@ -135,7 +188,7 @@ } \newcommand*{\@ptindStar}{\hspace*{\ptgap}} \newcommand*{\@ptindNoStar}{\hspace{\ptgap}} -\newcommand*{\poemtitleformat}{\normalfont\bfseries\large\centering} +\newcommand*{\poemtitleformat}{\normalfont\bfseries\large} \newlength{\ptspacergap} \setlength{\ptspacergap}{4em} \newcommand*{\ptspacerchar}{\S} @@ -178,6 +231,7 @@ \relax \else \setcounter{poemnum}{0} + \setcounter{untitledpoemnum}{0} \fi \cleardoublepage \vspace*{\fill} @@ -194,6 +248,7 @@ \relax \else \setcounter{poemnum}{0} + \setcounter{untitledpoemnum}{0} \fi \cleardoublepage \vspace*{\fill} |