summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/poetrytex/README9
-rw-r--r--Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdfbin235280 -> 248488 bytes
-rw-r--r--Master/texmf-dist/source/latex/poetrytex/Makefile12
-rw-r--r--Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx174
-rw-r--r--Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty27
5 files changed, 143 insertions, 79 deletions
diff --git a/Master/texmf-dist/doc/latex/poetrytex/README b/Master/texmf-dist/doc/latex/poetrytex/README
index a8570e4b148..0d268b61b46 100644
--- a/Master/texmf-dist/doc/latex/poetrytex/README
+++ b/Master/texmf-dist/doc/latex/poetrytex/README
@@ -1,16 +1,19 @@
# PoetryTeX
-**PoetryTeX** is a TeX package designed to aid in the formatting and typesetting
-of anthologies of poetry and other writings.
+**PoetryTeX** is a TeX package designed to aid in the formatting of anthologies
+of poetry and other writings.
You can dive straight in by checking out a few
[example poems](https://github.com/SamWhited/poetrytex/wiki/Example-Poems).
-## Development
+## Download
Development of this package occurs primarily on
[GitHub](https://github.com/SamWhited/poetrytex). Issues and pull requests
should be submitted there.
+The current release version of PoetryTeX is available from
+[CTAN](http://ctan.org/pkg/poetrytex).
+
## License
Copyright 2012 Samuel Whited
diff --git a/Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdf b/Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdf
index 66f9b4b49bf..5f15edda852 100644
--- a/Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdf
+++ b/Master/texmf-dist/doc/latex/poetrytex/poetrytex.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/poetrytex/Makefile b/Master/texmf-dist/source/latex/poetrytex/Makefile
index 57b2ebeabf6..9731417220c 100644
--- a/Master/texmf-dist/source/latex/poetrytex/Makefile
+++ b/Master/texmf-dist/source/latex/poetrytex/Makefile
@@ -36,7 +36,7 @@ REDIRECT = > /dev/null
# Files grouped by generation mode
COMPILED = $(DOC)
UNPACKED = poetrytex.sty
-SOURCE = $(DTX) Makefile README.md
+SOURCE = $(DTX) Makefile README
GENERATED = $(COMPILED) $(UNPACKED)
CTAN_FILES = $(SOURCE) $(COMPILED)
@@ -44,7 +44,7 @@ CTAN_FILES = $(SOURCE) $(COMPILED)
UNPACKED_DOC =
RUNFILES = $(filter-out $(UNPACKED_DOC), $(UNPACKED))
-DOCFILES = $(COMPILED) README.md $(UNPACKED_DOC)
+DOCFILES = $(COMPILED) README $(UNPACKED_DOC)
SRCFILES = $(DTX) Makefile
ALL_FILES = $(RUNFILES) $(DOCFILES) $(SRCFILES)
@@ -98,7 +98,11 @@ $(UNPACKED): $(DTX)
$(CTAN_ZIP): $(CTAN_FILES) $(TDS_ZIP)
@echo "Making $@ for CTAN upload."
@$(RM) -- $@
- @zip -9 $@ $^ >/dev/null
+ @mkdir -p $(NAME)/
+ @cp $^ $(NAME)/
+ @rm $(NAME)/*.zip
+ @zip -9 $@ $(NAME)/* $(NAME).tds.zip >/dev/null
+ @rm -rf $(NAME)/
define run-install
@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)
@@ -148,7 +152,7 @@ manifest:
@for f in $(GENERATED); do echo $$f; done
clean:
- @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.glo *.gls *.example *.out *.synctex* *.tmp poetrytex-style.sty *.ins poetrytex*.pdf poetrytex*.dvi
+ @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg *.glo *.gls *.example *.out *.synctex* *.tmp poetrytex-style.sty *.ins poetrytex*.pdf poetrytex*.dvi README *.lot
@$(RM) -- $(GENERATED) $(ZIPS)
@$(RM) -- $(builddir)/*
diff --git a/Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx b/Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx
index 68b8d4262aa..4f3b4e9a722 100644
--- a/Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx
+++ b/Master/texmf-dist/source/latex/poetrytex/poetrytex.dtx
@@ -78,7 +78,7 @@
% \name{Sam Whited}\\
% \texttt{sam@samwhited.com}
% }
-% \date{\today\\v1.0\githead\gitdirty\gituncommitted}
+% \date{\today\\v1.1\githead\gitdirty\gituncommitted}
%
% \maketitle
% \maketoc
@@ -155,7 +155,7 @@
% which includes the current git commit short-hash in the version number:
%
% \begin{Verbatim}
-% xelatex --shell-escape poetrytex.dtx
+% pdflatex --shell-escape poetrytex.dtx
% \end{Verbatim}
%
% It should be noted that this option is extremely unsafe, and you should only
@@ -185,15 +185,25 @@
%
% We'll start with the title page:
%
+% \begin{macro}{\pttitle}
+% \begin{macro}{\ptsubtitle}
+% \begin{macro}{\ptauthor}
+% \begin{macro}{\ptdate}
+% These properties will affect the appearance of \code{\textbackslash%
+% maketitle}:
% \begin{macrocode}
\newcommand*{\pttitle}{Title}
\newcommand*{\ptsubtitle}{Subtitle}
\newcommand*{\ptauthor}{Author}
\newcommand*{\ptdate}{\today}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
-% Since we define the properties above as commands, you can change the
-% appearance of your document by redefining them in your preamble like so:
+% Since we define them as commands, you can change the appearance of your
+% title page by redefining them in your preamble like so:
%
% \begin{Verbatim}
% \renewcommand*{\pttitle}{My Title}
@@ -213,61 +223,85 @@
% date we use the \code{\textbackslash pt} equivalents so that we can refer to
% them again later, or redefine them throughout the document---in anthologies
% with works by multiple authors, for instance.
-% \begin{macrocode}
-\newcommand*{\@ptpoemlabeltext}{poetrytexpoem:}
-% \end{macrocode}
+% \begin{macro}{\@ptpoemlabeltext}
% Each time you create a poem in your document we automatically assign it a
% special label that can be used to link to it later. This label is prefixed
% with \code{\textbackslash @ptpoemlabeltext} to prevent it from conflicting
% with user defined labels, or labels defined in other packages.
+% \begin{macrocode}
+\newcommand*{\@ptpoemlabeltext}{poetrytexpoem:}
+% \end{macrocode}
+% \end{macro}
%
% Chances are you'll never need to touch this.
%
+% \begin{macro}{poemnum}
+% \begin{macro}{absolutepoemnum}
+% 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).
% \begin{macrocode}
\newcounter{poemnum}
\newcounter{absolutepoemnum}
% \end{macrocode}
-% 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.
+% \end{macro}
+% \end{macro}
%
% \subsection{Dedication}
%
% After your title page you might want to add a dedication page.
%
+% \begin{macro}{\ptdedication}
% \begin{macro}{\makededication}
+% \changes{1.1}{2012/07/21}{Added optional `environment' argument}
% As with the \code{\textbackslash pttitle} and author commands you can simply
% redefine \code{\textbackslash ptdedication} to change the dedication text.
+%
+% To create a dedication page, the \code{\textbackslash makededication} command
+% can be called. By default, this command aligns everything to the right,
+% however, by adding an optional argument you can specify any environment to
+% wrap the dedication in.
% \begin{macrocode}
-\newcommand*{\ptdedication}{}
-\newcommand*{\makededication}[0]{%
+\newcommand*{\ptdedication}{Renew \textsf{\textbackslash ptdedication}}
+\newcommand*{\makededication}[1][flushright]{%
\thispagestyle{empty}
\vspace*{\fill}
- \begin{flushright}
+ \begin{#1}
\emph{\ptdedication}
- \end{flushright}
+ \end{#1}
\vspace*{\fill}
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \subsection{Tables and links}
%
% Next we setup the table of contents and list of poems:
+%
+% \begin{macro}{\toptitle}
+% \begin{macro}{\topentrytype}
+% The value of \code{\textbackslash toptitle} will be rendered atop the Table of
+% Poems, and \code{\textbackslash topentrytype} will set the default entry type
+% for poems in the TOP.
% \begin{macrocode}
-\setcounter{secnumdepth}{-1}
-\setcounter{tocdepth}{2}
\newcommand*{\toptitle}{List of Poems}
-\renewcommand*{\listtablename}{\toptitle}
\newcommand*{\topentrytype}{subsection}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
-% First, we set the \code{secnumdepth} and \code{tocdepth} counters to disable
+% We then set the \code{secnumdepth} and \code{tocdepth} counters to disable
% chapter, section, and subsection numbering, and to limit the maximum depth of
-% entries in the TOC. We then choose a default value for \code{\textbackslash%
-% toptitle} which will be rendered atop the Table of Poems, and set the default
-% entry type for poems to `subsection.' As with the previous options, these can
-% all be redefined to suit your needs.
+% entries in the TOC.
+%
+% \begin{macrocode}
+\setcounter{secnumdepth}{-1}
+\setcounter{tocdepth}{2}
+\renewcommand*{\listtablename}{\toptitle}
+% \end{macrocode}
%
% \begin{macro}{\maketoc}
% \begin{macro}{\maketop}
@@ -277,7 +311,8 @@
% \textbackslash tableofcontents} and \code{\textbackslash listoftables}, we
% provide alternatives that add a bit of formatting and clear the page. By
% default the TOP creates a listing in the TOC---Using the star modifier
-% prevents this.
+% prevents this. An example table of poems can be found at the end of this
+% document.
% \begin{macrocode}
\newcommand*{\maketoc}{%
\tableofcontents
@@ -286,11 +321,6 @@
\thispagestyle{empty}
}
\newcommand*{\maketop}{\@ifstar{\@ptmaketopStar}{\@ptmaketopNoStar}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macrocode}
\newcommand*{\@ptmaketopStar}{%
\listoftables
\pagestyle{plain}
@@ -305,6 +335,10 @@
\clearpage
}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\numbertop}
% Placing this command in your document preamble will cause the table of poems
% to be numbered.
@@ -321,6 +355,7 @@
%
% \section{The \code{poem} environment}
%
+% \begin{environment}{poem}
% Inserting a poem or other writing into your anthology is accomplished by
% wrapping it in the \code{poem} environment. This environment takes in two
% arguments, the title and subtitle (or author, date, etc.) of the poem.
@@ -406,6 +441,7 @@
\fi
}
% \end{macrocode}
+% \end{environment}
%
% \section{Formatting}
%
@@ -444,7 +480,6 @@
% \end{macro}
% \end{macro}
% Using \code{\textbackslash numberpoems} results in:
-% \clearpage
% \begin{Example}
% \begin{Verbatim}
% \numberpoems
@@ -474,26 +509,29 @@
%
% \subsection{Spacing and indentation}
%
-% The \code{stanzaparskip} length is used to change the \code{parskip} within a
-% poem environment.
+% \begin{macro}{\stanzaparskip}
+% This length is used to change the \code{parskip} within a poem environment.
% \begin{macrocode}
\newlength{\stanzaparskip}
\setlength{\stanzaparskip}{0.7em}
% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\clearpageafterpoem}
-% This macro causes the page to be cleared after every poem environment.
+% \code{clearpageafterpoem} causes the page to be cleared after every poem
+% environment.
% \begin{macrocode}
\newcommand*{\clearpageafterpoem}{\newcommand*{\@ptclearpageafterpoem}{}}
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\ptgap}
% \begin{macro}{\ptind}
% \begin{macro}{\ptind*}
-% The \code{\textbackslash ptgap} macro and \code{\textbackslash ptind} command
-% are two of those places where \pkg{poetrytex} strays a bit into the realm of
-% poetry typesetting. They overlap with the \pkg{verse} package's\code{%
-% \textbackslash vgap} and \code{\textbackslash vin} commands, and insert
+% The \code{\textbackslash ptgap} length and \code{\textbackslash ptind}
+% command are two of those places where \pkg{poetrytex} strays a bit into the
+% realm of poetry typesetting. They overlap with the \pkg{verse} package's
+% \code{\textbackslash vgap} and \code{\textbackslash vin} commands, and insert
% indentation at at the beginning of a line. This is useful for typesetting
% poems consistently when the \pkg{verse} package is not loaded. Redefine
% \code{\textbackslash ptgap} to change the length that \code{\textbackslash%
@@ -514,6 +552,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% Using it works something like this:
% \clearpage
@@ -555,16 +594,21 @@
%
% \subsection{Stylization}
%
+% \begin{macro}{\poemtitleformat}
% By redefining \code{\textbackslash poemtitleformat} we can change how the poem
% title is rendered.
% \begin{macrocode}
\newcommand*{\poemtitleformat}{\normalfont\bfseries\large\centering}
% \end{macrocode}
+% \end{macro}
%
%
% If you want a stylistic marker between two poems, or between sections
% or stanzas within a poem, the following commands are your friend.
%
+% \begin{macro}{\ptspacergap}
+% \begin{macro}{\ptspacerchar}
+% \begin{macro}{\ptspacernum}
% The \code{ptspacergap} length is the indentation of the spacer, and\code{%
% \textbackslash ptspacerchar} is the actual character that will be printed
% \code{\textbackslash ptspacernum} times.
@@ -574,6 +618,9 @@
\newcommand*{\ptspacerchar}{\S}
\newcommand*{\ptspacernum}{3}
% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\ptspacer}
% \changes{1.0}{2012/07/17}{Repeat \code{\textbackslash ptspacernum} times}
@@ -659,14 +706,14 @@
% matter for instance).
%
% \begin{macro}{\linktopoem}
-% We can link to poems easily enough by providing \code{linktopoem} with the
-% number of the poem and the text for the link. If only one argument is given
-% it is used as both the link destination and text.
+% \changes{1.1}{2012/07/24}{Fix spacing and multiple use issues}
+% We can \emph{\linktopoem[1]{link}} \emph{\linktopoem[2]{to}}%
+% \emph{\linktopoem[3]{poems}} easily enough by providing \code{linktopoem} with
+% the text for the link and, optionally, the number of the poem to link to. If
+% only one argument is given it is used as both the link destination and text.
% \begin{macrocode}
-\newcommand*{\linktopoem}[2][false]{%
- \newcommand*{\@ptfirstarg}{#1}
- \newcommand*{\@ptfalse}{false}
- \ifx \@ptfirstarg \@ptfalse
+\newcommand*{\linktopoem}[2][ptnull]{%
+ \ifx{#1}{ptnull}
\hyperref[\@ptpoemlabeltext#2]{#2}\relax
\else
\hyperref[\@ptpoemlabeltext#1]{#2}\relax
@@ -674,13 +721,16 @@
}
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\ptgroup}
% \begin{macro}{\poemgroup}
% \begin{macro}{\poemgroup*}
-% Dividing poems up into groups can be accomplished with the \code{poemgroup}
-% command. The command creates a title-page for the group at the current
-% location and adds entries to the TOP and TOC unless the starred version of the
-% command is used. The \code{\textbackslash ptgroup} command will always contain
-% a reference to the current group in case you need to refer to it later.
+% Dividing poems up into groups can be accomplished with the \code{%
+% \textbackslash poemgroup} command. The command creates a title-page for the
+% group at the current location and adds entries to the TOP and TOC unless the
+% starred version of the command is used. The \code{\textbackslash ptgroup}
+% command will always contain a reference to the current group in case you need
+% to refer to it later.
% \begin{macrocode}
\newcommand*{\ptgroup}{}
\newcommand*{\poemgroup}{%
@@ -726,27 +776,34 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \section{The \code{annotation} environment}
%
-% Annotations allow you to insert text into your document that maintains some
-% of the page formatting of the \code{poem} environment without the text itself
-% actually being formatted like verse. It uses \code{\textbackslash%
-% poetryheadings}, clears the page twice, and adds itself to the TOC (but not
-% the TOP). The page is also cleared again after the annotation.
+% \begin{environment}{annotation}
+% \changes{1.1}{2012/07/20}{Added optional `environment' argument}
+% Annotations allow you to insert prose that relates to a specific poem into
+% your document. It uses \code{\textbackslash poetryheadings}, clears the page
+% twice, and adds itself to the TOC (but not the TOP). The page is also cleared
+% again after the annotation.
%
+% Like the \code{poetry} environment, an optional first argument can be used to
+% specify the environment in which the annotation will be wrapped. This defaults
+% to \code{flushleft}.
% \begin{macrocode}
-\newenvironment{annotation}[1]{%
+\newenvironment{annotation}[2][flushleft]{%
+ \newcommand*{\@ptwrapenvironment}{#1}
\cleardoublepage
\poetryheadings
- \begin{flushleft}
- \subsection{#1}
+ \begin{\@ptwrapenvironment}
+ \subsection{#2}
}{%
- \end{flushleft}
+ \end{\@ptwrapenvironment}
\clearpage
}
% \end{macrocode}
+% \end{environment}
%
% \begin{macrocode}
%</poetrytex>
@@ -764,7 +821,8 @@
% \makeatother
% \clearpage
% \PrintChanges
-%
+% \changes{1.1}{2012/07/19}{Added an example table of poems}
+% \maketop
% \Finale
%
% \iffalse
diff --git a/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
index 43f6af20d17..33ccdcdce86 100644
--- a/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
+++ b/Master/texmf-dist/tex/latex/poetrytex/poetrytex.sty
@@ -35,20 +35,20 @@
\newcommand*{\@ptpoemlabeltext}{poetrytexpoem:}
\newcounter{poemnum}
\newcounter{absolutepoemnum}
-\newcommand*{\ptdedication}{}
-\newcommand*{\makededication}[0]{%
+\newcommand*{\ptdedication}{Renew \textsf{\textbackslash ptdedication}}
+\newcommand*{\makededication}[1][flushright]{%
\thispagestyle{empty}
\vspace*{\fill}
- \begin{flushright}
+ \begin{#1}
\emph{\ptdedication}
- \end{flushright}
+ \end{#1}
\vspace*{\fill}
}
+\newcommand*{\toptitle}{List of Poems}
+\newcommand*{\topentrytype}{subsection}
\setcounter{secnumdepth}{-1}
\setcounter{tocdepth}{2}
-\newcommand*{\toptitle}{List of Poems}
\renewcommand*{\listtablename}{\toptitle}
-\newcommand*{\topentrytype}{subsection}
\newcommand*{\maketoc}{%
\tableofcontents
\pagestyle{plain}
@@ -147,10 +147,8 @@
\ExplSyntaxOn
\cs_new_eq:NN \@ptrepeat \prg_replicate:nn
\ExplSyntaxOff
-\newcommand*{\linktopoem}[2][false]{%
- \newcommand*{\@ptfirstarg}{#1}
- \newcommand*{\@ptfalse}{false}
- \ifx \@ptfirstarg \@ptfalse
+\newcommand*{\linktopoem}[2][ptnull]{%
+ \ifx{#1}{ptnull}
\hyperref[\@ptpoemlabeltext#2]{#2}\relax
\else
\hyperref[\@ptpoemlabeltext#1]{#2}\relax
@@ -197,14 +195,15 @@
\vspace*{\fill}
\clearpage
}
-\newenvironment{annotation}[1]{%
+\newenvironment{annotation}[2][flushleft]{%
+ \newcommand*{\@ptwrapenvironment}{#1}
\cleardoublepage
\poetryheadings
- \begin{flushleft}
- \subsection{#1}
+ \begin{\@ptwrapenvironment}
+ \subsection{#2}
}{%
- \end{flushleft}
+ \end{\@ptwrapenvironment}
\clearpage
}
%%