diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/poemscol/poemscol.dtx |
Initial commit
Diffstat (limited to 'macros/latex/contrib/poemscol/poemscol.dtx')
-rw-r--r-- | macros/latex/contrib/poemscol/poemscol.dtx | 9747 |
1 files changed, 9747 insertions, 0 deletions
diff --git a/macros/latex/contrib/poemscol/poemscol.dtx b/macros/latex/contrib/poemscol/poemscol.dtx new file mode 100644 index 0000000000..3119270c03 --- /dev/null +++ b/macros/latex/contrib/poemscol/poemscol.dtx @@ -0,0 +1,9747 @@ +% \iffalse meta-comment +% !TEX TS-program = dtxmk +% +% Copyright (C) 2002-2019 by John Burt <burt@brandeis.edu> +% -------------------------------------------------- +% +% 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 +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is John Burt. +% +% This work consists of the files poemscol.dtx and poemscol.ins +% and the derived file poemscol.sty. +% +% \fi +% +% \iffalse +%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01] +%<package>\ProvidesPackage{poemscol} +%<package> [2019/08/18 v3.02 poemscol file] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{makeidx,multicol,keyval,ifthen} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{poemscol.dtx} +\end{document} +%</driver> +% \fi +% +% \CheckSum{8587} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% +% \changes{v1.0}{2002/06/05}{Initial version} +% \changes{v1.01}{2002/06/25}{Added commands for titles of poems without +% formal titles. Corrected typographical errors in manual.} +% \changes{v1.1}{2003/04/18}{Added commands to change mark in cases +% where page break fall (or does not fall) on stanza break. Added +% command to change the amount of indentation in runover lines in +% verse. Removed special geometry to make the program more generic.} +% \changes{v1.11}{2005/02/12}{Corrected bugs in headers for +% explanatory notes and emendations.} +% \changes{v1.2}{2005/2/19}{Accidentals and typescript variants test +% to see whether textual notes are being made. Corrected a bug when +% quoting verse in note sections. Added a command to change the page +% number of the table of contents. Added a command to input the table +% of contents file. Added commands to input the external files for +% emendations, explanatory notes, textual notes, and the index of +% titles and first lines. Added a command to test whether there is an +% .aux file from a previous run and to prevent typesetting of the +% external files for emendations, explanatory notes, textual notes if +% there is not. Added a command to restore the main page style after +% the table of contents.} \changes{v1.7}{2005/2/22}{Changed how labels +% are made for use in contents and notes sections. Control sequences +% in titles (such as for italics and so on) no longer require special +% commands, although those commands are retained for backward +% compatibility.} \changes{v2.01}{2005/2/22}{Rewrote all of the title +% commands in order to make them easier to maintain. Added environment +% for flushing runover lines in verse to the right margin. Added +% information on how to customize titles.} +% \changes{v2.02}{2005/2/28}{Corrected an error in setting poems +% without formal titles} \changes{v2.12}{2005/3/19}{Notes sections can +% take ranges of lines.} \changes{v2.13}{2005/3/20}{tsentry no longer +% needs an unskip if the entry starts with a comma.} +% \changes{v2.2}{2005/3/23}{The user can create new kinds of endnote.} +% \changes{v2.21}{2005/3/24}{Cross references can refer to line +% numbers} \changes{v2.22}{2005/3/25}{Removed dependence upon +% marn.sty. Enabled multiple levels of block-formatted footnotes} +% \changes{v2.24}{2005/4/02}{commands to aid typesetting parallel +% texts.} \changes{v2.25}{2005/5/06}{Bug fix in running headers to +% notes sections} \changes{v2.26}{2005/5/09}{Fix no unskip in vertical +% mode error} \changes{v2.27}{2005/5/09}{Changed name of linelabel +% command, to prepare for making poemscol and lineno compatible} +% \changes{v2.30}{2005/5/16}{Prose sections such as Authors' +% Introductions are line numbered by lineno.sty. Textnotes, +% emendations, and explanatory notes for prose sections may be either +% footnotes or endnotes, and the latter are sent to the same place as +% their verse equivalents. Good solution to ``missing number'' +% problem on first runs.} \changes{v2.301}{2005/5/31}{Corrected small +% bug in table of contents commands, rewrote manual for clarity} +% \changes{v2.31}{2005/6/3}{Ranges of line for notes sections (in +% verse or prose sections) need no longer involve counting of lines. +% Lemmas may be nested, may overlap, and may cross stanza boundaries.} +% \changes{v2.32}{2005/6/29}{Simpler configuration of marginal line +% numbers, revision of manual} \changes{v2.33}{2005/7/03}{Fixed a bug +% in index generation, compensated for odd interaction between +% fancyhdr and reversemarginpar} \changes{v2.34}{2005/7/17}{Easier +% modification of format of tables of contents} +% \changes{v2.35}{2005/7/18}{poemscol can break the lines for long +% titles in the table of contents on its own without making a mess of +% it. poemscol can break the lines for long titles on its own without +% making a mess of it. Modified commands for volume titles to use the +% facilities for poem titles.} \changes{v2.36}{2005/8/16}{Versions of +% note commands for typescript variants and accidentals for annotated +% prose. Commands for marking up and annotating prose by paragraph and +% sentence number. Commands for cross references by sentence and +% paragraph number.} \changes{v2.37}{2005/8/30}{In cases of broken +% lines or runover lines you can choose whether to set the line number +% with the beginning of the line or with the end of the line. Also, +% you can choose to have it set the number always at the beginning if +% the line number is at the left, and always at the end if it is at +% the right.} \changes{v2.38}{2005/9/04}{Checked cases where commands +% might introduce extra white space. Made sure that line numbers for +% verse, prose, and paragraph-sentence prose line up. Fixed +% overlapping of paragraph and line numbers for paragraph-sentence +% mode. Up to four sentences can appear on a line in paragraph-line +% mode without having their marginal line numbers overlap. Fixed a +% bug that added an extra colon in footnotes in paragraph-sentence +% format. Changed ``gutter'' and ``outer'' line numbering in verse +% and paragraph-sentence prose to use Peter Wilson's sidepars rather +% than marginpars.} \changes{v2.39}{2005/9/07}{Left a DeclareOption +% hanging in version 2.38. Fixed that.} +% \changes{v2.391}{2005/10/06}{Corrections to user's guide.} +% \changes{v2.392}{2005/10/13}{More corrections to user's guide.} +% \changes{v2.394}{2005/12/10}{More corrections to user's guide.} +% \changes{v2.4}{2006/02/25}{Commands to make new kinds of endnotes +% also make notes for line numbered prose sections and for prose +% sections with paragraph and sentence numbering.} +% \changes{v2.41}{2006/03/02}{Fixed a bug in line numbers of new kinds +% of prose note.} \changes{v2.42}{2006/03/04}{Fixed error in handling +% conditionals when setting prose numbered by sentence and paragraph.} +% \changes{v2.43}{2006/03/06}{Notes in prose numbered by sentence and +% paragraph number can refer only to the sentence number even when +% paragraphs are also being counted.} +% \changes{v2.44}{2006/03/07}{Fixed a bug which caused new kinds of +% endnotes in prose sections to add unwanted white space to the +% output.} \changes{v2.45}{2006/04/08}{Use of sidepar in v2.38 +% introduced a problem, causing line numbers sometimes to drift up a +% point. Changed commands for putting verse line numbers, but not +% paragraph and sentence numbers, to use marginpars again.} +% \changes{v2.46}{2006/04/10}{Changed definition of sidepar so that it +% uses struts to find the depth of the line, restored line number +% commands to use sidepar and its variants.} +% \changes{v2.47}{2006/04/12}{Changed name of sidepar to pcmclsidepar +% to avoid conflicts with the sidepar command from the memoir class, +% since they are no longer exactly the same. Added commands to put a +% marginal reference to the notes section in the margins of poem +% titles.} \changes{v2.48}{2006/04/13}{Added more general form of the +% commands to put a marginal reference to the notes section in the +% margins of poem titles.} \changes{v2.49}{2006/04/25}{Changed +% marginal reference command to use marginpar rather than pmclsidepar +% (alas, it still adds vertical white space after the title with +% pmclsidepar). Added marginal reference commands for sequences and +% sequence sections. Fixed errors in manual. } +% \changes{v2.50}{2006/05/13}{Added marginal reference commands for +% poem sections, poem subtitles, epigraphs, and dedications. These +% commands no longer require an additional label command to set the +% label to which they refer. Added commands to make marginal +% references to the pages in notes sections where comments on +% individual lines may be found, for textual notes, explanatory notes, +% emendations, and user-defined notes. Added commands for changing +% the names of the Table of Contents, the various endnotes sections, +% and the running headers for the contents and endnotes sections, in +% order to facilitate editions of works in languages other than +% English.} \changes{v2.51}{2006/05/22}{Changed prose section +% environment so that it does not always assume that the modulo for +% line numbers in prose is the same as the number in verse. Corrected +% a problem with alignment of line numbers in the prosesectionnoreset +% environment. Added commands to support generation of multiple +% indices using the splitindex package. Fixed a variety of small +% bugs, including a newly introduced one in the correction to textual +% notes for quoted verse.} \changes{v2.52}{2007/07/10}{Changed +% dedication to poemdedication to avoid a conflict with a command in +% koma-script. dedication command is provided using providecommand +% for compatibility} \changes{v2.53}{2007/07/14}{Changed the name of +% an internal token register to avoid a conflict with babel} +% \changes{v2.531}{2011/08/16}{Fixed a typo in example code.} +% \GetFileInfo{poemscol.sty} \changes{v2.6}{2012/08/31}{Added an +% optional argument to the poem environment to center the text block +% of the poem on the longest line. Added a switch to enable titles to +% be centered on the page.} \changes{v2.61}{2013/02/06}{Added a +% boolean to switch notes to one note per paragraph form. Boolean to +% switch off poem titles in notes. Two column formatting for notes sections.} +% \changes{v2.62}{2013/05/22}{You can adjust the margins of +% epigraphs, dedications, and similar things. Made the appearance of +% entries in the table of contents for endnotes sections +% customizable. Fixed a bug which caused user-defined +% endnotes to put extra white space in prose passages.} +% \changes{v2.63}{2013/06/01}{Revisions to manual.} +% \changes{v2.64}{2013/08/02}{Bug fix: remove extra white space in +% custom endnotes for prose sections when notes are in single paragraph mode. Fix +% appearance of page number in endnote sections.} +% \changes{v2.65}{2013/12/20}{Modifications to parallel text commands, +% corrections to manual.} +% \changes{v2.66}{2015/5/14}{Change to page styles} +% \changes{v2.7}{2015/6/18}{Improvements to parallel texts.} +% \changes{v2.72}{2015/6/25}{Improvements to parallel texts. Generic note types for parallel texts. +% corrections to manual.} +% \changes{v2.8}{2017/8/25}{Changes in default values about where line numbers +% are placed. verselinenumberstoleft and related commands no longer change +% marginparsep. Endnote sections may have normal or hanging paragraphs. +% Endnotes may have multiple paragraphs.} +% \changes{v2.81}{2017/8/30}{Versemarginadjust to +% adjust margins of the verse block. Line numbers automatically move closer to +% the text when the text block is centered on the longest line. New boolean to +% force line numbers to the margins when the text block is centered. New commands to +% control the distance of line numbers from margins of centered text block. New default +% values for marginparwidth and marginparsep.} +% \changes{v2.85}{2017/9/03}{Boolean to turn centering of verse block on and off. +% Subtitles center when centertitles is issued. New boolean to adjust placement of marginal +% reference markers in jhtextnote and related commands.} +% \changes{v2.87}{2017/10/23}{Notes to appear at the end of individual poems.} +% \changes{v2.88}{2017/10/29}{Revisions to manual.} +% \changes{v2.89}{2017/11/30}{Append the date to the end of the poem.} +% \changes{v2.9}{2017/12/02}{Date aligns with left margin of poem even when poem is centered.} +% \changes{v2.95}{2017/12/20}{Long poems can put firstline---lastline in running header. +% Revisions to manual. Textual notes, emendation notes, and explanatory notes can also be +% placed at the end of the poem rather than at the bottom of the page or in an endnote section. +% Commands to set the title only in the contents and only in the notes.} +% \changes{v2.96}{2018/01/02}{Epigraphs, headnotes, dedications, and attributions move +% towards the center when titles are centered. Easier customization of epigraphs and similar things.} +% \changes{v2.97}{2018/01/05}{Correction to JHepigraphs. Epigraphenvironment for +% headnotes with more than one stanza or paragraph. Corrections to manual.} +% \changes{v2.98}{2018/01/11}{Corrections to manual.} +% \changes{v2.99}{2019/08/02}{Hierarchy of indented stanzas} +% \changes{v3}{2019/08/03}{With centered verse you can align the title, epigraphs, +% attibutions, and so on with the left margin of the verse block.} +% \changes{v3.01}{2019/08/04}{Corrections to manual} +% \changes{v3.02}{2019/08/18}{Corrections to manual. Hierarchy of indented lines. Minor bug fix.} +% \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\else,\renewcommand,\makeatletter,\makeatother} +% \DoNotIndex{\abovedisplayskip,\belowdisplayskip,\abovedisplayshortskip,\belowdisplayshortskip} +% \DoNotIndex{\newcommand, \section, \subsection, \subsubsection, +% \fileversion,} \DoNotIndex{\filedate, \docdate, \leavevmode, +% \vspace, \small, \normalsize, \fontsize,} \DoNotIndex{\newcommand, +% \section, \subsection, \subsubsection, \fileversion} +% \DoNotIndex{\filedate, \docdate, \leavevmode, \vspace, \small, +% \normalsize, \fontsize} \DoNotIndex{\selectfont, \abovedisplayskip, +% \belowdisplayskip, \setlength, \item} \DoNotIndex{\global, \input, +% \def, \edef, \texttt, \textsf, \setcounter} +% \DoNotIndex{\pagenumbering, \oddsidemargin, \evensidemargin, +% \newdimen, \renewcommand} \DoNotIndex{\makeatletter, \let, \@listi, +% \@listl, \z@, \@xpt, \@xipt, \p@ , \@plus2} \DoNotIndex{\@minus5, +% \@minus3, \@plus3, \makeatother, \@minus4, \relax, \pagestyle} +% \DoNotIndex{\fancyhead, \fancyfoot, \thepage, \@ixp} +% \DoNotIndex{\begin \botmark, \botmark, \catcode, \croppadbot, +% \croppadtop} \DoNotIndex{\croppagewidth, \endverse, \equal, +% \fancyfoot, \fancyhead, \fancyhf} \DoNotIndex{\fancypagestyle, +% \firstmark, \footrulewidth, \hbox, \hbox, \headrulewidth} +% \DoNotIndex{\hfil, \hspace, \ifthenelse, \immediate, \itemindent, +% \listparindent} \DoNotIndex{\makeatletter, \nolinebreak, \openout, +% \raggedbottom, \setcounter, \textrm} \DoNotIndex{\value, \vspace, +% \write} \DoNotIndex{\afterpoemtitleskip, \addtocounter, \advance, +% \begin, \bf, \bigskip} \DoNotIndex{\bigskipamount, \fi, \@fulltitle, +% \label, \large, \leftheader} \DoNotIndex{\leftheadervalue, +% \leftmargin, \leftmargini} \DoNotIndex{\medskip, \newcounter, +% \nobreak, \par, \textbf} +% \DoNotIndex{\closeout,\em,\emph,\expandafter,\Huge,\it,\jobname,\kern,\newif, +% \newwrite,\p@,\pageref,\renewenvironment,\rm,\scriptsize,\string, +% \textsc, \unskip} +% \setcounter{IndexColumns}{2} +% \MakeShortVerb{|} +% \def\fileversion{3.02} +% \def\filedate{18 August 2019} +% \def\docdate{18 August 2019} +% \title{Typesetting Poetry Collections with +% \textsf{poemscol}\thanks{This document corresponds to +% \textsf{poemscol}~\fileversion, dated \filedate.}} +% \author{John Burt +% \\ \texttt{burt@brandeis.edu}} +% \date{18 August 2019} +% \maketitle +% \begin{abstract} \textsf{poemscol} provides commands for \LaTeX\ for +% setting collections of poetry. It is especially suited for setting +% collections of poetry in which several volumes are combined, such as +% in a critical edition of a poet's Collected Poems. It provides the +% structures required to produce a critical edition of the kind +% specified by the Modern Language Association's Committee on +% Scholarly Editions, and it automatically marks every occasion where +% a stanza break falls on a page break. \end{abstract} +% \tableofcontents \hfuzz=50pt \section{Introduction} +% +% \textsf{poemscol} provides the structures necessary for editing a +% critical edition of a volume of poems (or of a collection of a poet's +% works) such as those required by the Modern Language Association's +% Committee on Scholarly Editions. \textsf{poemscol} numbers the lines, and produces separate, +% formatted endnote sections (or, optionally, +%multiple layers of footnotes) for emendations, textual collations, and +% explanatory notes, tying +% each note to the range of lines upon which it is a comment. +% +% Producing line numbers for verse is something for which \LaTeX\ +% would seem to be especially suited. A line of verse, after all, is +% not a carriage return but a logical unit, an element of +% versification more than of typesetting, perhaps running over several +% physical lines, or perhaps split into half-lines as speakers or +% subjects change. With \textsf{poemscol} you mark lines, stanzas, +% and entire poems up as logical units, and \LaTeX\ does the +% formatting and counting. Once you have marked out the logical units +% of the poem, \textsf{poemscol} will automatically mark every textual +% note, emendation, or explanatory note with the range of line +% numbers to which it applies. +% +% Editions of Collected Poetry might also require special structures +% to reflect the fact that they are made up of the contents of several +% volumes of poetry. In particular, such editions require +% facilities for setting up specially formatted divider pages between +% volumes. They also require tables of contents and other front matter, as well +% as an index of titles and first lines (or, optionally, several separate indices) +% and other sorts of back matter. +% \textsf{poemscol} automatically generates a table of contents, an index of titles +% and first lines, and divider pages for the sections of the volumes. +% It produces running headers of the form ``Emendations to pp.~xx-yy'' +% for the note sections. +% +% In poetry which does not have a regular stanzaic form, it is useful +% to be able to mark automatically occasions where there is a stanza +% break at the bottom of a page which the reader might not notice. +% Doing this by hand is not only tedious and easy to get wrong, but +% also a process you will have to start over again if anything about +% your volume changes, if you add a poem, say, or even decide to break +% a title across two lines. \textsf{poemscol} takes care of this +% process, so that the editor need never worry about it, automatically +% marking cases where the page break coincides with a stanza break +% with a symbol. +% +% \textsf{poemscol} includes facilities for typesetting parallel text editions +% of poems, for instance to compare different versions or translations of the same poem +% on the recto and verso pages. \textsf{poemscol} will keep the line +% numbering of the two texts separate, will provide separate endnote sections +% for textual notes, emendations, and explanatory notes for the different texts, +% and will also make marginal markers to tie lines in the verso text to the +% equivalent line in the recto text. +% +% \textsf{poemscol} is also suited for verse drama, and the package +% \textsf{dramatist} has been modified to work with \textsf{poemscol}. +% +% \textsf{poemscol} can provide line numbers and notes for prose +% sections such as the author's introduction or prose poetry. (It +% can also handle inset prose passages in the midst of verse, pausing and +% restarting verse line numbering as the editor desires.) +% It also has some limited facilities for typesetting and annotating +% line-numbered parallel passages in prose. +% \textsf{poemscol} is not, however, designed for typesetting critical editions of large +% scale prose works, although very possibly it could be tweaked to +% work. For critical editions of prose works, several +% other packages are available, including the \texttt{EDMAC} format, a +% \TeX\ format analogous to but distinct from \LaTeX, by John +% Lavagnino and Dominik Wujastyk, or \textsf{ledmac}, a port of +% \texttt{EDMAC} into \LaTeX\ originally by Peter Wilson and +% now maintained as \textsf{reledmac} by Ma\"{\i}eul Rouquette, or \textsf{ednotes}, a +% completely independent set of commands for critical editions which +% builds on \textsf{manypar} and \textsf{lineno}, by Uwe L\"{u}ck. +% +% \textsf{poemscol} can number and annotate prose marked in +% ``paragraph number: sentence number'' +% format (or bible chapter and verse). The advantage of this method of numbering lines +% of prose is that what is numbered is something the author chose to create +% (sentences and paragraphs) +% rather than an accidental feature of typesetting (line numbers). Paragraph and sentence +% numbering will also be stable across multiple editions, and, like line numbers in verse, +% provides a common system of reference. +% +% \textsf{poemscol} also provides +% the ability to make cross references to verse line numbers, to line numbers in prose sections, +% or to paragraph and sentence numbers in sections with ``paragraph and sentence'' annotation. +% +% \textsf{poemscol} also provides a few bells and whistles, such as the ability +% to create new endnote or footnote sections on the fly, the ability +% to center a poem on the longest line (or to move the margin of the +% verse block wherever you wish), and the ability to place a mark in the margin +% indicating where in the apparatus commentary on that line can be found. +% For long poems, \textsf{poemscol} can provide a +% a special running header which indicates the range of lines to be +% found on the page. +% It has a special command to place +% the publication date under the poem just at the left margin of the verse block even +% when the verse block is centered. +% \textsf{poemscol} also provides notes +% to be placed just after a poem (rather than at the bottom of the page +% or in the endnote sections). It gives the user +% fine control over the placement of line numbers and the placement and format of titles +% including multi-line titles. +% The user can choose whether to concatenate the notes for a poem into a single paragraph, +% or to give each note a separate paragraph. The user can print the notes +% in single or multicolumn format. The names of things like the Contents can +% be changed to facilitate editions in languages other than English. +% Just about every feature of \textsf{poemscol} can be +% easily customized. +% +% The best features of \textsf{poemscol} are of course simply that it +% is \TeX: it uses \TeX's automatic kerning and setting of ligatures, +% its algorithm for justifying lines (in prose sections), and \LaTeX's +% way of setting verse. +% +% Using \LaTeX\ to typeset critical editions offers more advantages +% than simply the ability to automate tedious and easy to fumble +% tasks. \TeX\ compilers have the ability to produce +% output in Adobe pdf format. Adobe pdf output can be used as camera +% ready copy, saving your publisher time and expense, and perhaps +% making a marginally economic critical edition a bit easier to bring +% to press. Furthermore, since typesetting the edition yourself in +% \LaTeX\ obviates the publisher's own typesetting of your text, it +% removes another possible source of new errors. (You should expect +% to work with your publisher on the final design of the book, but +% \LaTeX\ is a flexible language which will enable you to reproduce +% most book designs.) +% +% Editions made in the formats of proprietary software such as +% QuarkXPress\copyright\ or InDesign\copyright\ will become not only obsolete +% but unreadable if those programs pass from use. Since your \LaTeX\ +% sources for your edition are in ASCII, or perhaps Unicode, they provide a permanent +% record of your local intentions at every point in your edition, +% whether or not those who wish to consult your files have access to a +% \LaTeX\ compiler, or indeed (since most of the commands have self-explanatory names) +% whether or not they can read \LaTeX\ +% code. +% +% Although \LaTeX\ is a typesetting language, not a content +% markup language, the ability to create new commands which the +% language offers comes very close to enabling one to realize the +% ideal of completely separating content markup from formatting. One +% advantage of this kind of markup is that even if the appearance of +% the poem on the page may be ambiguous, the editor's intentions about +% the logical structure of the poem will be preserved in the \LaTeX\ +% source. Should you wish later to produce an electronic edition of +% your work, perhaps using the XML markup approved by the Text +% Encoding Initiative, transforming your texts from \LaTeX\ to XML +% would largely (although not entirely) be a matter of performing a +% series of global search-and-replaces, and could conceivably be done +% with a perl script. +% +% This is a long manual, but there is no need to study it all before beginning. +% In the first place, it includes all the commented-on source code for the +% package, which will only matter to you if you are planning to customize +% it in some way I didn't anticipate, or if you need to know how the commands +% work internally. (The code section begins on page \pageref{implementation}.) +% The most important commands are explained in the first 30 pages, and even there +% many sections discuss things you may not need to know immediately. Also, +% many sections conclude with a subsection which suggests ways of customizing +% the output, usually giving suggestions in increasing order of difficulty. You'll +% have to be the judge of what to skip the first time through. +% +% \section{Dependencies and compatibility with other packages} +% +%\subsection{~General} +% \textsf{poemscol} depends upon several other packages, which you +% should be sure you have in your preamble and search path: +% \textsf{fancyhdr} for managing the running headers, \textsf{makeidx} +% and \textsf{multicol} for managing the index, \textsf{geometry}, and +% \textsf{ifthen} and \textsf{keyval} to simplify page geometry. +% +% If you are planning to generate multiple indices, substitute +% \textsf{splitindex} for \textsf{makeidx} in your list of packages. +% +% +% \subsection{~Prose sections} +% If you plan to number lines in prose contexts, and to make textual +% notes, emendations, or explanatory notes in prose contexts, you will +% need to add the \textsf{lineno} package to your preamble. I use the +% ``right'' and ``modulo'' options with this package, but you can set +% the options however you wish to make how you number the lines of +% prose sections consistent with how you number the lines of verse +% sections. +% +% \subsection{~Multi-layer footnotes} If you plan to use +% paragraph-formatted footnotes rather than endnotes, you should load +% \textsf{manyfoot}. You should load it with the ``ruled,'' and +% ``para'' options. (\textsf{poemscol's} footnote commands are just a +% wrapper around \textsf{manyfoot}.) \textsf{manyfoot} inherited some +% of the limitations of \LaTeX\ in dealing with long inserts at the +% end of the page, so you may have to do some fiddling. As fixes to +% these problems emerge, I will incorporate them into +% \textsf{poemscol}. \textsf{manyfoot} does not allow multiple +% paragraph footnotes when typesetting in ``para'' mode. This is +% probably a feature, not a bug, since one would want such notes to be +% set in several paragraphs, rather than running them together into +% one, as \textsf{manyfoot} would naturally want to do in para mode. +% For that reason, I have defined the two traditional classes of note +% in which multiple paragraph notes are likely to appear, ``sources,'' +% and ``explanatory notes,'' to be typeset in ``plain'' mode, which +% opens a new paragraph with each note. If your textual notes or +% emendations sections also have multiple paragraph notes, you should +% re-define them in order to produce footnotes in plain rather than in +% para mode, if you wish to produce footnotes rather than endnotes. +% +% \textsf{manyfoot} sometimes gets into conflicts with other packages +% over the number of |\counts| it uses, causing \LaTeX\ to complain +% that there is no room for a |\newcount|. If this happens, +% issue |\usepackage{etex}| and |\reserveinserts| in your preamble. +% +% \subsection{~Special running header for long poems} +% For long poems, it is a convenience to have a running header +% that includes information about what lines of the poem appear +% on that page in the form firstline--lastline. The fancypagestyle |longpoem| +% will set that information in the running header. That page style +% uses the |\marks| mechanism, and requires more |\marks| than +% are available by default. To use it, you will need to add the \textsf{etex} and +% \textsf{emarks} packages to your preamble. +% +% \subsection{~Verse drama and \textsf{dramatist}} +% Massimiliano Dominici has made his \textsf{dramatist} package +% compatible with \textsf{poemscol}, for which I am very grateful. +% Versions 1.2a or later of \textsf{dramatist} are compatible with +% versions 2.3 or later of \textsf{poemscol}. +% +% +% \subsection{~Parallel text editions} +% \begin{sloppypar} +% If you are using the six pre-defined endnote sections +% for parallel text editions (|\rectotexnote|, |\versotextnote|, |\rectoemendation|, |\versoemendation|, +% |\rectoexplanatory|, |\versoexplanatory| and their prose equivalents |\rectoprosetextnote| +% and so on) you won't need to add any new packages. If +% you are defining your own endnote sections using |\definenewnotetype| you may need +% the |\keeptitlestraight| hack described below at section \ref{parallelhack}, +% page \pageref{parallelhack}. If you use |\keeptitlesstraight| you should add \textsf{etoolbox} +% to your package list.\end{sloppypar} +% +% \subsection{~Crop marks} +% \textsf{poemscol} no longer provides cropmarks, but is compatible with +% the style packages that do. I use \textsf{crop}, with the +% letter,pdftex,cam, and center options. +% +% \subsection{~Poem titles with marginal references} +% If +% you are using the |\JHpoemtitle| alternate form of the |\poemtitle| +% command, you need to add \textsf{mparhack} to your package list, to +% make sure that the marginal references |\JHpoemtitle| adds appear on +% the correct side of the page. You should make sure that +% \textsf{poemscol} is the very last package you load in your +% preamble, or at least is loaded after those packages upon which it +% depends. +% +% +% +% \subsection{~Incompatibility with \textsf{memoir} and \textsf{verse}} +% Unfortunately, \textsf{poemscol} is not compatible with the +% \textsf{memoir} class and the \textsf{verse} package, because they +% share some command names. I will eventually prepare a workaround for this +% problem. +% +% \subsection{~Conflict with \textsf{BibLaTeX} } +% \BibTeX\ works with \textsf{poemscol} with no problem. But a bug I haven't +% yet tracked down (probably involving |\makeatletter|) +% complicates the use of \textsf{BibLaTeX}. To use \textsf{BibLaTeX} +% you will need to open up the .bbl file. You will find near the top +% the following lines:\\ +% |\makeatletter|\\ +% |\@ifundefined{ver@biblatex.sty}|\\ +% | {\@latex@error|\\ +% |{Missing 'biblatex' package}|\\ +% | {The bibliography requires the 'biblatex' package.}|\\ +% | \aftergroup\endinput}|\\ +% |{}|\\ +% Just comment out these lines and you will be able to use the .bbl file as usual. +% +% +% \subsection{~Compatibility with earlier versions of +% \textsf{poemscol}} Making \textsf{poemscol} compatible with +% \textsf{lineno} required me also to change the commands for turning +% verse line numbering on and off, which means that version 2.3 of +% \textsf{poemscol} is incompatible with prior versions. The old +% command |\makelinenumbers| has been replaced with +% |\makeverselinenumbers| to distinguish it from a command from the +% \textsf{lineno} world. (|\makelinenumbers| will still work, but I +% have deprecated it.) To turn on verse line numbering, issue +% |\makeverselinenumbers|. Because the counter ``linenumber'' has +% been changed to ``verselinenumber,'' you must use +% |\global\verselinenumbersfalse| to turn off line numbering, rather +% than |\global\linenumbersfalse| as before. +% +% Up to version 2.44 \textsf{poemscol} borrowed the code for +% |\sidepar| non-floating marginal paragraphs from the memoir class, +% and also made |\leftsidepar| and |\rightsidepar| commands on their +% model. Version 2.46 modified Peter Wilson's original code for +% |\sidepar|, so therefore I have changed the names of |\sidepar|, +% |\leftsidepar|, and |\rightsidepar| to |\pmclsidepar|, +% |\pmclleftsidepar| and |\pmclrightsidepar| respectively. If you +% used any of these commands in your files, you will need to change +% their names. +% +% Up to version 2.5 the |\definenewnotetype| command took four +% arguments, using the third argument for both the running header for +% the notes section and for the entry in the table of contents. In +% order to make it easier to handle titles in languages other than +% English I have found it necessary to separate these two uses, so +% |\definenewnotetype| now takes five arguments. You will need to +% retrofit files that use the old version of this command. You can +% see the details at section \ref{definingnewnotes}, page +% \pageref{definingnewnotes}. +% +% \section{Marking up individual poems} +% First, a word about the command names. The command names may seem +% ugly and long. And there are separate commands for many tasks that +% seem closely related, such as a command to mark the title of a +% section of a poetic sequence, and a separate command to mark a +% subsection. But the names do describe pretty much what +% each command does, and they do specify exactly what the object they +% mark is supposed to be. The markup is designed to look like content +% markup, marking objects as a poem title, as a stanza, as a line, and so on. +% \textsf{poemscol} gives all of these content terms typographical +% meaning. +% +% There are also many commands for special purposes whose necessity +% may not seem clear until the editor finds him or herself in the jam +% the command was designed for. For instance, \textsf{poemscol} +% normally encourages a page break before the title of a poem, or +% before the title of a section of a poetic sequence, to discourage +% page breaks between the title and the poem. But for the first +% section of a poetic sequence, or the first section of a poem in +% sections, one does not want to encourage \LaTeX\ to break the page +% before the section title, since that would leave the title of the sequence +% or the title of the larger poem as an orphan on the previous page. +% |\sequencefirstsectiontitle| and its siblings are designed for this +% situation. Although all commands like |\sequencefirstsectiontitle| +% discourage page breaks before the title (and all of the commands +% discourage page breaks after the title), widowed or orphaned titles, +% and orphaned first lines will still sometimes +% happen, particularly if you have a multi-line sequence title +% followed by a multi-line section title. For these cases, a page +% break at some other suitable point will have to be explicitly issued to +% move widowed or orphaned lines to better places. +% +% \subsection{~The title of the poem} +% +% \DescribeMacro{\poemtitle}|\poemtitle|, as its name implies, sets +% its argument as the title of the poem. +%The command takes one +% argument --- the title, of course. The command typesets the title in +% the body of the volume (testing first to see whether there is enough +% space at the bottom of the page to get the title and a couple of +% lines of the poem in), typesets the title in the table of contents +% (with the page number), typesets the title in the textual notes +% (adding the page number, and checking to see whether there is room +% enough on the page), and prepares similar entries in the lists of +% emendations and in the explanatory notes (if you need them) +% as well as in the endnote sections for any species of endnote you have defined for yourself. +% \textsf{poemscol} gives default values for +% such things as the font size, the separation between the top of the +% title and the bottom of the previous poem, the separation between +% the bottom of the title and the first line, and so on. It also sets +% penalties in order to encourage page breaks just before a title, and +% to discourage page breaks between a title and a poem. +% +% You can +% change all these values in your preamble by changing the value of +% the parameters for the relevant commands, listed below in the implementation section, using +% either |\setlength| or |\renewcommand| (depending upon what you are +% changing). +% +% \subsubsection{Customization of titles} +% \DescribeMacro{\centertitles} By default, titles place at or near (depending on the kind +% of title) the left margin. To center all titles, issue |\centertitles|. (Centering titles might be +% especially useful if you are setting poems so that the longest line +% of the verse block is centered on the page. For instructions about +% how to center the verse block in this way, see section \ref{centeringtextblock} +% on page \pageref{centeringtextblock}.) If you have multi-line +% titles, |\centertitles| will center each line. |\centertitles| also moves in epigraphs, headnotes, +% attributions, and dedications towards the center. Since an epigraph or a headnote may be +% a prose paragraph, or a passage of verse, it would be unwise to set them in a centering +% environment, so |\centertitles| just moves them towards the center. To adjust the placement +% of epigraphs and similar things, see section \ref{centerepigraphs}, page \pageref{centerepigraphs}. +% +%\begin{sloppypar} +% \DescribeMacro{\leftaligntitles} Rather than centering the title over +% a centered block of verse, one might prefer to align the title with +% the left margin of the centered verse block. To do this, issue +% |\leftaligntitlestrue| to set the boolean |\ifleftaligntitles|. The length |\versewidth| +% is used both to center the verse block and to place the title at the verse block's left margin. +% You will need to use |\settowidth| to set the length of |\versewidth| before +% issuing |\poemtitle| or the other title-making commands (such as |\sequencesectiontitle|). +% Issue |\settowidth{\versewidth}{Text to be used for centering}| just +% before you issue the |\poemtitle| or |\epigraph| command. For how to use |\settowidth| to center the +% verse block or to align titles, epigraphs, and so forth with the left margin of the +% verse block, see section \ref{centeringtextblock}, page \pageref{centeringtextblock}. +% +% \DescribeMacro{\leftalignepigraphs} You +% may also wish to align epigraphs, dedications, attributions, or +% headnotes with the left margin of the verse block (even if you +% center the titles). To do this, issue |\leftalignepigraphstrue| to +% set the boolean |\ifleftalignepigraphs|. +% |\leftalignepigraphstrue| will also align attributions, +% dedications, and other pre-texts of poems. (It will not affect the +% dedications and attributions on volume title pages, which are set +% using the |\volumededication|, |\volumeepigraph|, and +% |\volumeattribution| commands.) +% \end{sloppypar} +% +% \begin{sloppypar} +% \DescribeMacro{\poemtitlefont} +% |\poemtitlefont| globally sets the font size (and +% leading) for all poem titles in the main text. +% For instance, you can change the font parameters for the font for +% setting poem titles from 14 points type on 18 points leading to 12 on 14 by issuing +% |\renewcommand{\poemtitlefont}{\fontsize{12}{14}\selectfont}| in +% your preamble. There are similar commands to set the font size and leading for +% the titles of poetic sequences, +% sequence sections, titles of volumes, and so on. +% You can find a complete list of those font parameters at section \ref{internal font size commands}, +% page \pageref{internal font size commands}. +% +% |\poemtitlefont| and its siblings do not change the +% default typeface. To change the default typeface to, say, Times Roman, or +% Tex Gyre Pagella, use the commands \LaTeX\ +% or Xe\LaTeX\ provide for that purpose (e.g.\ |\usepackage{tgpagella}|). Changing the default +% typeface is probably something you would want +% to do globally, not at the level of classes of title, anyway. +%\end{sloppypar} +% +% \DescribeMacro{\contentspoemtitlefont} +% |\contentspoemtitlefont| globally sets the font size (and leading) +% for poem titles in the table of contents. There are similar commands for each of the +% other kinds of titles in the table of contents. They can be changed just as the font +% parameters for titles in the main text are changed, using |\renewcommand|. +% You can find a complete list of those font parameters at section \ref{internal font size commands}, +% page \pageref{internal font size commands}. +% +% \begin{sloppypar} +% \DescribeMacro{\afterpoemtitleskip} +% |\afterpoemtitleskip| +% sets the vertical separation between a poem and its title. To change +% its value, for instance, to |\medskip| (the default is |\smallskip|), +% issue |\renewcommand{\afterpoemtitleskip}{\medskip}| in your preamble. +% |\afterpoemskip| sets the vertical separation between the end of a +% poem and the title of the next poem. ``Skips'' for other kinds of title can be +% changed the same way. You can find a complete list of these skips at +% section \ref{skiplist}, page \pageref{skiplist}.\end{sloppypar} +% +% \DescribeMacro{\poemtitlepenalty} +% |\poemtitlepenalty| encourages +% but does not require a page break just before a poem title. To change +% the penalty, for instance, from -1000 to -3000, +% issue |\renewcommand{\poemtitlepenalty}{\penalty-3000}| +% in your preamble. Penalties for other kinds of title can be changed the same way. +% A +% complete list of all of the special commands for setting font sizes, +% skips, and penalties, is in section \ref{changingfontsandleading}, page +% \pageref{changingfontsandleading}, below. +% +% \DescribeMacro{\putpagenumberinnotesfalse} +% If you don't want the entry in the notes section for this poem to include +% the page number of the poem, issue |\putpagenumberinnotesfalse|. +% +% \DescribeMacro{\titleindent} |\titleindent| is an internal command for indented parts of titles. +% You should change it with caution. In the +% commands for setting the sections and subsections of poetic sequences, +% \textsf{poemscol} uses |\titleindent| internally to set up a +% hierarchy of indentations. (A section of a sequence is indented one +% |\titleindent|. A subsection is indented two. And so on.) +% |\titleindent| is also used internally in the commands for multiple +% line titles. Instructions about changing the value of |\titleindent| +% can be found in section \ref{changingfontsandleading}. +% +% \subsubsection{Subtitles and special titles} +% \DescribeMacro{\poemsubtitle} Subtitles of poems should be issued as +% the arguments to the |\poemsubtitle| command. +% +% Multiple line titles (if it matters how they are broken up on page), +% titles of subsections of poems, titles of +% sequences of poems, titles of the elements of a sequence of +% poems, and ``empty'' titles (for untitled poems) +% are all special cases, with special commands, which will be +% dealt with below at sections \ref{multilinetitles} and \ref{poeticsequences}. +%You can also create new varieties of title. For instructions +% on how to do this, see section \ref{customizing titles} below, page \pageref{customizing titles}. +% +% \subsection{~The body of the poem} +% +% \subsubsection{The poem environment} +% \DescribeEnv{poem} The body of every poem should be placed in a +% |poem| environment. Putting the body of the poem between +% |\begin{poem}| and |\end{poem}| resets the line counter to 1, +% puts the poem in a modified |verse| environment (to handle run over lines +% automatically), and turns off automatic hyphenation with the |poem| environment. +% +% \DescribeEnv{pmclverse} \textsf{poemscol} slightly modifies the |verse| +% environment from the standard \LaTeX\ definition, increasing the +% indentation used for run over lines, in order to make the difference +% between the indented run over portion of a long line, on one hand, +% and an explicitly indented second line, on the other, more obvious in the output. +% \textsf{poemscol} also adds a little bit +% more white space between stanzas than the standard \LaTeX\ |verse| +% environment does. (I found that the standard stanza breaks did not +% leap out on the page as stanza breaks.) +% The verse environment for \textsf{poemscol} is |pmclverse|, defined +% below on page \pageref{versedefine}. You don't have to place poems explicitly in +% the |pmclverse| environment. The |poem| environment automatically opens (and closes) +% |pmclverse|. +% +% \subsubsection{Customizing the poem environment} +% \DescribeMacro{\versewidth} +% The |poem| environment uses an optional argument to center the verse block on a +% line of a given width. If your poem has +% short lines, and you wish to center it on the page, rather than set +% it against the left margin of the normal |poem| environment, you can +% give the width of the line you want to use to center the poem as the optional +% argument. To center a verse block 30 ems wide, for instance, issue +% |\begin{poem}[30em]|. +% +% \label{centeringtextblock} +% Rather than specifying the length explicitly, you can use the length +% |\versewidth| as the optional +% argument to |\begin{poem}|. You can set the length of |\versewidth| to the proper +% amount using |\settowidth| as follows: +% \begin{center} |\settowidth{\versewidth}{Text of line to use for centering}|. \end{center} +% Once you have set |\versewidth| +% to center the poem on a sample line, you use it to center the |poem| environment this way: +% \begin{center} |\begin{poem}[\versewidth]|.\end{center} +% Notice that the optional argument is in square braces, +% not in curly braces. +% +% If you are planning to align the poem title with the +% left margin of the centered verse block you should use the |\versewidth| method +% to center the verse block, since |\versewidth| is used to place the title in that case. +% (You can just enter a length into the optional argument of |\begin{poem}|, but in that case, +% if you are left-aligning the poem title, you should set |\versewidth| to that value +% by issuing e.g. |\setlength{\versewidth}{30em}|.) +% +% \DescribeMacro{\linenumberscenteredwithverse} +% If you want to center the verse on the page using the optional argument to |\begin{poem}|, +% you probably also want +% to move the line numbers in, so as to be closer to the line. +% \textsf{poemscol} will do this by default. If you wish to leave the line +% numbers at the margin, set the boolean |\linenumberscenteredwithverse| to +% false. For centered verse, the distance between the line numbers and the +% verse can be set by setting the length of |\marginparsepmin| (not +% |\marginparsep|). The default +% value of |\marginparsepmin| is 2 em. +% +% \begin{sloppy} +% \DescribeMacro{\centertitles} +% If you center the poem on a sample +% line, you probably also want to center the title of the poem too, +% which you can do by issuing |\centertitles|. If you decide against centering the title, +% you can either just remove or comment out the |\centertitles| command, or +% switch a boolean by issuing |\centertitlesonfalse|. By default, |\centertitles| +% also moves epigraphs, dedications, headnotes, and attributions toward the center. +% To prevent this, issue |\centerepigraphsonfalse|.\end{sloppy} +% +% \DescribeMacro{\iftextcenteringturnedon} Suppose you have marked up many poems with +% the optional second argument to |\begin{poem}|, which would cause the text +% block to be centered on the longest line, but change your mind about +% centering all the poems. You can turn off centering, without +% erasing all of the second arguments, by issuing |\textcenteringturnedonfalse|. +% You can turn on centering the text block again by issuing +% |\textcenteringturnedontrue|. +% +% \DescribeMacro{\versemarginadjust} +% If you don't want to center the verse block on the longest line, but do want +% to adjust its horizontal placement, you can adjust the +% placement of the verse block by changing the value of the +% length |\versemarginadjust|. For most commonly used type sizes, setting +% |\versemarginadjust| to 28pts will put the verse block at the left margin. +% +% \subsubsection{Hyphenation is off in the poem environment} +% \textsf{poemscol} turns off automatic hyphenation in poetry +% environments. The idea here is that every hyphen in the printed +% poem is authorial, obviating the need for you to compile a +% hyphenated-lines list to distinguish between authorial hyphens and +% hyphens you added for lineation purposes. Line-ending hyphens +% should not be a feature of verse anyway, I think. +% +% You may wish to restore automatic hyphenation in poetry environments +% for your own edition. +% If you do so you must keep track of added hyphens yourself. This +% list will be easy to compile, however, because only authorial +% hyphens will appear in your source code. Automatically added +% hyphens will appear only in the output. (You might even modify the +% output routine so that automatically added hyphens have a different +% look. That would be non-trivial, but Donald Knuth has an exercise +% about doing just that in \emph{The \TeX book}.) To +% restore automatic hyphenation, copy the definition of the |poem| +% environment (below at page \pageref{poemdef}) and redefine the +% environment using |\renewenvironment|, commenting out the line that reads +% |\language=255|. Place the renewed definition of the environment in your preamble, +% with |\makeatletter| before the renewed definition and |\makeatother| after it. +% If you are restoring automatic hyphenation for a parallel-text +% edition, be aware that |\startparalleltexts| also (defined below at +% page \pageref{startparalleltexts}) redefines the |poem| +% environment, so you will have to change |\startparalleltexts| using +% |\renewcommand| as well. +% +% \textsf{poemscol} +% turns automatic hyphenation back on in prose contexts, so if you +% wish to keep a hyphenation list for such things as authorial +% prefaces and so on, you must do so yourself manually. +% (Alternatively, you can turn automatic hyphenation off in those +% contexts as well, by setting the |\language| to 255. For an example +% of how to do this, look at the definition of the |poem| environment +% in the implementation section below. If you do turn automatic +% hyphenation off, it would be wise to restrict the change to some +% particular environment, rather than changing the |\language| +% globally. You might wish, for instance, to turn automatic +% hyphenation off in the |prosesection| environment.) +% +% \subsubsection{The stanza environment} +% \DescribeEnv{stanza} Every stanza should be placed in its own stanza +% environment. Every poem should have at least one stanza. Marking +% the beginning and end of every stanza (with |\begin{stanza}| and +% |\end{stanza}|) provides \textsf{poemscol} with a way of detecting +% cases in which a page boundary falls on a stanza break, since in +% those cases a page turn happens when one is \emph{inside} a poem +% environment but \emph{not} inside a stanza environment. Further, +% marking the beginning and end of every stanza makes the logical +% structure of the poem (and the editor's intentions about it) clear +% to readers of your source code. If you want to change the |stanza| environment +% consult its definition below at page \pageref{stanzadefine}. +% +% \DescribeMacro{indentedverse} To indent stanzas (or stretches of verse) relative to the margin +% you can use the |indentedverse| environment. +% You can also +% set different stanzas or passages at a hierarchy of levels of indentation. +% (For how to do this, see section \ref{indentedverse} below, page \pageref{indentedverse}.) +% +% \DescribeMacro{\stanzaatbottom} +% \DescribeMacro{\nostanzaatbottom} +% If you wish to change the symbol used to mark cases in which a +% break falls on a page turn, issue the command |\stanzaatbottom|, +% using as the argument whatever you wish to use to mark such cases. +% The default is *, which is suitable for a published volume. If you +% are preparing a typescript for submission, you may wish to set +% |\stanzaatbottom| to ``stanza break.'' +% +% If you wish also to mark all cases where there is \emph{not} a stanza break +% at the bottom of the page, issue the command |\nostanzaatbottom|, +% using as the argument whatever you wish to mark such cases. The +% default is |\relax| (which is to say, ``don't do anything''). +% +% \subsubsection{Verse lines and line numbering} +% \DescribeMacro{\verseline} |\verseline| should mark the end of every +% line, except the last line of every stanza (which should be marked +% with |\end{stanza}|). |\verseline| marks the end of every line as a +% prosodic unit (since a line of verse is not simply a carriage +% return), and advances the line counter. There are commands below +% for changing the line counter's horizontal placement (how close it +% is to the left or right margin of the line) and appearance. (See +% section \ref{marginalgeometry} for these.) +% +% +% \DescribeMacro{\setverselinemodulo} |\setverselinemodulo| sets how +% often a marginal line number appears. To print a line number every +% five lines, issue |\setverselinemodulo{5}|. The default value is +% 10. +% +% +% \DescribeMacro{\makeverselinenumbers} +% Marginal verse line numbering is on by default. To turn line +% numbering off, issue |\global\verselinenumbersfalse|. To turn it +% back on, issue |\makeverselinenumbers|. +% +% \begin{sloppypar} +% \DescribeMacro{\verselinenumberstoright} +% \DescribeMacro{\verselinenumberstoleft} +% To put all of the line numbers to the left, issue |\verselinenumberstoleft| in +% your preamble. |\verselinenumberstoright| puts the line numbers in the right +% margin. (These two commands use non-floating marginal note commands derived +% from the \textsf{memoir} class, |\pmclleftsidepar| and |\pmclrightsidepar|, +% respectively.) +% \end{sloppypar} +% +% \DescribeMacro{\verselinenumbersouter} +% \DescribeMacro{\verselinenumbersgutter} +% If you wish the line numbers to appear in the outer margins of each two-page spread, issue +% |\verselinenumbersouter| in your preamble. If you want the line numbers to +% appear in the inner margins, issue |\verselinenumbersgutter| in your preamble. +% (These two commands use |\pmclsidepar|, derived from |\sidepar| from the +% \textsf{memoir} class, but modified by Dan Leucking.) +% +% \begin{sloppypar} +% \DescribeMacro{\marginparsep} +% You can adjust the +% distance between the marginal line number and the text with +% |\setlength{\marginparsep}{your length}|. The default value for |\marginparsep| is 18pt, +% and the default value for the width of the box in which the line numbers are +% set, |\marginparwidth|, is 18 pt. If you are setting with the line numbers to +% the right, |\marginparwidth| can be as small as you wish, although your log +% file will be full of complaints if you make it too small. But if you are +% setting with the line numbers to the left, if |\marginparwidth| is narrower +% than the width of the line number, the line number will be moved down a line. +% Setting |\marginparsep| to zero lines the verse line numbers up with the page +% numbers, and puts both at the margin. If you move the verse line numbers by +% changing |\marginparsep|, you can move the page numbers to keep them aligned +% by changing |\headoffsetlength| to the same value. +% \end{sloppypar} +% +% \DescribeMacro{\marginparsepmin} +% If the verse block is centered on the longest line, the distance between the line numbers and the +% verse can be set by setting the length of |\marginparsepmin| (not +% |\marginparsep|). The default +% value of |\marginparsepmin| is 2em. +% +% \DescribeMacro{\pmclsideparvshift} +% The line numbers should print on the baseline. You can adjust them +% to move them up or down by changing the value of a length called +% |\pmclsideparvshift|. The default value is +% |\setlength{\pmclsideparvshift}{0ex}|. +% +% \subsection{~Special line markup} +% \subsubsection{Indentation, line breaks, runover, and broken lines} +% \begin{sloppypar} +% \DescribeMacro{\verseindent} The |\verseindent| command is to be +% used for formally indented lines. It should not be used to indent +% the run over portion of long lines (which \textsf{poemscol} handles +% automatically anyway). |\verseindent| indents the line a bit less +% than the run over portion of long ``bent'' lines are indented, so +% that the two cases can be visually distinguished. By default, the +% length of |\verseindent| is 2 em. To change it, say to 3 em, issue +% |\renewcommand{\verseindent}{\hspace{3em}}|. +% Alternatively, you can change the length |\verseindentamount| by +% issuing |\setlength{\verseindentamount}{3em}|.\end{sloppypar}\goodbreak +% +% You can create a hierarchy of indentations by issuing |\verseindent| +% multiple times. But you can also use an optional argument to |\verseindent|, with +% the number indicating how many levels of indentation to add to this line, like so +% |\verseindent[3]| for the third level of indentation, (with each level being one |\verseindent| +% deep. If you use this option, don't put any white space between the end of the +% |\verseindent| command and the beginning of the poetic text, otherwise +% poemscol will add about 10pt of unwanted extra white space. (The only real +% consequence of forgetting about this will be that |\verseindent[1]| will be about +% 10pts deeper than plain |\verseindent|, which may not really be an issue for you.) +% +% \begin{sloppypar} +% \DescribeMacro{indentedverse} \label{indentedverse} You might want to indent whole stanzas, +% or perhaps extended passages of verse, relative to the rest of the poem (you might +% for instance, want to indent refrains systematically). This would be tedious to +% do using |\verseindent|. Put stretches of +% verse you wish to indent in the |indentedverse| environment. Whatever is +% in this environment will be indented. The indentation will be of the length +% |\indentedstanzaamount|, which is by default set to |\verseindentamount|, +% which by default is 2 em. You can change |\indentedstanzaamount| to 3em, by issuing +% |\setlength{\indentedstanzaamount}{3em}|. +% +% You can also set a hierarchy of intended stanzas +% or passages by issuing an optional argument to |\begin{indentedverse}|. So, for instance, +% |\begin{indentedverse}[2]| will indent that environment by two |\indentedstanzaamount|s +% (4 em), and |\begin{indentedverse}[3]| will indent that environment by three +% |\indentedstanzaamount|s, or 6 em. Note that if you use the optional argument, you +% must enclose it in square brackets, not curly ones. Note also that (for reasons +% I have not been able to track down) |\indentedverse[1]| indents the stanza +% slightly more deeply than plain |\indentedverse|. To preserve a +% consistent look for a hierarchy of indented stanzas, use |\indentedverse[1]| for the +% lowest level of indentation, not plain |\indentedverse|. \end{sloppypar} +% +% \DescribeMacro{\linebend} \textsf{poemscol} automatically runs over +% long lines, indenting the run over portion on the next physical +% line. If you are unhappy with where \textsf{poemscol} has run over +% a particular line, you can ``bend'' that line by issuing |\linebend| +% at the point where you wish it to run over. The run over portion of +% the line will be indented just as if \textsf{poemscol} had ``bent'' +% the line at your selected point. This command only works if you +% have chosen to bend the line at some point earlier than +% \textsf{poemscol} would have chosen on its own. +% +% You may also wish to use |\linebend| to reproduce how your author +% broke up long lines on the page (if you know that your author cared +% about such things and did not leave them up to the typesetter). +% +% |\linebend| should only be used for managing run over lines, not for +% cases in which a line is to be broken into separate half-lines. For +% cases in which a line is to be broken into half-lines, use the +% |\brokenline| command. The two commands do similar (but not identical) +% things. But a ``linebend'' is a feature of typesetting, and a +% ``broken line'' is a feature of versification, and it seems best to +% distinguish them logically. (|\linebend|, like |\brokenline|, issues +% a carriage return without incrementing the line number, but +% |\linebend| adds indentation to the next line.) +% +% If you +% want to extend a line further into the right margin, beyond the normal break point, you can +% probably do so by using a combination of |\nobreak| and |\hbox|, +% or by turning all of the spaces in that line into unbreakable +% spaces, marked with |~| in your source. But \textsf{poemscol} will +% complain if you do this, and rightly so, since the result is likely +% to be ugly. It would probably be wiser to adjust the lengths |\leftmargin| +% and |\rightmargin|, allowing all of the line to be a little bit longer. +% +% \DescribeMacro{\runoverindent} To change the indentation for the run +% over portion of verse lines globally, issue the amount of +% indentation you desire as the argument to |\runoverindent|. +% |\runoverindent| is currently set to 6 em, rather more than the +% standard amount in the definition of the \LaTeX\ |verse| +% environment. By default, the runover portion of long lines is +% indented. You may wish to flush the runover portion to the right +% margin instead. For instructions about how to do this, see section +% \ref{rightflushverse}, page \pageref{rightflushverse}. +% +% \DescribeMacro{\brokenline} +% \DescribeMacro{\versephantom}|\brokenline| should be used where you +% wish to break the line without incrementing the line counter. +% Authors often break a line into two half-lines, setting the +% beginning of the second half-line flush with the end of the first +% half-line. (Sometimes these broken lines indicate a change of +% speaker. Sometimes they just indicate a change of subject, usually +% an abrupt one, a change which calls attention to itself by +% interrupting a line rather than waiting for a line break or stanza +% break). |\brokenline| is normally used with |\versephantom|, +% which adds white space exactly as long as its argument would have +% been had it been set in type. |\versephantom| thus provides an easy +% way of setting the beginning of the second half-line flush with the +% end of the first, whatever the font size or special formatting of the +% first line. +% +% +% The sestet of Yeats's sonnet ``Leda and the Swan,'' has such a broken +% line: +% \begin{verse} +% A shudder in the loins engenders there\\ +% The broken wall, the burning roof and tower\\ +% And Agamemnon dead.\\ +% $\phantom{And Agamemnon dead.~}$ Being so caught up,\\ +% So mastered by the brute blood of the air,\\ +% Did she put on his knowledge with his power\\ +% Before the indifferent beak could let her drop?\end{verse} +% +% To set the broken line properly, issue: +% \begin{verse} +% And Agamemnon dead.|\brokenline|\\ +% |\versephantom{And Agamemnon dead.}| Being so caught up,|\verseline| +% \end{verse} +% +% \DescribeMacro{\stanzalinestraddle} +% Some poets (such as Robert Penn Warren) occasionally introduce a +% stanza break in the middle of a broken line, considering the line to +% be a single metrical unit despite the fact that it straddles a stanza +% break. To record these cases, mark the end of the first half-line +% with |\end{stanza}| as usual. But instead of opening the next stanza +% with |\begin{stanza}| issue |\stanzalinestraddle| instead. This will +% make sure that the line counter counts the straddling line as only one +% line, despite the stanza break. |\stanzalinestraddle| is usually used +% with |\versephantom|. +% +% \subsubsection{Customizing broken lines} +% \DescribeMacro{\tweakbrokenline} +% By default, \textsf{poemscol} sets the line numbers level with the +% ends of broken lines. If the line numbers are set to the right of +% the text, this seems the obvious choice. Conceivably you might want +% to set the line number level with the beginning of a broken line +% when the line numbers are set to the left. To ensure that the line +% numbers of broken lines are set level with the beginning of a +% broken line when the line number is on the left, issue +% |\tweakbrokenline| in your preamble. +% +% You should issue |\tweakbrokenline| with caution, because although +% it changes how |\brokenline| is handled, it does not change the +% handling of long lines with runover. Runover lines will still set +% the line number level with the end of the line. You can have +% runover lines set their line number level with the beginning of the +% line by issuing |\startverseline| at the beginning of the line. +% +% \DescribeMacro{\brokenlineatbeginning} Conceivably you might want +% |\brokenline| to set the line number level with the beginning of +% the line in every case. To do this, issue |\brokenlineatbeginning| +% in your preamble. If you do this, you should be prepared to mark +% the beginning of runover lines with |\startverseline|. +% +% \DescribeMacro{\startverseline} +% If you begin a verse line with |\startverseline| the line number +% will be set level with the beginning of the line rather than with +% the end. This is useful, for instance, if you want to ensure that +% the line number of a line with runover is set level with the +% beginning of the line. You can, if you don't want to keep track of +% where runover lines are, start every line with |\startverseline|. +% +% \DescribeMacro{\tweakstartverseline} +% Rather than setting the line number of every runover line level with +% the beginning of the line, it may make more sense for you to set the +% line number level with the beginning in cases where the line number +% is to the left, and level with the end in cases where the line +% number is to the right. You might want to do this, for instance, if +% you have decided to set all the verse lines at the outer margin (by +% issuing |\verselinenumbersouter| in your preamble), or have decided to +% set all the verse lines at the inner margin (by issuing +% |\verselinenumbersgutter| in your preamble). To ensure that +% |\startverseline| does this, issue |\tweakstartverseline| in your +% preamble. +% +% \subsubsection{Right-flushed runover lines} +% \DescribeEnv{rightflushverse} +% \DescribeMacro{\rightversebegin}\label{rightflushverse} By default, +% \textsf{poemscol} indents the runover portion of long lines by the +% amount |\runoverindent| (by default 6 em). It is possible to set +% verse so that the runover portion is flushed to the right margin. +% To do this, you should put the |\rightflushverse| environment inside +% the |\poem| environment. And you must mark the beginning of each +% verse line with |\rightversebegin|. Christian Ebert has reminded me +% that the |\rightflushverse| environment must be issued \emph{inside} +% the poem environment. Otherwise it simply flushes every line to the +% right. +% +% It is rather clumsy to need a special environment for verse with +% right flushed runover. I plan to provide a command for switching +% between a verse environment that indents runover lines and a verse +% environment that flushes runover lines to the right. I have seen +% examples of this kind of environment from Markus Kohm and Christian +% Ebert, but so far I haven't been able to persuade them to play well with \textsf{poemscol} +% +% \subsection{Cross references by line number} +% \DescribeMacro{\poemlinelabel} \label{poemlinelabel} +% |\poemlinelabel| enables crossreferences by line number. To make +% a line label, issue |\poemlinelabel{text of label}| right after the +% line to which you wish to refer, where ``text of label'' is some +% distinctive label you can use for a reference elsewhere. (You +% should issue the command \emph{after} the |\verseline| or +% |\end{stanza}| command, to make sure that the line number will be +% correct.) To produce the reference, just issue |\ref{text of label}| as usual. +% (|\poemlinelabel| is just a crudely hacked +% version of |\label| from \LaTeX.) |\pageref{text of label}| will set +% the page number of the page on which the label appears. +% +% \section{Making a table of contents} +% \subsection{~Setup} +% \DescribeMacro{\makepoemcontents} +% I found the normal \LaTeX\ commands for making tables of contents for scholarly works +% unsuited for making tables of contents of poetry, so I have provided my own. To make a table of +% contents for your poems, issue |\makepoemcontents|. +% +% |\makepoemcontents| takes an optional argument, which +% sets the page number for the table of contents. If your publisher +% wishes to add some front matter so that the contents will appear on +% page vii, you should issue |\makepoemcontents[7]|. +% +% It might seem +% as though you would want to issue this command in your preamble. In +% fact it is better to issue it in the body of the document, +% immediately \emph{after} issuing the |\putpoemcontents|, the command which +% inputs and typesets a table of contents from a prior run. If you issue |\makepoemcontents| +% before issuing |\putpoemcontents|, you will simply erase the table of contents +% from the prior run (the one which will have all the contents information you +% are intending to use) and enter an empty table of contents into your document. +% +% \subsection{~Printing the table of contents} +% \DescribeMacro{\putpoemcontents}\label{putpoemcontents} +% Information for your table of contents will be written to an +% external file with the extension .ctn. |\makepoemcontents| creates this file, and +% opens an output channel to send information to it. |\putpoemcontents| closes +% the file and reads it into your document. +% +% You will need to run your +% book through \LaTeX\ twice in order to generate a table of contents, +% the first time to generate the titles and the references for the page numbers, and the second +% time to use the labels to which the references point +% to enter the page numbers. (Under some circumstances --- if +% you have an index, for instance --- you may need three passes rather +% than two.) +% +% \DescribeMacro{\resetpagestyle} +% Because the +% table of contents uses a special page style and special fonts +% |\putpoemcontents| issues |\resetpagestyle|, +% which restores the default fancy page style to ``main'' once it has +% input the contents, and restores the font size to |\normalsize| as well. +% +% \DescribeMacro{\pagenumbering} +% Be sure to +% reset the style of page numbering (from |\pagenumbering{roman}| to +% |\pagenumbering{arabic}|) after issuing |\putpoemcontents|, since +% when you read in the external file created by |\makepoemcontents| +% the page numbering will be set to roman numerals. The command +% |\resetpagestyle| (which is called by |\putpoemcontents|) will reset +% the fancy page style to that used in the main body of the volume, +% but it won't change the page numbering to arabic, in case there is +% some frontmatter between the contents and the main text, so you +% should be sure to do so yourself. (Front matter is normally given page numbers +% in roman numerals.) If you neglect to issue +% |\pagenumbering{arabic}| at the end of your front matter, the +% page numbering will remain in roman numerals. The notes sections +% use the page numbers from the poem to construct running headers of +% the form ``Notes to pp.~xx--yy.'' If those numbers are roman +% numerals rather than arabic ones, \textsf{poemscol} will not +% recognize them as numbers, and you will get the infamous ``Missing +% Number'' error that puzzles so many users of \LaTeX. +% +% \subsection{~Contents entries for notes sections and the index} +% +% \begin{sloppypar}\DescribeMacro{\puttextnotes} +% \DescribeMacro{\putemendations} +% \DescribeMacro{\putexplanatory} +% |\puttextnotes|, and its siblings |\putemendations| and +% |\putexplanatory|, input the formatted endnotes +% sections into your document, and put entries for them into your table of contents. +% You will have to run \LaTeX\ again to set the page numbers of those sections +% in the +% table of contents properly. The first run sets the title of the endnotes section and a label to find the +% page number to add to the table of contents, and the second run +% actually sets page number. (These commands are described +% below, in section \ref{putexternalfiles}.) All of these commands +% also restore normal hyphenation for the endnotes sections. \end{sloppypar} +% +% \DescribeMacro{\putpoemindex} +% |\putpoemindex| inputs the formatted index (after your raw entries have been +% processed by MakeIndex), and adds an entry +% for it into the table of contents. +% Remember that if you are making an index of titles and first lines +% you may need to run your file through \LaTeX\ twice more after running +% MakeIndex, to put the entry for the index and its correct page number into your table of +% contents. +% +% \DescribeMacro{\putmultiplepoemindex} +% Use |\putmultiplepoemindex| instead if +% you are making several indices. For instructions about +% |\putmultiplepoemindex| see section \ref{multipleindex}, +% p.~\pageref{multipleindex}. +% +% \subsection{~Customizing contents entries} +% Lines in the table of contents usually include an indent (how +% much of one depends upon what the entry is --- whether it is a +% volume title, a poem title, or something else), then the title +% itself. If the entry is for a poem, for a section of a poem, for a poetic sequence, or for +% a section or subsection of a poetic sequence, a slash follows the title, followed +% by the page number. +% All of the commands that generate lines in the table of contents are +% somewhat messy and somewhat rigid, but you can modify them if you +% wish. Here are some ways of customizing contents +% entries, in increasing order of difficulty. +% +%\DescribeMacro{\setcontentsleaders} By default the title and the page +% are separated by a slash (actually by |~/~|). If you wish to change +% this, say to put dot leaders in instead, issue what you wish to use +% as the argument to |\setcontentsleaders|. For instance +% |\setcontentsleaders{\poemdotfill}| will flush the number to +% the right margin, and insert leading dots up to the number. +% The argument to |\setcontentsleaders| can be whatever you wish +% to use to separate the title from the page number, such as a colon, +% a hard space (|~|), or even |\hfil| to flush the page number to the left margin. +% +% \DescribeMacro{\contentspoemtitlefont} +% You can change the font sizes that are used to set particular classes of title +% in the contents by redefining the commands that are used to set the font size +% for that kind of title. For instance, if you wanted to set the titles of all +% poems in 12 point type on 14.5 point leading, issue \begin{verbatim} +% \renewcommand{\contentspoemtitlefont}{\fontsize{12}{14.5}\selectfont} +% \end{verbatim} +% in your preamble. You can find a list of the various relevant font size commands +% below at section \ref{internal font size commands}, page \pageref{internal font size commands}. +% +% \DescribeMacro{\contentsindentoneamount} +% You can also change the amount of the indentations used in the hierarchy of indentations +% in the table of contents by changing the value of the elements of +% that hierarchy. You can change ``contentsindentoneamount'' +% (the amount a poem title is normally indented, by default 24pt) to, +% say, 36pt, by issuing |\contentsindentoneamount=36pt| in your preamble. You +% can find all of the values in the contents indentation hierarchy at section +% \ref{contents indentation hierarchy}, page \pageref{contents indentation hierarchy}. +% +% \DescribeMacro{\renewcommand} +% You can also make global changes to the appearance of a particular kind of contents entry. To +% change the appearance of a kind of entry (for all sections of +% sequences of poems, for instance), go to the definition of the title +% of that kind of entry (e.g.\ |\sequencesectiontitle|) below, +% and copy the definition into a |\renewcommand| for that kind of title; +% find where that command calls the +% |\c@ntentsinfo| command, and change the arguments +% to that command to suit you. (You should consult section \ref{customizing titles}, page +% \pageref{customizing titles}, to see what all of the arguments to |\c@ontentsinfo| do.) +% Put the whole renewed version of the title command into your preamble, being +% sure to issue |\makeatletter| before the |\renewcommand| and to issue +% |\makeatother| after it. +% (You have to put this whole |\renewcommand| between |\makeatletter| and |\makeatother| because +% |\c@ntentsinfo| and several other commands called to set titles include +%the |@| character, which you can't use in command names +% except in the .sty file. Internal commands like |\c@ntentsinfo|, which are used by +% other commands but are under most circumstances not meant to be invoked +% by users directly, have an |@| in their names so that the user won't accidentally +% redefine them.) +% You can find the commands for making titles below at +% section \ref{poemtitlecode}, page \pageref{poemtitlecode}. +% +% Here, for instance, is the code that defines titles for sections of poetic sequences: +% \begin{verbatim} +% \newcommand{\sequencesectiontitle}[1]{% +% \set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont} +% {\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +% {\titleindentamount} +% \c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont} +% {\contentsindentthreeamount} +% \t@xtnotesinfo{#1}} +% \end{verbatim} +% Notice in the above that entries for sequence sections in the table +% of contents are given the indentation +% |\contentsindenttwo|. To give them the indentation |\contentsindentthree| +% and to set the runover portion of long titles with the indentation |\contentsindentfour| put this in +% your preamble: +% \begin{verbatim} +% \makeatletter +% \renewcommand{\sequencesectiontitle}[1]{% +% \set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont} +% {\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +% {\titleindentamount} +% \c@ntentsinfo{#1}{\contentsindenthree}{\contentspoemtitlefont} +% {\contentsindentfouramount} +% \t@xtnotesinfo{#1}} +% \makeatother +% \end{verbatim} +% +% \DescribeMacro{\c@ntentsinfo} +% You can make even more sweeping and fundmental changes in the look of your +% table of contents by redefining the |\c@ntentsinfo| command itself, which can be found +% below at section \ref{poemtitlecode}. Think very hard about this before doing it. +% +% \section{Making an index of titles and first lines} +% \subsection{~Setup} +% \DescribeMacro{\indexingontrue} First you must add the \textsf{makeidx} package +% to the list of packages you call in your preamble. (If you are planning to set several +% indices, call \textsf{splitindex} instead.) Then, to set up the Index section of your +% volume, issue |\indexingontrue| in your preamble. This will create +% the external file for your index information and send that file the +% typesetting information for its title. You must process this +% external file (the .idx file) with MakeIndex to create a properly organized and +% formatted index. MakeIndex sorts the various multi-level ``index +% cards'' generated by all of the |\index| commands in your source +% files. +% +% \subsection{~Printing the index} +% \DescribeMacro{\putpoemindex} +%Once you have processed your .idx file with MakeIndex, and +% generated the sorted and formatted .ind file for your book, the +% |\putpoemindex| command will insert the typeset index where you +% issue it, and put an entry for your index in your table of contents. +% You will have to run your file through \LaTeX\ twice again to make the +% page number for that entry correct. +% +% \textsf{poemscol} sets up a two-column index with a simple running +% header. (Setting up a two-column index, however, requires that you +% include the \textsf{multicol} package in your |\usepackage| list.) +% To turn indexing off, issue |\global\indexingonfalse|. +% +% Enter the individual index entries in the poems as you normally +% would for use by MakeIndex (say, after each title and first line). One of +% the nice features of MakeIndex is that every entry has two parts, +% one for specifying the sort key of the entry (or subentry), the other +% for specifying the font and typesetting information of the entry (or +% subentry). This enables you to drop all of the initial uses of +% ``the'' in titles for sorting purposes, while still including the +% ``the'' in the title. It also enables you to distinguish titles +% from first lines (by italicizing them), and to include typesetting +% information (such as italicization) in titles or first lines without +% messing up their sort order. +% +% \subsection{~Making multiple indices}\label{multipleindex} +% \textsf{poemscol} can work with \textsf{splitindex} to generate +% more than one index. You might, for instance, wish a separate index +% of titles and index of first lines, or an index of proper names. To +% do this, call \textsf{splitindex} in your list of packages. Then, +% in your preamble, declare the indices you are planning to use, e.g.: +% \begin{verbatim} +% \newindex[Index of Titles]{idx} +% \newindex[Index of First Lines]{fir} +% \newindex[Onomastic Index]{ono} +% \end{verbatim}The second argument is the +% ``shortcut'' defined by \textsf{splitindex}, and will be used to +% mark index entries in your text (see below), and used also as the extension +% for the external index files used by MakeIndex. +% +% Then mark up individual entries. Some entries (in the example +% above, the ``Index of Titles'' examples) can be marked up with +% |\index| just as if you were using only one index. Entries for +% other indices should be marked using the |\sindex| command from +% \textsf{splitindex}, as follows +% \begin{verbatim} +% \sindex[fir]{Of Man's first disobedience and the fruit} +% \end{verbatim} +% where the +% first argument is the ``shortcut'' and the second is the index +% entry. If you are loading \textsf{splitindex} with the +% \textsf{split} option, the different types of index entry will be +% sent to separate output streams, which each must be processed separately +% with MakeIndex. \TeX\ has only a limited number of such output +% streams, however, so it is probably wiser not to choose that +% option, but to use splitindex.tex, splitindex.pl, or one of the +% other means provided with the \textsf{splitindex} package to break +% up the index into the separate parts, each of which must be +% processed with MakeIndex separately. +% +% To include the indices, and to add entries for them to the table of +% contents, issue |\putmultiplepoemindex| for each one. +% |\putmultiplepoemindex| takes four arguments, which are: 1.\ The +% three letter ``shortcut'' used by |\splitindex|, 2.\ The title of +% the Index on its first page, 3.\ The running header for that index +% section, and 4.\ The name of the section as you wish it to appear in +% the Table of Contents. So, for instance +% \begin{verbatim} +% \putmultiplepoemindex{fir}{INDEX OF FIRST LINES}{Index of First +% Lines}{First Line Index} \end{verbatim} +% includes an index with shortcut ``fir,'' title ``INDEX OF FIRST +% LINES,'' running header ``Index of First Lines,'' and contents +% entry ``First Line Index.'' +% \section{Collections with multiple volumes} +% \DescribeEnv{volumetitlepage} \DescribeEnv{maintitlepage} +% The |volumetitlepage| environment is an +% environment for divider pages in collections made up of several +% volumes. Volume title pages will always appear on recto pages with blank verso pages. +% \textsf{poemscol} will also automatically create a blank verso page +% preceding the volume title page if it is necessary. The +% |maintitlepage| environment is for the title page of the whole +% book. The main title page will also automatically always be on a +% recto page. These divider pages have special +% page styles, with no page numbers and no running headers. +% +% \begin{sloppypar} +% \DescribeMacro{\wholebooktitle} \DescribeMacro{\volumetitle} +% |\wholebooktitle| is for the title of the entire collection. +% |\volumetitle| is for the title of an individual volume within a +% Collected Poems. |\wholebooktitle| +% merely sets its argument in a very large font. |\volumetitle| also sets an entry +% in the table of contents (with no page number, but followed by extra +% vertical space) and in the endnotes (with +% no page number). +% +% \DescribeMacro{\volumetitlefirstline} +% \DescribeMacro{\volumetitlemiddleline} +% \DescribeMacro{\volumetitlelastline} +% \DescribeMacro{\volumesubtitle} +% The |\volumetitlefirstline|, +% |\volumetitlemiddleline|, and |\volumetitlelastline| commands are +% for multi-line titles of volumes gathered into the collection. (Use +% these last commands if you want to specify how a long title is +% broken up both in the text and in the table of contents. +% \textsf{poemscol} will break up long titles on its own anyway +% if you don't specify how to break them up, but +% you might not be happy with how it breaks up the lines.) +% |\volumesubtitle| is for setting the subtitle to a volume. +% In addition to setting the text in the body of your +% edition, these commands send the title (and the formatting +% information about it) to the table of contents file and to the +% various endnotes files.\end{sloppypar} +% +% \DescribeMacro{\volumesectiontitle} +% |\volumesectiontitle| is for setting the title of a section of a +% volume. |\volumesectiontitle| merely prints the title in a large font in boldface +% in the text. It always prints at the top of a page, but it does not ensure that that +% page is a recto page, does not reserve the whole +% page for the title, or put a blank verso page following the title. It prints the title +% in the contents without a page number, and prints the title in the textual notes +% (but not in the other endnote sections) in boldface on a separate line. +% Because it is so different from other titles, it does not use the three internal +% commands (|\set@p@emtitle|, |\c@ntentsinfo|, and |\t@xtnotesinfo|) that +% all of the other title commands use, so modifying those internal commands will not +% change |\volumesectiontitle|. +% +% \DescribeMacro{\volumeepigraph} \DescribeMacro{\volumeattribution} +% |\volumeepigraph| and +% |\volumeattribution| are for epigraphs and attributions on the +% divider pages. \goodbreak +% +% \DescribeMacro{\volumeheader} \DescribeMacro{\leftheader} \DescribeMacro{\rightheader} +% |\volumeheader| or |\rightheader| is for setting the right +% running header for that volume (except for divider pages, the table +% of contents, the notes sections, and other special cases). Normally +% that is just the name of the particular volume. |\leftheader| is for setting +% the left running header for the entire book (except for divider +% pages, the table of contents, the notes sections, and other special +% cases). Normally that is the name of the entire book. +% +% \section{Recording textual notes, emendations, and explanatory notes}\label{recordingtextualnotes} +% \subsection{~Setup for endnote sections} +% \DescribeMacro{\maketextnotes} \DescribeMacro{\makeemendations} +% \DescribeMacro{\makeexplanatorynotes} +% To collect textual collations, issue |\maketextnotes| in your +% preamble. +% To collect emendation notes, issue |\makeemendations| in your preamble. +% To collect explanatory notes, issue +% |\makeexplanatorynotes| in your preamble. +% These commands open external files for emendations, textual +% collations, and explanatory notes (with extensions .emd, .ent, and +% .enx respectively). \textsf{poemscol} reads these files back into the main document +% at the place you specify +% with |\puttextnotes|, |\putexplanatory|, or |\putemendations|, or at +% the end (if you use the |\finish| command). +% These commands also send to the external files the commands for typesetting the +% title of each section (e.g. Explanatory Notes), for making an entry in the table +% of contents for each endnote section, and for modifying the +% running headers of the notes sections to xx--yy format (e.g. +% ``Explanatory Notes to pp.~55--7''). +% +% \textsf{poemscol} opens an entry (headed with +% the title, and the page the poem appears on in the body of the +% text, in boldface) in the textual notes +% section for every poem (since, minimally, you want to include +% information about the variants and copy text of the poem). +% In the emendations or explanatory notes sections +% \textsf{poemscol} +% sets this information only if you actually have emendations or explanatory notes on that poem. +% If you have defined a new endnote section using |\definenewnotetype| \textsf{poemscol} +% will also only set the poem heading in the notes if there actually is a note for that poem. +% +% The notes for each poem are set in a block paragraph, with a new +% paragraph for every |\poemtitle| command, and the line counter for +% the notes is reset to 1 with every |\begin{poem}|. (For long poems +% in books or cantos, it you might use |\poemtitle| for the +% canto names or numbers, or perhaps you might want to design a new species +% of title using the commands described below at section \ref{customizing titles}, +% page \pageref{customizing titles}.) +% +% By default, there is one paragraph per poem, with a hanging indent to give +% prominence to the page number. +% +% If you wish to use multi-layer footnotes rather than endnotes, you +% do not need to issue |\maketextnotes| or its relatives (but you +% should of course issue |\textnotesatfoot| or its relatives). You can mix +% footnotes or endnotes as you wish. You may, for instance, wish to +% set explanatory notes as footnotes, and textual notes and +% emendations as endnotes. Instructions for setting up +% \textsf{poemscol} to make such footnotes are in section +% \ref{makingfootnotes} below. +% +% \subsection{~Customizing endnotes} +% \begin{sloppypar} +% \DescribeMacro{\iftextnotessinglepar} +% \DescribeMacro{\ifemendationssingplepar} +% \DescribeMacro{\ifexplanationssinglepar} +% You may, +% particularly if you are annotating long poems, wish each +% note to appear in its own paragraph rather than in a block paragraph +% with the other notes to that poem. To do this, you need to set +% the relevant boolean. Issue |\textnotessinglepartrue| +% |\emendationssingplepartrue| or |\explanationssinglepartrue| to give +% each such note a separate paragraph. (Similar booleans will be automatically +% defined for any species of endnote you create.) By default, these notes will have a +% hanging indent, to give prominence to the line number. +% \end{sloppypar} +% +% \begin{sloppypar} +% \DescribeMacro{\noteindentation} +% You may have notes with multiple paragraphs. The default settings for all of +% the forms of endnotes set them with hanging indentation, which probably is not +% a good idea for multiple paragraph notes. There are two ways of approaching +% this problem. The first way is to change all of the paragraphs of the notes to +% normal indentation, which you can do by issuing +% |\literaltextnote{\setlength{\parindent}{\noteindentation}}| just after issuing |\maketextnotes| . +% You can change the amoubt of indentation by changing the value of the +% length |\noteindentation| (the default value is 1 em). +% You should remember to issue similar +% commands for emendations, explanatory notes, and whatever kinds of notes you +% create using |\definenewnotetype|. +% \end{sloppypar} +% +% \DescribeMacro{\noteparbreak} +% Alternatively, if you want to keep the hanging indent for the page number, but still have paragraph +% breaks in the note, issue |\noteparbreak| whenever you want a paragraph break +% in the midst of a note. The first paragraph will have a hanging indent for the +% page number, but every paragraph that follows a |\noteparbreak| will have normal +% paragraph indentation. By default, |\noteparbreak| indents the new paragraph +% 1em. You can change this by changing the value of the length +% |\noteindentation|. +% +% \DescribeMacro{\iftextnotestwocol} +% \DescribeMacro{\ifemendationstwocol} +% \DescribeMacro{\ifexplanationstwocol} +% By default, notes are set in single columns. To set them in two column mode, +% set the relevant booleans to true, e.g. |\textnotestwocoltrue|. Again, any note type +% you create with |\definenewnotetype| will automatically define the ``twocol'' boolean +% that goes with it. +% +% \DescribeMacro{\putpagenumberinnotesfalse} +% \DescribeMacro{\puttitleinnotesfalse} +% You may not wish to have the poem's page number and title appear in +% the notes. To turn off the appearance of the page number in the +% notes, issue |\putpagenumberinnotesfalse|. You may also not wish to +% put the poem's title in the notes. To turn off the appearance of the +% poem's title in the notes, issue |\puttitleinnotesfalse|. +% +% \goodbreak +% \DescribeMacro{\contentsendnotesindent} +% \DescribeMacro{\contentsendnotesfont} +% You can control the appearance of the entry for endnote sections in +% the table of contents by changing the definition of +% |\contentsendnotesindent| (set by default to |\contentsindentone|) +% or |\contentsendnotesfont| (set by default to +% |\contentspoemtitlefont|.) +% +% \subsection{~Textual notes of various kinds} +% \DescribeMacro{\sources} To record information about the copy text, +% editions and publication history of individual poems, or any +% information not tied to specific lines in the poem, you should place +% that information in the argument to the |\sources| command. +% |\sources| sends information to the external file for textual notes, but does not +% tag what it sends with line numbers, hence its use for sending ``sources.'' +% Typically, you should issue this command after you have issued +% |\poemtitle| and before you issue |\begin{poem}|. That way the ``sources'' will +% appear in the textual notes section just after the title of the poem, but before the +% notes on particular lines. +% You could conceivably use |\sources| +% send typesetting information to the textual notes file (such as to force a page +% break), but I prefer to do that +% by using |\literaltextnote|, which also sends information to the external +% file for textnotes without sending line numbers. Although they do the same thing, I use |\sources| to +% send editorial information to the texual note section, but use +% |\literaltexnote| to send formatting instructions to the textual note section, so that +% the different purposes of the note are clear at first glance. You can send +% typesetting information to other sections by using +% |\literalemend|, |\literalexplain|, or |\literalcontents|. \textsf{poemscol} also +% creates a similar ``literal'' command for any type of endnote you create on the fly +% using |\definenewnotetype|. +% +% There is one subtle difference between |\sources| and |\literaltextnote|. If you +% issue the commands to set your textual notes as footnotes rather than endnotes, +% notes issued with |\sources| will be set as footnotes, but anything issued using |\literaltextnote| +% will be discarded. To set textual notes as footnotes, +% see section \ref{makingfootnotes}, page \pageref{makingfootnotes}, below. +% +% \DescribeMacro{\textnote} +% \DescribeMacro{\emendation} +% \DescribeMacro{\explanatory} +% |\textnote| is used to capture variants and tie them to the +% correct line number. You don't have to count line numbers; +% \textsf{poemscol} keeps track of them for you. Issue |\textnote| +% immediately after the |\verseline| command which marks the ending of +% the line you wish to comment upon. Put the text of your note (which +% may be simply the recording of a variant in standard notation) into +% the argument of the command. You should put both the lemma and the +% variants or comment in the argument to the |\textnote| command. +% For emendations, use |\emendation|, and for explanatory notes, +% use |\explanatory|. These notes go to their own endnote sections. The +% only difference is that each poem opens a new paragraph (headed with the +% poem's title and page number) for its own +% textual notes, but such paragraphs for explanatory notes or emendations are only +% opened if there actually are explanatory notes or emendations for that poem. +% +% \DescribeMacro{\sameword} +% \DescribeMacro{\missingpunct} +% To +% put the $\sim$ glyph in your note (used for recording places where +% the variant and the copy text have the same word, as for instance +% when recording a variation of punctuation) use |\sameword|. To put +% the ${}_{\wedge}$ glyph into your text (used for recording places +% where a punctuation mark is missing in a variant), use +% |\missingpunct|. +% +% For notes that refer to ranges of lines, |\textnote|, |\emendation|, +% and |\explanatory| have an optional argument, which records how many +% lines the note refers to. There are two ways of using this +% argument. The grubby but simple way is simply to put into the +% argument the number of lines it refers to. If, for instance, you +% issue |\textnote[4]{lemma] rest of note}|, \textsf{poemscol}, rather +% than printing merely the number of the line which closed just before +% you issued |\textnote|, will print a line range, beginning at that +% line, and ending at the fourth line after it. If that |\textnote| +% were issued after line 214, this is to say, the output in the +% textual notes would be: 214--218: lemma] rest of note. +% +% \begin{sloppypar} It seems clumsy to count the lines referred to by +% a note, especially since you don't have to count lines to set where +% the note begins. A more sophisticated way, and one which involves +% no counting, is to make a unique poem line label for the last line +% of the range by issuing |\poemlinelabel{some unique label}| just +% after the |\verseline| or |\end{stanza}| that ends the range. (To +% use |\poemlinelabel| see section \ref{poemlinelabel}.) Then, back +% after the |\verseline| or |\end{stanza}| command that closes the +% first line of the range, put the text of the label into the optional +% argument of |\textnote| as follows: |\textnote[some unique label]{lemma]rest of note}|. +%This is the preferred method. The +% line-counting method is deprecated, but retained for backwards +% compatibility with earlier versions. If you use the label method, +% you will have to run your file through \LaTeX\ twice, once to define +% the labels, and once to set the text.\end{sloppypar} +% +% Here is a complete example: +%\begin{verbatim} +%Yes, then I met the beast. Well, better, indeed,\verseline +%\textnote[had it been the]{better, indeed, / Had it been the] better if +%it / Had been the 1953TS (revised in black pencil +%on 1953TS to 1953)} +%Had it been the manifest beast and the circumstantial\verseline +%\poemlinelabel{had it been the} +%Avatar of destruction. But no beast then: the towering\verseline +%Definition, angelic, arrogant, abstract,\verseline +%Greaved in glory, thewed with light, the bright\verseline +%Brow tall as dawn. I could not see the eyes.\end{stanza} +% \end{verbatim} +% +% Overlapping lemmas, or lemmas that +% include stanza breaks, do not pose any difficulties for |poemscol|. +% +% |\emendation| and |\explanatory| are used exactly as |\textnote| +% is. Issue the emendation or the explanatory note as the argument to +% the command. Place the command immediately after the |\verseline| that +% concludes the line to which it is a comment. These commands also can +% take optional arguments to specify line ranges. +% +% \begin{sloppy} +% \DescribeMacro{\accidental} |\accidental| behaves exactly like +% |\textnote|. Accidentals +% are included by default, but if you issue |\global\includeaccidentalstrue| +% in your preamble, you will remind yourself of that fact. +% If you wish to distinguish between accidentals and +% substantives, using |\accidental| provides a way of doing so.\end{sloppy} +% +% If you wish to exclude accidentals from your printed output, but to +% mark them in your source files, so that your published collation in the +% textual notes endnotes section +% consists only of substantives, issue +% |\global\includeaccidentalsfalse| in your preamble. Many publishers +% are reluctant to publish accidentals, believing that they are, well, +% less substantive than substantives. Using the |\accidental| +% command allows you to exclude accidentals from the published version +% should your publisher insist, while preserving the information about +% them in your source files should the publisher's mind change. In the very worst case, if +% you have marked all the accidentals in this way you can still +% produce a list of accidentals for later use, and other scholars can +% search for accidentals in your source files simply by searching for +% the string |\accidental|. +% +% \textsf{poemscol} does not provide for a separate backmatter section +% for accidentals, but it would be trivial to construct one, using +% |\definenewnotetype|, described in section \ref{definingnewnotes} +% below. You may, for instance, use |\definenewnotetype| to create a command called +% |\newaccidental|, then issue| \let\accidental=\newaccidental|. +% +% \DescribeMacro{\tsvariant} \DescribeMacro{\tsentry} Some publishers +% may turn up their noses at typescript or manuscript variants (changes on +% a manuscript or typescript as opposed to differences between published versions) in just +% the way they turn up their noses at accidentals. If you wish to +% distinguish between published variants and typescript, +% man\-u\-script, or galley variants, |\tsvariant| (for a whole note) +% and |\tsentry| (for a typescript entry in a list of variants in a +% textual note that includes other kinds of variant) provide ways of +% doing so. By default, typescript variants are included. To exclude +% typescript variants, issue |\global\includetypescriptsfalse| in your +% preamble. You can issue |\global||\includetypescriptstrue| in your +% preamble, to remind yourself that you are including typescript +% variants. In that (default) case |\tsvariant| will behave exactly +% like |\textnote|, and entries in other notes marked with +% |\tsentry| will be included in your output. +% +% Here is how to use |\tsentry|: +% if you wish to include typescript entries in a single note including +% those entries in a list with variants from other published versions +% (as for instance when a word appears in a typescript but only in +% the second edition of the published poem), simply issue +% |\textnote| as usual, marking the relevant variant in the list of +% variants with the |\tsentry| command. If typescript variants +% are excluded, the typescript entry will also be excluded. +% +% Here is a typical use of the |\tsentry| command: +% \begin{verbatim} +% Of moonlit desert. A stallion, white and flashing, slips,\verseline +% \textnote{Of moonlit] Of the moonlit {\em NY\/}\tsentry{, SP85TS +% (revised in black pen to SP85)}} +% \end{verbatim} +% +% Notice that since the |\tsentry| comes in the middle of the list, +% it begins with a comma. You might expect an |\unskip| command +% before the comma, to prevent +% \LaTeX\ from adding white space before the comma. \textsf{poemscol} +% automatically provides the |\unskip| if the entry starts with a +% comma or a semicolon. +% +% You can +% mark individual variants with |\tsentry| in the arguments to the +% |\explanatory| and |\emendation| commands as well, and +% |\tsentry| will also behave normally in any endnote or footnote section +% you define using |\definenewnotetype|. +% +% \textsf{poemscol} does not provide for a separate backmatter section +% for typescript variants, but it would be trivial to construct one, +% again using |\definenewnotetype|. To do this, you would also have to +% copy all of the emendations, explanatory notes, and textual notes +% which have a |\tsentry| in their arguments, and add +% |\tsvariant| commands in those places. For information about +% |\definenewnotetype| see section \ref{definingnewnotes}. +% +% \DescribeMacro{\margreftextnote} +% \DescribeMacro{\margrefexplanatory} +% \DescribeMacro{\margrefemendation} +% Some editions include a marginal mark in the text showing where in the +% apparatus a textual note on that line can be found. (The edition of William +% Blake's poetry and prose edited by Harold Bloom and David V. Erdman, for instance, +% includes such marks.) +% |\margreftextnote| sets a label in the textual notes section, and +% sets a marginal note with a page reference to that label in the main text. Issue +% |\margreftextnote| \emph{before} issuing the |\verseline| or +% |\end{stanza}| that closes the line to which it refers. (The textual +% note itself can be an ordinary |\textnote|, and should be placed, as +% usual, \emph{after} the |\verseline| or |\end{stanza}|.) +% |\margrefexplanatory| does the same thing for explanatory notes, and +% |\margrefemendation| does the same thing for emendations. +% If you define a new kind of endnote with |\definenewnotetype|, you +% will automatically also define a new |\margref| command for that kind of note. For +% details about how these markers work, see +% section \ref{margreftextnote}, page \pageref{margreftextnote}. +% +% \DescribeMacro{\quotedversecorrectiontextnote} +% If you quote verse \emph{within} a textual note, an explanatory +% note, or an emendation, you may want to use the normal \LaTeX\ +% |verse| environment for that quotation, rather than the special markup +% for \textsf{poemscol}. You can also use the special |pmclverse| environment, which +% enlarges the indentation of runover lines and the white space +% between stanzas. But you should not use the |poem| environment within the textual notes. +% +% If a textual note +% \emph{ends} with a quotation in verse, you should +% follow the |\textnote| entry with +% |\quotedversecorrectiontextnote|. I found that if I quoted verse in +% the note sections a dirty trick I used to send the notes to the +% external files would cause the following notes on that poem in the +% notes sections to be set in a new paragraph. (This is of course not +% a problem if the quoted verse is the last thing in the notes to that +% poem, since the next poem will open a new paragraph in the notes +% anyway. It is also not a problem if more of the individual textnote +% follows the verse. It's only a problem if the last thing in the +% note is quoted verse, and the note is not the last one on that +% poem.) The command should set it flush as it is, but I have found +% odd cases I can't understand in which that doesn't work, so the +% command has an optional argument, which should be the additional +% length you need to adjust the next line by to make it flush. The +% default is 0pt. |\quotedversecorrectionexplanatory| and +% |\quotedversecorrectionemendation| should follow explanatory notes +% or emendations that end with snippets of verse. These three +% commands are an embarrassing kludge on my part. They simply send +% commands to the relevant note sections that prohibit opening a new +% paragraph. You should issue this command in the main text right +% after the close of the textnote (not in the text of the textnote +% itself). +% +% \section{Creating new kinds of endnote} \label{definingnewnotes} +% \DescribeMacro{\definenewnotetype} The |\definenewnotetype| command +% can be used to create new kinds of endnote, in case the kinds +% \textsf{poemscol} has predefined do not suffice. |\definenewnotetype| +% takes five arguments. They are (assuming you are creating a new +% kind of note to be called a ``mynote''): \begin{enumerate} \item A base name +% used to construct \begin{itemize} \item some |\if| variables (e.g.\ +% |\ifmynoteson| to see whether you are collecting ``mynotes'', +% |\ifnomynoteyet| to see whether you have written a ``mynote'' for a +% particular poem yet, |\ifmynotestwocol| to set the notes in two +% column mode, and |\ifmynotesinglepar| to set the notes in +% one paragraph per note form, rather than in block paragraphs). +% \textsf{poemscol} will only open an entry for a poem in the +% ``mynotes'' section if there actually is a ``mynote'' on that poem. +% Note that every |\if| that refers to a section is plural +% (|\ifmynoteson|, |\ifmynotestwocol|, |\ifmynotessinglepar|) and +% that every |\if| that refers to a singular note +% is singular (|\ifnomynoteyet|). \item The name for the output +% channel for writing the notes to the appropriate external file. +% This name will always be plural (e.g.\ ``mynotes"). \item The name for the ``literal'' +% command for writing literal, unexpanded text on the file (as +% |\literaltextnote| does on the textnotes file), and for the note +% command that sends the actual textual note (line number and all) to +% the section (e.g.\ |\literalmynote| and |\mynote|), also the command to write notes in +% line-numbered prose (e.g.\ |\prosemynote|) or prose numbered by +% paragraph and sentence (e.g.\ |\pmmynote|). These commands will +% always be singular. \item The name of the |\put| command (e.g.\ +% |\putmynotes|) which closes the external file for the notes section, +% reads it back in to your document, and adds an entry in the table of +% contents for that notes section. This command will always be +% plural. (There won't be a |\makemynotes| command, +% because |\definenewnotetype| takes its place.) +% \item The name of the |\margref| command for putting a +% marginal mark next to a line giving the page number in the apparatus +% where a note is to be found (e.g.\ |\margrefmynote|) \end{itemize} +% \item The extension for the external file which will hold the notes +% as you generate them. ``Emendations'' for instance, are written to +% an external file called |\jobname.emd| The file name will always be +% |\jobname|, and the different species of endnotes will all have +% distinctive extensions. (|\jobname| is a command that always expands +% to the name of your top level source file. If, for instance, I am +% setting running a file called ``myfile.tex'' through \LaTeX\, +% |\jobname.emd| translates to ``myfile.emd.'') \item The title of the +% notes section as you wish it to appear in the running header (e.g. +% ``Mynotes to ''). \item The title of the notes section as you wish +% it to appear on the first page of the notes section (e.g. +% ``MYNOTES''). \item The title of the notes section as you wish +% it to appear in the table of contents (e.g.\ ``Mynotes''). \end{enumerate} +% +% \sloppypar So, for instance,\begin{verbatim} +% \definenewnotetype{xyznote}{xyz}{Xyznotes to}{XYZNOTES}{Xyznotes} +% \end{verbatim} +% creates the booleans |\ifxyznoteson|, |\ifnoxyznoteyet|, and +% |\ifxyznotessinglepar|, the +% commands |\xyznote|, |\literalxyznote|, |\prosexyznote|, +% |\pmxyznote|, and |\putxyznotes| (and, although you don't ever have +% to use it explicitly, |\firstxyznote|) the output channel xyznotes, +% the external file |\jobname.xyz|, an entry in the contents for +% ``Xyznotes'', and an endnotes section with a running header of the +% form ``Xyznotes to pp.~xx--yy'' and a title XYZNOTES. +% +% |\xyznote| +% takes the same arguments that |\textnote| does (which is to say, +% an optional argument for a label for entering line ranges, and an +% argument for the lemma and the comment). There won't be an entry +% for a poem in the ``Xyznotes'' endnotes section unless there +% actually is an xyznote for the poem. +% + %|\prosexyznote| +% (for ``xyznotes'' on line-numbered prose passages) takes the same +% arguments |\prosetextnote| does (which is to say, an optional +% argument for a label for entering line ranges, an argument for a +% label to capture the line number of the first line, and an argument +% for the lemma and the comment). For notes on passages of line-numbered +% prose, see section \ref{prosesections}, page \pageref{prosesections}. +% +% |\pmxyznote| (for prose passages +% numbered by paragraph and sentence) takes the same arguments as +% |\pmtextnote|. For notes on passages of prose numbered by +% paragraph and sentence, see section \ref{paragraphsentence}, page +% \pageref{paragraphsentence}. +% +% \section{Multi-level footnotes} \label{makingfootnotes} +% \DescribeMacro{\textnotesatfoot} \textsf{poemscol} will set multiple +% levels of footnotes in block paragraphs, separating each level with +% a rule. To enable this feature, call the \textsf{manyfoot} package +% as follows in your preamble: |\usepackage[ruled,para*]{manyfoot}|. +% +% To set your textual notes as footnotes, issue |\textnotesatfoot| in +% your preamble. If you do this, \textsf{poemscol} will actually +% create two sets of footnotes for textnotes, one for those that are +% called with |\textnote|, which will produce an unindented block of +% notes, and one for those that are called with |\sources|, which will +% produce individual indented paragraphs, opening a new paragraph with +% every note. |\sources| notes often have several paragraphs, so they +% are inappropriate for block-paragraph or ``para'' mode, and because +% those paragraphs are often in fact prose paragraphs, rather than +% blocks of notations, they are indented, so that they will be read as +% prose. To set your emendations as footnotes, issue +% |\emendationsatfoot| in your preamble. These notes will be set by +% default as block paragraphs. If you have multiple-paragraph notes +% in your emendations, you should redefine these notes to set plain +% rather than para style notes. (See the next paragraph for how to do +% this.) To set your explanatory notes as +% footnotes, issue |\explanationsatfoot|. These notes will also, by +% default, be plain style notes, with one indented paragraph per note. +% You do not need to issue |\maketextnotes|, |\makeemendations| or +% |\makeexplanatorynotes| if you set those notes as footnotes. If you +% use |\literaltextnote| anywhere in your file, however, you will lose +% the text it would have put in your textnotes, since |\literaltextnote| +% just writes its argument onto the external file for textual notes. +% The arguments to |\literalexplain| and |\literalemendation| will +% be discarded as well if explanatory notes or emendation notes are set as footnotes. +% +% \DescribeMacro{\iftextfootnotespara} +% \DescribeMacro{\ifsourcesfootnotespara} +% \DescribeMacro{\ifemendationfootnotespara} +% \DescribeMacro{\ifexplanfootnotespara} +% To change the style of your footnotes between plain and +% para modes, globally change the values some of the following +% booleans. |\ifsourcesfootnotespara|, obviously, is true if +% footnotes from the |\sources| command are set in ``para'' mode +% (default is false). |\iftextfootnotespara| is true if footnotes +% from |\textnote| are set in ``para'' mode (default is true). +% |\ifemendationfootnotespara|, or |\ifexplanfootnotespara| are the +% booleans which set the style of footnotes from |\emendation| and +% |\explanatory| respectively. By default, footnotes from +% |\emendation| are set in ``para'' mode (|\emendationfootnotesparatrue|), and footnotes from +% |\explanatory| are set in ``plain'' mode (|\explanfootnotesparafalse|). To change explanatory +% footnotes from plain to para mode, for instance, issue +% |\global\explanfootnotesparatrue|. Counterintuitive as it sounds, +% you must issue this \emph{before} issuing |\textnotesatfoot|, |\emendationsatfoot|, +% or |\explanationsatfoot|. +% +% When |\sources| is defined to send endnotes to the textual notes +% section, they usually appear immediately underneath the title of +% the volume or poem they comment upon in the endnotes section. If you are having |\sources| +% output footnotes, it would be a good idea to open the note with the +% title of the volume or poem it is a comment upon, in case there is +% more than one poem on the page. +% +% When note classes are set as footnotes, the symbol which marks +% cases in which a page turn falls on a stanza break will be set +% \emph{beneath} the footnotes. This is a consequence of the way +% \textsf{poemscol} uses the |\mark| mechanism to keep track of these +% cases, so I have not figured out how to change it. But it may well +% be more of an idiosyncrasy than a bug, particularly if the symbol +% is changed from * to something like ``stanza break at page turn.'' +% +% \DescribeMacro{\DeclareNewFootnote} +% To create a new level of footnote, you must first declare it to +% make it known to \textsf{manyfoot}, which requires each level of +% footnote to be given a unique suffix (usually a capital letter of +% the alphabet). You can declare a new footnote level called +% |\footnoteE| for instance, by issuing +% |\DeclareNewFootnote[para]{E}|. You will want notes which don't put +% a mark in the body of the text, and begin with the line number or +% range of line numbers of the lemma. To define a footnote called +% |\mynote|, first declare new footnote |\footnoteE| (A, B, C and D +% are reserved for sources, textual notes, emendations, and explanatory notes, +% respectively). Then issue: \begin{verbatim} +% \newcommand{\mynote}[2][0]{\setlemmarange{#1}\\ +% \FootnotetextE{\citerange}{#2} +% \resetlemmacounters} \end{verbatim} +% |\setlemmarange|, |\citerange|, and +% |\resetlemmacounters| are internal commands to enable your footnote to handle line ranges in +% the lemma. They are defined in the implementation section below, at section +% \ref{notetools}. If a |\mynote| refers to a range of lines, you can issue +% the same kinds of optional argument that are used with |\textnote|. +% +% \section{Notes at the end of poems} +% \DescribeMacro{\poemendnote} +% \DescribeMacro{\makepoemendnotes} +% \DescribeMacro{\putpoemendnotes} +% You may wish, rather than using endnotes or footnotes, simply to print your +% notes at the end of each poem. To do this for simple notes, issue |\makepoemendnotes| just +% after |\begin{poem}|. Issue |\poemendnote| where you wish to make a note, +% using the same conventions for line ranges you use for |\textnote|. Where you want to output +% the notes, issue |\putpoemendnotes|. These notes can have multi-line lemmas, +% just like textual notes. +% +% \DescribeMacro{\ifpoemendnotessinglepar} +% By default, each poem end note is given its own paragraph. To concatenate +% them into one big paragraph, issue |\poemendnotessingleparfalse|. +% +% \DescribeMacro{\poemendemendationnote} +% \DescribeMacro{\makepoemendemendationnotes} +% \DescribeMacro{\putpoemendemendationnotes} +% You can also print emendation notes at the end of each poem. +% To do this, issue |\makepoemendemendationnotes| just +% after |\begin{poem}|. Issue |\poemendemendationnote| where you wish to make a note, +% using the same conventions you use for |\textnote|. Where you want to output +% the notes, issue |\putpoemendemendationnotes|. These notes can have multi-line lemmas, +% just like textual notes. +% +% By default, each poem end note is given its own paragraph. To concatenate +% them into one big paragraph, issue |\poemendemendationnotessingleparfalse|. +% +% \DescribeMacro{\poemendexplanatorynote} +% \DescribeMacro{\makepoemendexplanatorynotes} +% \DescribeMacro{\putpoemendexplanatorynotes} +% You can print explanatory notes at the end of each poem. +% To do this, issue |\makepoemendexplanatorynotes| just +% after |\begin{poem}|. Issue |\poemendexplanatorynote| where you wish to make a note, +% using the same conventions you use for |\textnote|. Where you want to output +% the notes, issue |\putpoemendexplanatorynotes|. These notes can have multi-line lemmas, +% just like textual notes. +% +% By default, each poem end note is given its own paragraph. To concatenate +% them into one big paragraph, issue |\poemendexplanatorynotessingleparfalse|. +% +% \DescribeMacro{\poemendtextnote} +% \DescribeMacro{\makepoemendtextnotes} +% \DescribeMacro{\putpoemendtextnotes} +% You can print textual +% notes at the end of each poem. To do this, issue |\makepoemendtextnotes| just +% after |\begin{poem}|. Issue |\poemendtextnote| where you wish to make a note, +% using the same conventions you use for |\textnote|. Where you want to output +% the notes, issue |\putpoemendtextnotes|. These notes can have multi-line lemmas, +% just like textual notes. +% +% \DescribeMacro{\ifpoemendtextnotessinglepar} +% By default, each poem end note is given its own paragraph. To concatenate +% them into one big paragraph, issue |\poemendtextnotessingleparfalse|. +% +% \section{Printing endnotes and index} +% \DescribeMacro{\testforauxonfirstrun} If you don't want to listen to +% \LaTeX\ complain about missing references during your first run, +% issue |\testforauxonfirstrun|, which won't let |\finish|, +% |\putexplanatory|, |\puttextnotes|, or |\putemendations| run unless +% there is an .aux file for a previous run. \emph{Be sure to issue +% this command before issuing} |\begin{document}|, \emph{since that +% reads in the existing .aux file, and overwrites it with a new one.} +% +% \label{putexternalfiles} +% \DescribeMacro{\putemendations} This command closes the external file +% for emendations and reads it in. It also puts an entry for the +% emendations section into your table of contents. After +% |\putemendations| has read in the external file for emendations, you +% will need to run your file through \LaTeX\ again, to put the correct +% page number in the table of contents file. +% +% \DescribeMacro{\puttextnotes} +% \DescribeMacro{\putexplanatory} |\puttextnotes| and +% |\putexplanatory| do the same thing for the textual +% notes and for the explanatory notes. +% +% Each of these last three commands restores normal hyphenation. Since +% all three are printed with the |\small| font size, the hyphen +% character is defined only for that size. This should not create +% other issues, however, because the commands that prohibit +% hyphenation in the |poem| environment (and in the |contentsentry| +% environment) are local to those environments, so the restoration of +% the hyphen character may be redundant. +% +% \DescribeMacro{\putpoemindex} |\putpoemindex| reads in the index at +% this point, and adds an entry for the index to external file for the +% table of contents. +% +% \DescribeMacro{\putmultiplepoemindex} If you are generating +% several indices using \textsf{splitindex} |\putmultiplepoemindex| +% reads in one of them at this point. For instructions about this +% command, see section \ref{multipleindex}, p.~\pageref{multipleindex}. +% +% \DescribeMacro{\finish} The +% |\finish| command is deprecated but still available. It is designed +% to be placed just before |\end{document}| (which, in fact, it +% replaces --- but you should still put an |\end{document}| at the end +% of your document for form's sake). |\finish| closes the external +% files for the three notes sections and reads them back into the +% document (turning the automatic hyphenation back on for these +% sections). It adds entries to the table of contents file for the +% notes sections. It reads in the formatted index file (which you +% have made from your raw .idx file using MakeIndex between \LaTeX\ +% runs) and adds an entry for the index to the table of contents. +% Then it closes the external file for the table of contents and reads +% that in (putting it at the end of the document, as I explained +% before). Then it adds a page explaining that the symbol (by default +% *) at the bottom of certain pages marks places where a stanza break +% and a page break coincide. If you have an editor's introduction +% preceding your notes section, or a list of abbreviations, you may +% wish to consult the |\finish| command for suggestions about how to add +% the lines to read those files in and add entries for them in the +% table of contents. +% +% +% \section{Special cases} +% \subsection{~Epigraphs, attributions etc.} \label{centerepigraphs} +% \DescribeMacro{\epigraph} \DescribeMacro{\headnote} +% \DescribeMacro{\attribution} \DescribeMacro{\poemdedication} +% |\epigraph|, |\headnote|, |\attribution|, and |\poemdedication| set +% their arguments as epigraphs, headnotes, attributions, or +% dedications for poems or poetic sequences. \goodbreak +% +% \DescribeEnv{epigraphenvironment} +% If your epigraph or headnote is a prose passage of more than one paragraph, or a verse +% passage of more than one stanza, use the |epigraphenvironment| environment +% rather than the |\epigraph| command. If you use the standard \LaTeX\ |verse| +% environment within an epigraph, you may wish to add a |\smallskip| between +% stanzas. (To my eye that environment does not leave enough white space between +% stanzas.) Alternatively, you can use the special |pmclverse| environment +% within the |epigraphenvironment| environment. (You can even use +% the |poem| environment within the |epigraphenvironment| environment, but if +% you mark up the epigraph with things like |\verseline| and |\end{stanza}| you may wind +% up with marginal line numbers.) +% +% \DescribeMacro{\centertitles} +% Issuing |\centertitles| moves the margins in on both sides by the length +% |\centerepigraphindentation| (the default is 6em). The margins for +% uncentered epigraphs and the like are controlled by the length |\normalepigraphindentation| +% (the default is 1.5em). Both values can be adjusted by using |\setlength|. +% +% After issuing |\centertitles| you can move epigraphs and similar things back to the margin +% by issuing |\centerepigraphsonfalse|. After issuing |\centertitles| you can put titles at the margin +% while leaving epigraphs alone by issuing |\centertitlesonfalse|. +% +% If you have dedications, epigraphs, or attributions on +% the divider pages of editions that combine several volumes of +% poetry, use |\volumededication|, |\volumeepigraph|, and +% |\volumeattribution|. These commands are unaffected by |\centertitles|. +% +% \begin{sloppypar} +% \DescribeMacro{\leftaligntitles} Rather than centering the title over +% a centered block of verse, one might prefer to align the title with +% the left margin of the verse block. To do this, issue +% |\leftaligntitlestrue| to set the boolean |\ifleftaligntitles|. You +% may also wish to align epigraphs, dedications, attributions, or +% headnotes with the left margin of the verse block (even if you +% center the titles). To do this, issue |\leftalignepigraphstrue| to +% set the boolean |\ifleftalignepigraphs|. Remember that for this to +% work, you will need to use the |\settowidth| command. Issue +% |\settowidth{\versewidth}{Text to be used for centering.}| just +% before you issue the |\poemtitle| command. +% |\leftalignepigraphstrue| will also align attributions, +% dedications, and other pre-texts of poems. (It will not affect the +% dedications and attributions on volume title pages, which are set +% using the |\volumededication|, |\volumeepigraph|, and +% |\volumeattribution| commands.)\end{sloppypar} +% +% \subsection{~Appending publication date} +% \DescribeMacro{\poemdate} You can append the date of the poem +% with |\poemdate|. Issue |\poemdate| just after |\end{poem}|. You can +% include both the composition and publication date if you wish simply by +% including both dates in the argument. +% (In fact, you can put anything in the argument, not just dates.) By default |\poemdate| places the +% date one |\bigskip| under the left margin of the verse block of the poem, +% whether the poem is set at the left +% margin or whether the verse block is centered on the longest line. +% You can move the placement of the date left or right +% by changing the value of the length |\dateindent|. If you wish to change +% |\dateindent| you will have to issue |\setlength{\dateindent}{your value}| before +% each instance of |\poemdate|, since \textsf{poemscol} recalculates +% |\dateindent| freshly for every poem. +% +% There is a slight bug in |\poemdate|. If there is a page turn between the last line of the +% poem and the date, and the last line has a runover portion, the date will be set +% flush with the indented runover portion of the line rather than with the beginning +% of the line. This should not in practice +% be a problem, because you should use |\longpage| or several |\shortpage| commands +% to move the widow date line anyway. (For |\longpage| and |\shortpage| see section \ref{longpage}, +% page \pageref{longpage}.) +% +% \subsection{~Pausing line numbering} +% \DescribeMacro{\saveverselinenumber} +% \DescribeMacro{\restoreverselinenumber} There are cases in which you +% might want to pause and resume line numbering later at the same number. +% For instance, you may have inset prose +% passages which do not take line numbers, but you wish to resume line numbering the verse +% after the passage. The way to set this is to issue |\end{stanza}| +% at the end of the stanza before the prose insert. Then issue +% |\saveverselinenumber|. Then issue |\end{poem}|. Insert the prose +% quotation (perhaps followed by |\attribution|). Then issue +% |\begin{poem}| followed by |\restoreverselinenumber| and |\begin{stanza}|. +% Then begin entering the rest of the poem as usual. Longer, independent prose +% sections (such as the author's preface or prose poems) require +% different handling. To provide line numbers and notes for such +% prose sections, see section \ref{prosesections}. +% +% \subsection{~Quoted verse} +% Sometimes you wish to quote verse within verse (as when a speaker +% in a verse play quotes a poem). \DescribeMacro{quotedverse} The +% |quotedverse| environment is designed for this contingency. If +% you issue |\verseline| commands or the |stanza| environment, line counting +% and annotation will proceed as usual in quoted verse. +% +% \subsection{~Multiline poem titles}\label{multilinetitles} +% \DescribeMacro{\poemtitlefirstline} +% \DescribeMacro{\poemtitlemiddleline} +% \DescribeMacro{\poemtitlelastline} +% Very long titles present special problems. In the first place, they +% require special provisions to make sure that page breaks don't +% happen in the middle of a title, or immediately after a title. In +% the second place, they raise questions about how the author wished +% to break them up over several lines. If you think it might matter, +% these commands make it possible for you to ensure that long titles are +% broken in exactly the same way in your text and in your table of +% contents. (I didn't pursue this question for titles in notes +% sections, and in notes sections these commands simply concatenate a +% long title.) +% +% There are similar commands for most but not all of the whole series of +% titles for sequences, sequence sections, sequence subsections, and so on. +% If you need commands for a kind of multi-line title that is not already +% defined, see below at section \ref{customizing titles}, page \pageref{customizing titles}. +% +% Alternatively, you can just let \textsf{poemscol} handle the long +% titles by itself. If you are pretty sure that the author did not +% care how long titles were broken up, this would probably be the +% best thing to do. Remember also that if \textsf{poemscol} breaks a +% title across two lines, you can always force it not break the line +% by using enclosing the argument to |\poemtitle| in an |\hbox|. You +% may get a complaint on your log file about an overfull |\hbox| if +% you do this, however. +% +% \subsection{~Poems in sections} +% +% \begin{sloppypar} +% \DescribeMacro{\poemsectiontitle} +% |\poemsectiontitle| and |\poemsubsectiontitle|, as their +% names imply, set their arguments as the titles of sections or subsections of poems. +% |\poemfirstsectiontitle| is for the first section +% of a poem with many sections. (It differs from |\poemsectiontitle| +% in that it tries to make it harder for a page break to separate the +% title of a poem from the title of its first section.) +% |\poemsectiontitlefirstline|, |\poemsectiontitlemiddleline|, +% |\poemsectiontitlelastline|, |\poemsectiontitlenocontents|, and +% |\poemsectiontitlebaretitle|), as their titles imply, are used for +% special cases such as long section titles, if you wish to specify +% explicitly how the title is to be broken up in the text and in the +% table of contents. You can construct variants of these commands for +% dealing with special cases I didn't anticipate by using +% the commands described in section \ref{customizing titles}. +%\end{sloppypar} +% +% \subsection{~Poetic sequences}\label{poeticsequences} +% +% \DescribeMacro{\sequencetitle} \DescribeMacro{\sequencesectiontitle} +% \DescribeMacro{\sequencefirstsectiontitle} +% \DescribeMacro{\sequencesubsectiontitle} Sequences of related +% poems, perhaps with an over-title, demand special handling in the +% text, in the notes sections, and in the table of contents. (A +% moment's thought will show that they are different in some ways from +% poems in sections. For one thing, a sequence manifests a different +% relationship between part and whole than a poem in sections does, +% and often provides stronger experiences of momentary closure between +% sections.) |\sequencetitle| sets its argument as the title of the sequence, +% |\sequencesectiontitle| sets the titles of the sections of the +% sequence, and |\sequencesubsectiontitle| sets the titles of +% subsections of the sequence (there is even a command for the title +% of sub-subsections, |\sequencesubsbusectiontitle|). +% |\sequencefirstsectiontitle| gives a little more +% vertical space between the main title and the first section title +% than |\sequencesectiontitle| gives between adjacent sections later +% on in the sequence (since the over-title for the sequence is in +% larger type) and adjusts the page breaking penalties to reflect the +% fact that such titles should not occur near the bottom of a page, +% since there should be no page break between the sequence title and +% the title of the first section of the sequence (although page breaks +% are permissible, indeed even slightly favored, between later +% sections). There should also never be a page break between a +% section title and the first or second line of the section. The +% penalties \textsf{poemscol} sets should take care of these +% automatically, but you may still have cases which require you to +% specify a page break with |\pagebreak| or |\newpage|. There are a +% host of other commands, all with self-explanatory titles, that deal +% with some special situations that arise in setting the elements of +% poetic sequences, such as cases where you wish to specify how long +% titles will be broken up into lines, or where you wish no entry to +% be made for the section in the table of contents or in the notes +% sections. These commands don't of course exhaust the dizzying +% possibilities, but from them you can construct whatever other commands +% you may need. +% +% Here is a list of all of the defined title commands. +% +% \begin{itemize} +% \item Commands for Poem titles +% \begin{itemize} +% \item |\poemtitle| +% \item |\poemtitlefirstline| +% \item |\poemtitlemiddleline| +% \item |\poemtitlelastline| +% \item |\poemsubtitle| +% \item |\poemtitlenotitle| +% \item |\poemtitlenocontents| +% \item |\poemtitlebaretitle| +% \item |\poemonlycontents| +% \item |\poemonlynotes| +% \end{itemize} +% \item Poems in Sections +% \begin{itemize} +% \item |\poemsectiontitle| +% \item |\poemsectiontitlefirstline| +% \item |\poemsectiontitlemiddleline| +% \item |\poemsectiontitlelastline| +% \item |\poemsectiontitlenocontents| +% \item |\poemsectiontitlebaretitle| +% \item |\poemfirstsectiontitle| +% \item |\poemfirstsectiontitlebaretitle| +% \item |\poemsubsectiontitle| +% \end{itemize} +% \item Sequence Titles +% \begin{itemize} +% \item |\sequencetitle| +% \item |\sequencetitlefirstline| +% \item |\sequencetitlemiddleline| +% \item |\sequencetitlelastline| +% \item |\sequencetitlenonotes| +% \end{itemize} \goodbreak +% \item Sequence Sections +% \begin{itemize} +% \item |\sequencesectiontitle| +% \item |\sequencesectiontitlenocontents| +% \item |\sequencesectiontitlenonotes| +% \item |\sequencesectiontitlebaretitle| +% \item |\sequencesectiontitlefirstline| +% \item |\sequencesectiontitlemiddleline| +% \item |\sequencesectiontitlelastline| +% \item |\sequencefirstsectiontitle| +% \item |\sequencefirstsectiontitlenocontents| +% \item |\sequencefirstsectiontitlenonotes| +% \item |\sequencefirstsectiontitlefirstline| +% \item |\sequencefirstsectiontitlemiddleline| +% \item |\sequencefirstsectiontitlelastline| +% \item |\sequencesectionsubtitle| +% \end{itemize} +% \item Sequence Subsections +% \begin{itemize} +% \item |\sequencesubsectiontitle| +% \item |\sequencesubsectiontitlenocontents| +% \item |\sequencefirstsubsectiontitle| +% \item |\sequencefirstsubsectiontitlenocontents| +% \item |\sequencesubsectiontitlefirstline| +% \item |\sequencesubsectiontitlemiddleline| +% \item |\sequencesubsectiontitlelastline| +% \item |\sequencefirstsubsectiontitlefirstline| +% \item |\sequencefirstsubsectiontitlemiddleline| +% \item |\sequencefirstsubsectiontitlelastline| +% +% \item |\sequencesubsubsectiontitle| +% \item |\sequencesubsubsectiontitlenocontents| +% \item |\sequencefirstsubsubsectiontitlenocontents| +% \end{itemize} +% \end{itemize} +% +% \subsection{~Titles with marginal markers} +% \DescribeMacro{\JHpoemtitle} +% In his edition of the poetry of Jos\'e Maria Heredia, Tilmann +% Altenberg placed a marker in the margin next to poem titles with a +% reference to where in the apparatus notes on that poem could be +% found. To do this, use the |\JHpoemtitle| command. This command +% takes two arguments: first, the title of the poem, second, the label +% used by the |\label| command on the page of the notes section to +% which the title refers. So, you would issue the poem title command +% this way: |\JHpoemtitle{Los desvelados}{EP_LosDesvelados_AC}|. Up to +% version 2.49 of \textsf{poemscol} you had to be sure to define the +% label in the notes sections by issuing +% |\literaltextnote{\label{EP_LosDesvelados_AC}}|. This is no longer +% necessary, and |\JHpoemtitle| defines both the |\label| and the +% |\pageref|. Instructions are given in section \ref{JHpoemtitle}, +% p.~\pageref{JHpoemtitle} for how to construct similar commands for +% sequences, sequence sections, and so on. +% +% The following related commands are defined already: +% \begin{itemize} +% \item |\JHsequencetitle| \item |\JHsequencefirstsectiontitle| +% \item |\JHsequencesectiontitle| \item |\JHsequencesubsectiontitle| +% \item |\JHpoemsectiontitle| \item |\JHpoemfirstsectiontitle| +% \item |\JHpoemsubtitle| \item |\JHepigraph| \item |\JHprosesectiontitle| +% \item |\JHdedication| \end{itemize} +% +% If you are using |\JHpoemtitle| and its siblings, you need to be +% sure to add \textsf{mparhack} to your package list. You can prevent +% the marginal reference from switching sides on alternate pages by issuing +% |\@mparswitchfalse| (be sure to put |\makeatletter| and +% |\makeatother| around this command). You can control the side on +% which the marginal reference appears with |\normalmarginpar| (to +% place them on the right) or |\reversemarginpar| (to place them on +% the left). |\JHpoemtitle| and its siblings place the marginal +% reference using |\marginpar|. +% +% \DescribeMacro{\setmargpoemtitle} +% |\setmargpoemtitle| is a more general version of +% |\JHpoemtitle|, with the second argument being any commands you +% want to be issued while the title is being processed. +% +% \DescribeMacro{\margreftextnote}\label{margreftextnote} +% Another feature of Altenberg's Heredia edition is a marginal mark +% attached to lines to which text notes refer showing where in the +% apparatus a comment upon that line is to be found. +% |\margreftextnote| sets a label in the textual notes section, and +% sets a marginal note with a page reference to that label in the main text. Issue +% |\margreftextnote| \emph{before} issuing the |\verseline| or +% |\end{stanza}| that closes the line to which it refers. (The textual +% note itself can be an ordinary |\textnote|, and should be placed, as +% usual, \emph{after} the |\verseline| or |\end{stanza}|.) +% +% |\margreftextnote| generates its own label, so there is no need to +% make up one yourself. +% +% |\margreftextnote| uses |\marginpar| rather +% than |\pmclsidepar| to set the note, because I had to use +% |\marginpar| for |\JHpoemtitle| and its siblings, and I wanted the +% whole family of markers to be controlled by the same settings. You +% use the settings that control the behavior of |\marginpar| (e.g.\ +% |\mparswitch| and |\reversemarginpar|) to control the behavior of +% these marks. +% +% By default these marginal references are placed in the right margin. If you +% are centering the verse block on the longest line, the marginal references +% will move in closer to the line. (To center the verse block on the longest line, +% see section \ref{centeringtextblock}.) If you would prefer to keep the marginal +% references in the margin, set the boolean |\margrefstomargin| true. +% +% \begin{sloppypar} +% If you define a new endnote type using |\definenewnotetype|, +% |\definenewnotetype| will also define a new |\margref| command to go +% with it.\end{sloppypar} +% +% \DescribeMacro{\setmargrefmarker} Altenberg's edition used a ding +% from the pifonts collection in the marginal marks made by +% |\margreftextnote| and its siblings. I have set the default to +% |\dag|, so as not to depend upon yet another style package. You can +% choose another mark using |\setmargrefmarker| (e.g.\ +% |\setmargrefmarker{\ding{228}}|). +% +% \DescribeMacro{\margrefemendation} |\margrefemendation| is a +% version of |\margreftextnote| for emendations. +% +% \DescribeMacro{\margrefexplanatory}|\margrefexplanatory| is a +% version of |\margreftextnote| for explanatory notes. +% +% \subsection{~Empty poem titles and italicized poem titles} +% +% \DescribeMacro{\poemtitlenotitle} +% |\poemtitlenotitle|, with its paradoxical name, is for poems +% without formal titles. Usually such poems are referred to by their +% first lines. This command does not produce a title in the text, but +% sets its argument in the table of contents and in the notes. Usually +% you use the first line as the moral equivalent of a title. +% +% \DescribeMacro{\poemtitleitalic} +% Titles +% with italics or other special formatting posed special problems in +% earlier versions (before version 1.7) since the typesetting commands +% gummed up how I passed parameters around that I was unable to solve +% using |\protect|. All of these commands are obsolete now, but are +% retained for backward compatibility. +% |\poemtitleitalic| takes +% two arguments. The first is the title of the poem with the italics +% (or small capitals or international characters or what have you), +% for typesetting, and the second is the title without the commands, +% for cross reference purposes. (Actually, now that \textsf{poemscol} +% no longer needs to treat italics in titles in a different way, it can +% be anything you want, since the second argument is discarded.) +% +% \DescribeMacro{\poemtitlenotitleitalic} +% |\poemtitlenotitleitalic|, with its doubly paradoxical name, +% is for poems without formal titles but with italicized words in their +% first lines. |\poemtitlenotitleitalic| takes two arguments. The +% first is the first line with the italics (for typesetting +% purposes), and the second is the +% first line without the italics (for crossreference purposes). This command +% is obsolete now that italics in titles no longer require special +% handing, but is retained for backwards compatibility. +% +% \subsection{~Problem titles} +% \DescribeMacro{\poemtitlebaretitle} +% \DescribeMacro{\poemtitleonlycontents} +% \DescribeMacro{\poemtitleonlynotes} +% If you have a problem title, one for instance +% in which the title in the text might cause problems in the contents or in the notes, +% you can send information +% separately to the places it will be used. +% For example, a user planned to attach a footnote to a poem title, +% but didn't want the mark or the text of the +% note to show up in the contents or in the endnotes. I would usually +% have advised him to use |\sources| to send the text of the note to the endnotes, +% but he really wanted the title to include the footnote mark and to put the footnote +% on the same page. The solution to this problem +% was to set the title in the text separately from setting it in the notes and in the contents. +% |\poemtitlebaretitle|, for instance simply sets the title in the text. Then +% you can use |\poemtitleonlycontents| to send the title to the contents +% and |\poemtitleonlynotes| to send the title to the notes. These commands +% are defined for poem titles, and for some but not all of the whole range of titles including +% sequence titles, sequence section titles, sequence section subtitles, and so on. But +% it would be easy to roll your own versions of these commands by looking below at +% section \ref{customizing titles}, page \pageref{customizing titles}, or at the +% models in the code below at section \ref{poemtitlecode}, page \pageref{poemtitlecode}. +% +% \DescribeMacro{\poemtitlenocontents} +% \DescribeMacro{\poemtitlenonotes} +% \DescribeMacro{\poemtitlenotitle} +% There are also commands to send information to any two of the relevant locations +% but not the third. |\poemtitlenocontents| sends the title to the text and to the notes, +% but not to the contents. |\poemtitlenonotes| sends the title to the text and to the +% contents, but not to the notes. |\poemtitlenotitle| sends the title to the contents and the +% notes, but not to the main text. +% +% Remember that in the last resort, you can send information to the contents section +% with |\literalcontents|. To actually set a contents entry using |\literalcontents| is a tall order, +% however, since you would have to include all the information from the |\c@ntentsinfo| command +% for the relevant type of title. (For what |\c@ntentsinfo| does, +% see section \ref{customizing titles}, below.) +% For instance, for a poem called +% Test Poem, that would be: +% +% \begin{verbatim} +% \literalcontents{\setlength\contentsentryoverrun{\contentsindenttwoamount } +% \begin{contentsentryenvironment} +% \contentsindentone +% {\contentspoemtitlefont +% Test +% Poem} +% \contentsleaders +% \pageref{testpoemlabel} % pick a unique label +% \end{contentsentryenvironment} +% \par} +% \end{verbatim} +% +% Another tricky thing about this method is the |\pageref| line in the above, which is a pageref to find +% and set in the contents the number of the +% page the poem appears on. You should put |\label{testpoemlabel}|, with any unique +% text for the label (so long as it is the same one used in the |\pageref| line), +% on the page of the text where the poem occurs, in order to capture +% the correct page number. (Alternatively, you could just put the actual page number in +% what you send to the contents with |\literalcontents| instead of the pageref line, but you will +% have to remember to change this number if anything changes in your edition.) +% +% Remember also that you can send information to the relevant notes sections using +% |\literaltextnote|, |\literalexplain|, and |\literalemend|. +% +% +% \subsection{~Customizing titles} \label{customizing titles} \textsf{poemscol} provides a large +% number of ways of setting titles, but conceivably you may wish to +% define your own. Here is a template for designing a new kind of +% title. Suppose you wish to create a kind of title called +% |\mytitle|. It would take one argument, which would be the title +% itself. The command defining the |\mytitle| command should call three commands, +% |\set@p@emtitle|, to set the title in the main text and make the +% label for use by the contents and notes sections, |\c@ntentsinfo| to +% set the title in the table of contents, and |\t@xtnotesinfo|, which +% sets the title in the notes sections. (You should enclose the whole thing +% between |\makeatletter| and |\makeatother|.) +% +%\DescribeMacro{\set@p@emtitle} +% |\set@p@emtitle| +% takes six arguments, which are, in order, (1) the title (which, if +% you are calling this command inside of the definition of |\mytitle| +% should just be |#1|), (2) commands to be issued before setting the +% title (minimally, a penalty, such as |\poemtitlepenalty|), (3) the +% font size in which the title is to be set in the text (such as +% |\poemtitlefont| or |\large|), (4) any indentation of the title +% (|\relax| for |\poemtitle|, or |\titleindent| for +% |\sequencesectiontitle|), (5) commands to be issued after the +% title is set (such as |\afterpoemtitleskip|) and (6) the amount +% overrun lines in the title should be indented. +% +%\DescribeMacro{\c@ntentsinfo} +%|\c@ntentsinfo| takes +% four arguments, which are, in order, (1) the title, (2) the +% indentation of the title in the table of contents (such as +% |\contentsindentone|), (3), the font size in which the title +% should be set (such as |\contentspoemtitlefont|) and (4) the amount +% overrun lines in the table of contents should be indented (such as +% |\contentsindenttwoamount|). +% +% \DescribeMacro{\t@xtnotesinfo} +% |\t@xtnotesinfo| +% takes one argument, the title. +% +% So, for example, to create a new kind of title called |\mytitle| which looks +% just like |\poemtitle|, issue +% \begin{verbatim} +% \makeatletter +% \newcommand{\mytitle}[1]{% +% \set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +% {\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +% \c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +% {\contentsindenttwoamount}% +% \t@xtnotesinfo{#1}% +% } +% \makeatother +% \end{verbatim} +% +% (The |\z@| which is the sixth argument to |\set@p@emtitle| above is +% a constant set to zero. You will also notice that I became completely hysterical +% on the subject of preventing a page break after a poem title.) + +% By default, \textsf{poemscol} +% does not indent the overrun portion of titles relative to the first +% line of the title, but if that first line is indented will set the +% overrun portions to be indented the same amount. Overrun portions +% of titles in the table of contents will be indented by one +% |\contentsindentamount| more than the first line is indented. Both +% of these behaviors can be changed by changing the arguments to +% |\set@p@emtitle| or |\c@ntentsinfo|. +% +%\DescribeMacro{\firstlinesettings} +%\DescribeMacro{\middlelinesettings} +%\DescribeMacro{\lastlinesettings} +%\DescribeMacro{\restoresinglelinesettings} +% If you wish to design a title which might have multiple lines, +% and you wish to specify how those lines are broken up, you +% will need to write three commands: one for the first line, one for +% middle lines, and one for the last lines. +% (This only matters if you care how the title is broken up. You +% can choose to let \LaTeX\ do the breaking if you wish.) Before issuing +% |\set@p@emtitle| issue |\firstlinesettings|, |\middlelinesettings|, +% or |\lastlinesettings| (as the case may require). And issue +% |\restoresinglelinesettings| last of all in each of your three +% commands. The lines will be broken in the table of contents and in +% the body of the text in the same way, but will be run in in the +% notes sections. +% +% \subsection{~Visual formatting} +% \DescribeMacro{\longpage} +% \DescribeMacro{\shortpage} +% \label{longpage} +% The ideal in \LaTeX\ is to separate +% content markup and formatting as completely as possible. In the text +% itself you simply mark the logical units (a poem, a title, a stanza, +% a textual note), and a header program (like \textsf{poemscol}) interprets the +% meaning of those terms typographically. However, one still winds up +% having to do some visual formatting. Especially in prose sections, +% such as in the textual notes, you will sometimes have to enlarge or +% shrink a page by one line in order to avoid an intractable widow or +% club line, and when one does so one must be careful to do the same to +% the other member of the two-page spread of which that page is a part +% so that the spread will be properly balanced. +% These commands enable one to wiggle pagelength enough to handle these +% problems. Since verse sections should be set with |\raggedbottom| +% in effect, the commands are not necessary in verse sections. +% +% |\longpage| and |\shortpage| are cumulative: issuing |\longpage| twice lengthens the +% page by two lines, and issuing |\shortpage| twice shortens the page by two lines. +% +% \section{Customizing page geometry and page styles} +% +% +% \subsection{~Font sizes, skips, sinks, indents, and penalties} +% +% \label{changingfontsandleading} +% \textsf{poemscol} sets the font sizes, but not the typeface, of +% fonts for many common tasks, in order to create a hierarchy of +% sizes. They can be changed with a |\renewcommand| of the following +% form, where the first number is the font size in points and the +% second is the leading:\\ +% |\renewcommand{\volumetitlefont}{\fontsize{18}{23}\selectfont}| +% +% +% The following table gives the default values for the fonts. The titles of +% the fonts give their uses. Backmatterheaderfont is for setting the +% titles of back matter sections. Sequence section titles use +% poemtitlefont. Backmattertext font is |\small|, backmatterintrofont +% is |\normalsize|. +% \bigskip +% +% \begin{tabular}{l l l} +% \textbf{Font} & \textbf{Size} & \textbf{Leading} \\ +% volumetitlefont & 18 & 23 \\ +% volumesubtitlefont & 14 & 18 \\ +% poemtitlefont & 14 & 18 \\ +% sequencetitlefont & 16 & 20 \\ +% subsectiontitlefont & 12 & 14.5 \\ +% backmatterheaderfont & 16 & 20 \\ +% backmattervolumefont & 12 & 14.5 \\ +% backmattervolumesubtitlefont & 11 & 13 \\ +% contentsvolumefont & 13 & 20 \\ +% contentsvolumesubtitlefont & 12 & 14.5 \\ +% contentssequencetitlefont & 10 & 14 \\ +% contentspoemtitlefont & 10 & 14 \\ +% \end{tabular} +% +% \bigskip +% +% The following table gives various skips, sinks, penalties, and indentations. The +% titles of these should be self-explanatory. These should be changed +% with |\renewcommand| as follows:\\ +% |\renewcommand{\volumetitlesink}{\leavevmode\vspace{23.5pt}}| +% \bigskip +% +% \begin{tabular}{l l l} +% \textbf{Name} & \textbf{Argument} & \textbf{Comment} \\ +% backmattersink & 21.5pt & \relax \\ +% backmatterafterheadersink & 11pt& \relax \\ +% afterpoemtitleskip & |\smallskip| & \relax \\ +% afterpoemskip & |\bigskip| & \relax \\ +% aftersequencetitleskip & |\medskip| & \relax \\ +% stanzaskip & |\medskip| & Extra skip between stanzas \\ +% titleindent & |\titleindentamount| (1pc) & use |\setlength| to +% change \\ +% parindent & |\titleindentamount| & \relax \\ +% volumetitleshift & |\volumetitleshiftamount| (1pc) & use |\setlength| to +% change \\ +% contentsindentone & 24pt & \relax \\ +% contentsindenttwo & 42pt & \relax \\ +% contentsindentthree & 60pt & \relax \\ +% contentsindentfour & 72pt & \relax \\ +% runoverindentvalue & 6em & for runover lines in verse\\ +% verseindent & 2em & for formally indented lines\\ +% notesclubpoempenalty & -300 & \relax \\ +% notessequenceclubpenalty & -1500 & \relax \\ +% notesvolumetitlepenalty & -1500 & \relax \\ +% epigraphquoteleftmargin & 1.5em & for epigraphs, attributions, etc.\\ +% epigraphquoterightmargin & 1.5em & \relax \\ +% \end{tabular} +% +% \subsection{~Customizing page styles} +% \textsf{poemscol} sets several default page styles, defined +% below. The main page style is ``fancy,'' which is used for +%the main body of the poetry, +% prose frontmatter (such as introductions), and the endnotes sections. +% ``Volumefirststyle'' is for the +% first page of a volume of poems. ``Volumetitlestyle'' is for the +% title page of a volume of poems. The external file for the table of +% contents redefines ``fancy,'' so you should issue |\resetpagestyle| +% after issuing |\putpoemcontents|. |\resetpagestyle| resets the page +% style to ``main'' (which is the same as the original ``fancy''). +% +% Because |\putpoemcontents| resets the page style to ``main,'' any page style you defined +% in the preamble becomes forgotten if you include a table of contents. There are two +% possible solutions to this. The first is to define your page style after you have issued +% |\putpoemcontents|. The second is to redefine the fancypage style ``main,'' so that it does +% what you want. In either case, do not forget to issue |\pagenumbering{arabic}| +% after |\putpoemcontents|, else all of your page numbers will be in roman numerals. +% You can find the default +% definitions of those ``fancy'' and ``main'' below at \ref{pagestyledefs}, page \pageref{pagestyledefs}. +% +% +% You can change the text in the left (verso) running head +% by issuing |\leftheader{your header}| or |\volumeheader{your header}|. (The commands +% are synonyms.) You can change the text in the right (recto) running head by issuing +% |\rightheader{your header}|. +% +% \subsection{~Special page style for long poems} The fancy page style ``longpoem'' +% will add information of the form ``firstline--lastline'' to the running header. This +% page style otherwise resembles ``main,'' and ``fancy.'' +% Issue |\pagestyle{longpoem}| to use this page style. If you use ``longpoem,'' be sure to +% call \textsf{etex} and \textsf{emarks} in your preamble. Also, when a poem ends, be sure +% to issue |\newpage|, otherwise the running header will list the first line on the page from the +% first poem and the last line on the page from the second poem. +% +% If you use ``longpoem'' and you have a table of contents, you must issue +% |\pagestyle{longpoem}| at some point \emph{after} issuing |\putpoemcontents|. +% Do not forget to issue |\pagenumbering{arabic}| +% after |\putpoemcontents|, else all of your page numbers will be in roman numerals. Also, if you +% have back matter, you must issue |\pagestyle{main}| at the end of your poetry section, +% before the back matter starts, since otherwise your header will include the last line +% number \textsf{poemscol} saw. Issuing |\pagestyle{main}| will restore the normal page +% headers for the backmatter +% sections. +% +% The header will include the abbreviation l.\ (for a single line) or ll.\ (for a range of lines). +% You can change either abbreviation with |\changesinglelineabbrev| or +% |\changemultiplelineabbrev|. So, for instance, to get rid of the abbreviations +% entirely, issue |\changemultiplelineabbrev{\relax}| and |\changesinglelineabbrev{\relax}|. +% +% You may need to play with |\leftheader| and |\rightheader| to get the information you +% want into the header. You might, for instance, what to use something like +% |\leftheader{``Your main title'' \hfil ``Your poem title''}| and +% |\rightheader{``Your volume title'' \hfil ``Your poem title''}|. Whatever else you put into +% the header, the last thing should be your poem title, since it will be followed by the line +% numbers. +% +% \subsection{~Page geometry and type leading} +% +% You have to give geometry the values that suit you. I include the +% values I used in my own book, just to give you a starting place. +% The default values for marginparsep and +% marginparwidth are different now (18pt and 18pt respectively). With +% that warning, here is a list of the values I used: +% +% \bigskip +% +% \begin{tabular}{l l} +% textheight&6.75in\\ +% marginparsep&18pt\\ +% marginparwidth&18pt\\ +% headheight& 14pt\\ +% paperwidth&6in\\ +% paperheight& 9in\\ +% inner&4.5pc\\ +% outer&4.5pc\\ +% footskip&15pt\\ +% \end{tabular} +% +%\bigskip +% +%% +% In my own book I also, strictly to save money, and at the price of +% some ugliness, changed the definition of |\normalsize| and |\small|, +% so that the former was 10 pt type on 11 pt leading (rather than 12 +% pt), and that the latter was 9 pt type on 10 pt leading. You can +% reproduce this setting by issuing |\tightleading|, although I would +% advise not doing so unless you are under financial constraints. +% +% \section{Prose Sections with line numbers} \label{prosesections} +% \subsection{Setup} +%\textsf{poemscol} +% uses the \textsf{lineno} package to make marginal line numbers for +% prose sections such as the Author's Introduction, Afterword, +% Author's Notes, or such prose interludes or prose poems the volume +% may include. To control the appearance, placement, and frequency of +% marginal line numbers in prose sections, you may wish to consult the +% manual to \textsf{lineno}. I have added a minimal user interface to +% make \textsf{lineno} cohere with poemscol. You may have to fiddle +% with the parameters of both \textsf{poemscol} and \textsf{lineno} to +% persuade them to set marginal line numbers that look the same way in +% prose and verse contexts. The default values should work as is. +% +% Line numbers in prose sections are placed using a different +% |\length| from that used in verse sections. Essentially, verse +% sections, and prose sections which use paragraph and sentence +% numbering --- see below, in section \ref{paragraphsentence} --- +% place the marginal line numbers using |\marginparsep|. Prose +% sections which are numbered by line use |\linenumbersep| instead, +% which is a length defined in the \textsf{lineno} package. I have +% given values for both lengths which seem to place line numbers on +% the left and on the right side in prose sections roughly where they +% are placed in verse sections. You can change these values with +% |\setcounter{countername}{length}|. +% +% |\verselinenumberstoleft| and |\verselinenumberstoright| also place +% the line numbers to the left or to the right, respectively, in prose +% sections. If you wish the numbering to appear on a different side +% in prose contexts you can set the side by issuing |\leftlinenumbers| +% or |\rightlinenumbers|. These last are commands from the +% \textsf{lineno} package. The two forms in which line numbers switch +% sides in prose contexts can't at the moment be used, because of a +% clash between how \textsf{lineno} handles line numbers that switch +% sides and the way I pass the line numbers to notes sections. If you +% have set the verse line numbers to switch sides, prose line numbers +% will appear on the right side. I hope soon to find a workaround for +% this problem. +% +% By default, the line modulo for prose sections is the same as that for +% verse sections; if you have a line number every 5 lines in verse, +% you will have the same in prose. You can set the prose line modulo +% independently with |\setprosemodulo|. +% +% \textsf{poemscol} may deal with rather long stretches of prose, but +% it is not designed to be used for critical editions of extended +% prose texts, as \texttt{EDMAC}, \textsf{reledmac}, or \textsf{ednotes} +% are. The method of entering line ranges into notes in prose +% contexts is something of a hack, and rather a worse one than the one +% employed in verse contexts, since it involves using two labels for +% each note, one to capture the line number of the beginning, the +% other to capture the line number of the end. Other limitations of +% this method may show up with longer prose extracts. +% +% \DescribeMacro{\prosesectiontitle} Prose sections may be titled with +% |\prosesectiontitle| which is essentially just |\poemtitle|, or +% |\prosesectiontitlenotitle|, which is essentially just +% |\poemtitlenotitle|. (Remember that if you use the latter command, +% you must specify a ``dummy'' title to use in the note and contents +% sections.) They will be formatted in the notes and contents +% sections as poems are. Alternatively, you can use +% the commands for defining new kinds of titles, in section +% \ref{customizing titles}, page \pageref{customizing titles}, +% to make new kinds of titles for prose sections. +% +%\DescribeMacro{prosesection} +% Prose sections should be enclosed in a |prosesection| environment +% (between |\begin{prosesection}| and |\end{prosesection}|). Entering +% this environment sets the modulo repeat for line numbering to the +% same value that prevails in verse contexts, and resets the prose +% line number to zero. If for some reason you do not wish to reset +% the line number but continue on from where it left off at the end of +% the last prose section, use the |prosesectionnoreset| environment +% instead. +% +% \DescribeMacro{\setprosemodulo} +% If you wish to set the modulo repeat for line numbering in prose to +% some value different for that from verse contexts, issue the new +% modulo as the argument to |\setprosemodulo|. +% +% It is possible, if a prose section is interpolated in the midst of +% verse, to number the prose and verse continuously. To move from a +% verse passage to a prose passage, just before the |\end{poem}| at +% the end of the first verse passage issue |\saveverselinenumber| to +% save the number of the verse passage. After you issue +% |\begin{prosesection}| issue +% |\resetlinenumber[\theverselineumberscratch]| to apply that number +% to the prose section. To number continuously while moving from +% prose to verse is more tricky. One way might be to mark a label at +% the end of the prose passage with |\proselinelabel{prose end label}| +% (or some other suitably unique label). This label will record the +% line number of the last prose line. Pass that value to +% |\restoreverselinenumber| by issuing +% |\setcounterfromref{verselinenumberscratch}{prose end label}|. Then +% issue |\restoreverselinenumber| just after issuing the +% |\begin{poem}| that restarts the verse again. I would recommend +% against numbering verse and prose continuously, however, since a +% verse line and a prose line are different categories of thing, the +% one being an element of prosody, the other being only an element of +% typography. +% +% +% \DescribeMacro{\proselinelabel} +% |\proselinelabel| is simply |\linelabel| from \textsf{lineno}. I +% have provided the new name to make it easy to distinguish from +% |\poemlinelabel|. +% +% +% \subsection{Endnotes for prose sections} +% \DescribeMacro{\prosetextnote} +% \DescribeMacro{\prosemendation} +% \DescribeMacro{\proseexplanatory} +% Special versions of |\textnote|, |\emendation| and |\explanatory| +% are available for use in prose sections. |\prosetextnote|, +% |\proseemendation|, and |\proseexplanatory| differ from the verse +% versions in that they each require an extra argument, a unique label +% to be used in locating the line number for use by the notes +% commands. If |\maketextnotes|, |\makeemendations|, or +% |\makeexplanatorynotes| have been issued, the endnotes will be sent +% to the usual sections, where all the notes from that prose section +% will be grouped into a paragraph, with the entry headed by the title +% given by |\prosesectiontitle|, just as if that were the title of a +% poem. |\textnotesatfoot|, |\emendationsatfoot|, and +% |\explanationsatfoot| will send the notes from prose contexts to the +% usual footnote levels. Notes commands in prose contexts take three +% arguments. As in verse sections, in prose sections textnotes, +% explanatory notes, and emendations have an optional first argument +% for recording line ranges. As in verse sections, you can record +% these line ranges either by simply putting in the argument how many +% lines the lemma will refer to (a deprecated method retained for +% backward compatibility reasons), or the argument of a +% |\proselinelabel| command on the last line of the lemma. (The only +% difference from the verse version here is that you should make the +% label using the |\proselinelabel| command, rather than with the +% |\poemlinelabel| command.) The second argument is a label to +% identify each note uniquely, which is used to find the line number +% at which the note begins. You will need a different label for +% every note. The third argument is the text of the note, which +% should include both the lemma and the rest of the note, as in the +% notes for verse sections. +% |\proseemendation[]| and +% |\proseexplanatory[]| are coded the same way. So, if you wished +% to make a textual note on a passage that begins with ``Call me +% Ishmael.'' and ends ``a way of driving away the spleen,'' you would +% issue at the point where the note is to +% occur (at the beginning of the passage): +% \begin{verbatim} +% \prosetextnote[a way of driving away the spleen] {Call me Ishmael} +% {Call me Ishmael \ldots\ a way of driving away the spleen] text of +% textual note} \end{verbatim} On the +% last line of the passage to which the note refers you would +% issue: \\ |\proselinelabel{a way of driving away the spleen}|. +% +% \DescribeMacro{\prosetsvariant} +% \DescribeMacro{\proseaccidental} +% \DescribeMacro{\prosetsaccidental} +% You can issue |\sources| and |\tsentry| in prose contexts as usual. +% For typescript variants and accidental variants you need to issue +% |\prosetsvariant[]|, |\proseaccidental|, and +% |\prosetsaccidental|. |\prosetsvariant| is entered just as +% |\prosetextnote[]| is, with an optional argument (for use with +% line ranges, as usual), and two mandatory arguments (the first a +% label to capture the line number, the second the lemma and comment). +% +% |\proseaccidental| and |\prosetsaccidental| take only the two +% mandatory arguments, since by definition an accidental variant is +% confined to one line. +% +% One caveat: because the line numbers for notes in prose contexts +% are generated by a label/ref mechanism, each note will result in a +% complaint about an undefined reference the first time the file is run through +% \LaTeX. Either run the first pass in quiet mode, or be prepared to +% ignore a lot of griping until +% \LaTeX\ has generated the .aux file at the end of the first run. +% +% \section{Paragraph and sentence annotation}\label{paragraphsentence} +% \subsection{~Setup} +% Annotating a prose section by sentence number, or by paragraph number and +% sentence number, has some advantages over annotating it by line +% number. The principal advantage is that the annotation and reference +% system can remain stable over multiple editions, even if they are set +% in different formats. The most familiar of such systems is the +% chapter and verse system in the Bible, introduced by Archbishop +% Stephen Langton in the thirteenth century (who divided the Vulgate +% edition into numbered chapters) and by Robert Estienne in the +% sixteenth century (who added the verse numbers). Such a form of +% annotation might be especially useful for medieval prosimetra, a form +% combining verse and prose. (Hence the commands that follow often +% begin with |pm|.) +% +% \DescribeMacro{pmsection} +% You should put prose marked up for sentence and paragraph +% annotation in a |pmsection| environment. +% You do not need to put prose marked up for sentence and paragraph +% annotation in a |prosesection| environment. That environment is +% only needed if you are line-numbering prose. You also do not need +% to load the \textsf{lineno} package if you are using the sentence +% and paragraph system for annotating prose. You might, however, +% still wish to set the title with |\prosesectiontitle|. +% +% \DescribeMacro{\setprosebysentence} +% |\setprosebysentence| sets \textsf{poemscol} to number prose by +% sentence rather than by line number. This command is mostly a +% placeholder now, used only for setting the value of |\marginparsep| +% to something better for prose. (|\marginparsep| sets how far the +% line numbers are from the text block.) |\verselinenumberstoleft|, +% |\verselinenumberstoright|, and |\verselinenumbersswitch| each pick +% convenient values for |\marginparsep|. By default these values all +% line up on the page, but if you change any of them, you may have to +% use reset |\marginparsep| to some value you will have to find by +% trial and error, since they each use |\marginparsep| in slightly +% different ways. You can change |\marginparsep| either by using +% |\setlength{\marginparsep}{length}| or, better, by using +% |\renewcommand| to change the setting of |\marginparsep| in +% |\verselinenumberstoleft| or whatever else you intend to use. Adjust +% |\headoffsetlength| to make the page numbers line up with the line numbers. +% +% +% \DescribeMacro{\pmsentence} Each sentence must begin with +% |\pmsentence|. |\pmsentence| increments the sentence counter, +% optionally puts the sentence number in the running text, and +% optionally puts the sentence number in the margin. +% +% |\runningsentencenumberstrue| +% sets sentence +% numbers in the running text. +% To set sentence numbers in the margin, issue +% |\marginsentencenumberstrue|. You can issue both, either, or neither of +% these commands. +% +% \DescribeMacro{\setpmmodulo} If you are putting sentence numbers in +% the margin, you need not number every sentence. Indeed, if there is +% more than one sentence on a line, the numbers will overwrite each +% other (unless you use the marn.sty package, and substitute |\marn| +% for |\pmclrightsidepar|, |\pmclleftsidepar| or |\pmclsidepar| in the +% code for |\pmsentence|). You can also avoid overlapping sentence +% numbers by using |\pmsentencetwo| and its siblings, defined below. +% You can set the modulo for sentence marginal numbers by issuing +% |\setpmmodulo|. +% +% \DescribeMacro{\pmsentencetwo} +% \DescribeMacro{\pmsentencethree} +% \DescribeMacro{\pmsentencefour} If you know, from a prior run, +% that there will be a second or third sentence on some particular +% line, marking them with these commmands will ensure that the +% marginal sentence numbers do not overwrite each other. These commands +% are something of a kludge, but they will do until I figure out how +% to do this better. +% +% \DescribeMacro{\pmnumberstoright} +% \DescribeMacro{\pmnumberstoleft} +% \DescribeMacro{\pmnumbersgutter} +% \DescribeMacro{\pmnumbersouter} +% If you wish to control the +% margin in which sentence and paragraph numbers appear, issue +% |\pmnumbersright|, |\pmnumbersleft|, |\pmnumbersgutter|, or +% |\pmnumbersouter|. By default, these numbers will line up with the +% line numbers in verse sections. If you change the value of +% |\marginparsep| for prose sections from those used by their verse +% equivalents, it is a good idea to issue the verse equivalent command +% (|\versenumberstoright| or whatever) again when you move from a +% prose to a verse environment. +% +% +% |\runningsentencenumberformat| sets the format of running sentence +% numbers. Currently it is |\textsuperscript| (the numbers are set as superscripts) and |\tiny|. +% The format of marginal sentence +% numbers is set by |\marginsentencenumberformat|. Currently it is +% |\tiny|. Definitions of both commands are found at section \ref{runningsentencenumberformat}, +% page \pageref{runningsentencenumberformat}. You can change either with |\renewcommmand|. +% +% \DescribeMacro{\pmpara} +% \DescribeMacro{\pmsentencebypara} +% \DescribeMacro{\pmsparainmartrue} +% \DescribeMacro{\pmpararunningtrue} +% You can also number paragraphs. Each paragraph must begin with +% |\pmpara|. |\pmpara| increments the paragraph counter, optionally +% puts the paragraph number in the running text, and optionally puts +% the paragraph number in the margin. To reset the sentence counter +% at the beginning of each paragraph, issue |\pmsentencebyparatrue| in +% your preamble. To set paragraph numbers in the margin, issue +% |\pmparainmartrue|. To set paragraph numbers in the running text, +% issue |\pmpararunningtrue|. You can issue both, either, or neither of +% these last two commands. Which margin these numbers are set in +% is controlled by the same commands that control placement of +% marginal sentence numbers. +% +% If you begin a paragraph with |\pmpara| \textsf{poemscol} will +% assume that you intend to include the paragraph number in your +% notes (in the form \textless \emph{paragraph +% number}\textgreater:\textless \emph{sentence number}\textgreater\ for simple +% references, or \textless \emph{first paragraph +% number}\textgreater:\textless \emph{first sentence number}\textgreater\ -- +% \textless \emph{lastparagraph +% number}\textgreater:\textless \emph{last sentence number}\textgreater\ +% for ranges of sentences) even if you do not reset +% the sentence number at the beginning of each paragraph. Normally +% you would not issue |\pmpara| if you are not resetting the sentence +% number at the beginning of each paragraph, since under those +% circumstances you don't really need to keep track of the paragraph +% numbers, in which case each note would simply include the sentence +% number (just as in verse it would include the line number). In the +% unusual event in which you wish to put the paragraph number in the +% margin but refer only to sentence numbers in the notes, simply +% follow every use of |\pmpara| with |\pmparasfalse|. +% +% \DescribeMacro{\pmpararunningformat}\DescribeMacro{\pmparmarformat} +% The format of running paragraph numbers is set +% by |\pmpararunningformat|. Currently it is +% |\textbf| and |\small|. +% The format of marginal paragraph numbers is set by +% |\pmparmarformat|. Currently it is +% |\textbf| and |\small|. The definitions of these commands are found at +% section \ref{pmparrunningformat}, page \pageref{pmparrunningformat}, Either can +% be changed with |\renewcommand|. +% +% \subsection{~Cross references by sentence and paragraph} +% \DescribeMacro{\sentencelabel} +% To make labels that refer to sentences or paragraphs, issue +% |\sentencelabel|. The label will be either both the paragraph +% number and the sentence number (if you are resetting sentence numbers +% by paragraph), or only the sentence number (if you are not resetting +% sentence numbers by paragraph). +% +% \subsection{~End notes by sentence and paragraph} +% +% \begin{sloppypar} +% \DescribeMacro{\pmtextnote} +% \DescribeMacro{\pmexplanatory} +% \DescribeMacro{\pmemendation} +% \DescribeMacro{\pmaccidental} +% \DescribeMacro{\pmtsvariant} +% \DescribeMacro{\pmtsaccidental} +% |\pmtextnote|, |\pmexplanatory|, |\pmemendation|, |\pmaccidental|, +% |\pmtsvariant| and |\pmtsaccidental| are special versions of the +% usual endnote commands for use with annotations by sentence and +% paragraph. If you have not issued |\pmsentencebypara| these +% commands will write the sentence number at the head of each note, +% where the line number would usually go. If you have issued +% |\pmsentencebypara|, these commands will issue both the paragraph +% and sentence number, in the format \textless \emph{paragraph +% number}\textgreater:\textless \emph{sentence number}\textgreater. You can +% refer to ranges of sentences (or paragraphs and sentences) in a way +% very similar to how you do so in verse sections. At the end of the +% range, issue a |\sentencelabel| command, with a unique label. At +% the beginning of the range, issue your |\pmtextnote| command with the +% optional argument in square brackets before the main argument, +% giving your unique label as the value of that argument, e.g. +% |\pmtextnote[some label]{text of lemma] comment}|. At the end of +% your range, issue |\sentencelabel{some label}|, using the same +% label you put in the square brackets for the |\pmtextnote|. If you have not +% issued |\pmsentencebypara|, the range will simply be the range of +% sentence numbers. If you have issued |\pmsentencebypara|, the range +% will include paragraph and sentence numbers, like this: +%\textless \emph{first paragraph +% number}\textgreater:\textless \emph{first sentence number}\textgreater\ -- +% \textless \emph{lastparagraph +% number}\textgreater:\textless \emph{last sentence number}\textgreater, for example: +% 4:12--6:13.\end{sloppypar} +% +% |\sources| needs no special handling if you are annotating by +% sentence and paragraph. +% +% \subsection{~Footnotes by sentence and paragraph} +% |\textnoteatfoot| shifts |\pmtextnotes| to the foot, as with +% |\prosetextnote|. |\emendationsatfoot| and |\explanationsatfoot| +% work the same way. +% \subsection{~Bible chapter and verse} +% Since |\pmsentence| and |\pmpar| are the moral equivalents of bible +% verse and chapter, |\biblechapter| and |\bibleverse| are provided +% for convenience. + +% \section{Parallel text editions} \label{parallelhack} +% \subsection{~Setup for parallel texts in verse} +% \textsf{poemscol} can make parallel +% text editions in which the contrasting versions are set on facing +% verso and recto pages. \textsf{poemscol} does not automatically provide the page +% breaks for parallel editions, and even if it did, one would still +% probably have to specify page breaks every two or three pages to keep +% the texts in register anyway, so you will have to use |\newpage| +% to mark every page break. If you are willing to set the page breaks +% yourself, however, \textsf{poemscol} does provide commands for keeping the line count +% correct on successive recto or verso pages, and for keeping track of +% whether or not one was in the middle of a stanza when one closed the +% previous verso or recto page (as the case may be). And it provides, in +% the |\synchrolabel| and |\synchroref| commands, a way of marking which +% lines on the recto side correspond to particular lines on the verso +% side. |\synchroref| will even tag the marginal line number it makes +% with a marker to specify the text to which it refers. +% +% \DescribeMacro{\startparalleltexts} +% \DescribeMacro{\finishparalleltexts} +% \DescribeEnv{parallelverse} +% You must begin a region of parallel text on a \emph{verso} page. +% A parallel text region must begin with +% |\startparalleltexts| and end with |\finishparalleltexts|. +% Setting parallel texts requires one to redefine the poem and stanza +% environments, and |\startparalleltexts| redefines those environments. +% You can make those changes local to the parallel text region by using +% |\begin{parallelverse}| and |\end{parallelverse}| rather than |\startparalleltexts| +% and |\finishparalleltexts|. +% |\startparalleltexts| and |\finishparalleltexts| can be issued on their own +% but I have combined them to make the |parallelverse| environment. +% +% Although usually with \textsf{poemscol} it is up to you where to put +% the marginal line numbers, when you issue |\startparalleltexts| the +% positions are fixed as follows: marginal line numbers are in the left +% margin, line cross references (marking which lines in the recto text +% correspond to which lines in the verso text, which +% are made with |\synchroref|) are in the right margin. +% +% +% \DescribeMacro{\startrectopage} +% \DescribeMacro{\finishrectopage} +% \DescribeMacro{\startversopage} +% \DescribeMacro{\finishversopage} +% Verso pages +% should begin with |\startversopage| and end with |\finishversopage|. +% Recto pages should begin with |\startrectopage| and end with +% |\finishrectopage|. You have to declare the page breaks manually, +% so be sure you are putting the |\finishversopage| or |\finishrectopage| commands +% in places which +% will work. |\finishparalleltexts| just makes certain that stanzas, and poems +% that you opened in a region of parallel texts are closed when you leave it. +% +% \DescribeMacro{\versopoemtitle} +% \DescribeMacro{\rectopoemtitle} +% \DescribeMacro{\versopoemtitlenocontents} +% \DescribeMacro{\rectopoemtitlenocontents} +% Use |\versopoemtitle| and |\rectopoemtitle| +% rather than |\poemtitle| for the title of the poem (or prose passage) +% on the verso or recto pages. +% if you are making a parallel text of Wordsworth's 1805 and 1850 +% versions of \emph{The Prelude}, you might want to use something +% like |\versopoemtitle{The Prelude (1805 Version)}| and +% |\rectopoemtitle{The Prelude (1850 Version)}|. +% I have also made versions of these commands that do not make +% entries in the table of contents, should the need arise for them. +% If you wish to make titles for other things, +% such as poetic sequences or sequence sections, you can use the techniques +% described in section \ref{customizing titles} above, page \pageref{customizing titles}, +% except substitute the command |\versoset@p@emtitle| +% or |\rectoset@p@emtitle| for |\set@p@emtitle|, using +% all the same arguments you would have used with |\set@p@emtitle|. +% +%\subsection{~Parallel texts and on the fly note types} +% If you are making a parallel text edition, you may need to +% use |\definenewnotetype| to make the different kinds of endnote +% for the parallel texts. For instance, +% if you are making a parallel text of Wordsworth's 1805 and 1850 +% versions of \emph{The Prelude}, you may use something like |\fiveexplanatory| +% and |\fiftyexplanatory| for explanatory notes for the poems on the verso +% and recto pages. +% +% +% \DescribeMacro{\keeptitlestraight} +% Without special care, \textsf{poemscol} may become +% confused about whether it has seen, for example, a |\fiveexplanatory| for +% a particular book of \emph{The Prelude} or not, and, if |\settitleinnotes| is set, +% may neglect to put the +% title of that book of \emph{The Prelude} in the notes +% for the first note for that book. To remedy this, |\versopoemtitle| +% and |\rectopoemtitle| set up a way of keeping track whether each species +% of note has appeared already or not. +% While setting parallel texts \textsf{poemscol} checks at the beginning of every +% verso or recto page whether the the different species of endnote for the poem on +% that page has appeared before. On rare occasions this turns out not to be frequently +% enough in cases +% where you are defining your own kinds of endnote. +% In this case, the following hack, |\keeptitlesstraight|, will check whether the verso or recto +% poem has set that species of note each time it is issued. Suppose, for instance, +% going back to our Wordsworth example, +% that you have defined, using |\definenewnotetype|, the following six +% kinds of endnotes: |\fivetextnote| |\fiveemendation|, |\fiveexplanatory|, +% |\fiftytextnote|, |\fiftyemendation|, and |\fiftyexplanatory|. You should +% define a new command called |\keeptitlesstraight| to keep track of these six +% kinds of note. Here is how it might look: +% +% \medskip +% +% \noindent|\newcommand{\keeptitlesstraight}{|\\ +% |\pretocmd{\fivetextnote}{\versotitleinnotescheck}{\relax}{\relax}| +% |\pretocmd{\fiveemendation}{\versotitleinnotescheck}{\relax}{\relax}| +% |\pretocmd{\fiveexplanatory}{\versotitleinnotescheck}{\relax}{\relax}| +% |\pretocmd{\fiftytextnote}{\rectotitleinnotescheck}{\relax}{\relax}| +% |\pretocmd{\fiftyemendation}{\rectotitleinnotescheck}{\relax}{\relax}| +% |\pretocmd{\fiftyexplanatory}{\rectotitleinnotescheck}{\relax}{\relax}| +% |}| +% +% \medskip +% +% All those fields filled with |\relax| are for reporting the success or failure +% |\pretocmd| has had in appending |\versotitleinnotescheck| (or |\rectotitleinnotescheck|) +% to the different endnotes commands. You may wish to replace +% the |\relax| with something like |\typeout{fiftytextnote modified}| or +% |\typeout{fiftytextnote not modified}|. +% +%If you are using the |\keeptitlestraight| +% hack described here, you should add \textsf{etoolbox} +% to your package list. +% +% \DescribeMacro{\resettitleinnotes} +% If you are defining new kinds of note, and a section of +% non-parallel texts follow a section of parallel texts, you +% will need to issue the following hack after the parallel texts close +% (again I am using the Wordsworth example):\\ +% |\newcommand{\resettitleinnotes}{|\\ +% |\nofiveemendationyettrue%|\\ +% |\nofiveexplanatoryyettrue%|\\ +% |\nofivetextnoteyettrue%|\\ +% |\nofiftyemendationyettrue%|\\ +% |\nofiftyexplanatoryyettrue%|\\ +% |\nofiftytextnoteyettrue%|\\ +% |}| +% +% \subsection{~Parallel texts and generic note types} +% \DescribeMacro{\rectotexnote} +% \DescribeMacro{\rectoemendation} +% \DescribeMacro{\rectoexplanatory} +% \DescribeMacro{\versotexnote} +% \DescribeMacro{\versoemendation} +% \DescribeMacro{\versoexplanatory} +% In case you find using these hacks a bit burdensome, +% I have defined for your convenience six generic kinds of endnote for use in parallel text +% editions: |\rectotextnote|, |\rectoeemendation|, |\rectoexplanatory|, +% |\versotextnote|, |\versoemendation|, and |\versoexplanatory,| as well as |\rectoprosetexnote|, +% |\versoprosetextnote,| |\rectoproseemendation,| |\versoproseemendation|, +% |\rectoproseexplanatory|, and |\versoproseexplanatory.| (I have also defined +% |\literalrectotextnote|, |\literalversotextnote|, |\literalrectoemendation|, |\literalversoemendation|, +% |\literalrectoexplain|, and |\literalversoexplain| for sending material other than formal +% endnotes to these endnote sections. +% You can use all of these without issuing the moral equivalent of |\keeptitlesstraight| and +% |\resettitleinnotes|. +% +% \DescribeMacro{\makerectotexnotes} +% \DescribeMacro{\makerectoemendations} +% \DescribeMacro{\makerectoexplanatorynotes} +%To use these +% kinds of note, issue |\makeversotextnotes|, |\makeversoemendations|, +% |\makeversoexplanatorynotes| or their recto equivalents in your preamble. You can mark +% up your texts with these notes +% just as you would do with |\textnote|, |\emendation| or |\explanatory| (or |\literalversotextnote| +% |\literalversoemendation| and |\literalversoexplain|), without any of the special hacks +% I have just described. +% +% \DescribeMacro{\changerectotextnotesname} +% \DescribeMacro{\changerectotextnotesheader} +% \DescribeMacro{\rectotextnotessinglepar} +% \DescribeMacro{\rectotextnotestwocol} +% I have given the endnotes sections generated by these notes rather +% generic names (|\rectotextnote| and |\versotextnote| for instance, both open endnote sections +% with the title TEXTUAL NOTES, with a running header of the form ``Textual Notes to pp.~xx--yy'' +% an a contents entry of Textual Notes). You will probably need to change +% those to something more descriptive. You can change any of these with +% |\changeversotextnotesname{Your Title}|, |\changeversotextnotesheader{Your running header}|, +% and |\changeversotextnotescontentsname{Your contents entry}|. +% You can change the appearance of these notes +% by changing the values of the booleans |\versotextnotessinglepar| and |\versotextnotestwocol|. +% Similar sets of commands are available for |\versoemendation| and |\versoexplanatory| +% and their recto equivalents. +% +% \DescribeMacro{\putrectotextnotes} +% To include these note sections in your document, issue |\putversotextnotes|, |\putrectotextnotes|, +% |\putversoemendations|, |\putrectoemendations|, |\putversoexplanatorynotes|, or +% |\putrectoexplanatorynotes| at the point where you wish them to appear. These commands +% behave exactly like |\puttextnotes|. +% +% \subsection{~Parallel text labels} +% \DescribeMacro{\synchrolabel} \DescribeMacro{\synchroref} +% \DescribeMacro{\setsynchroflag} You may want to mark cross references +% to make it clear to the reader which line of the poem on the recto side +% of the spread corresponds to a particular line on the verso side. +% To mark these cross references, you +% need to make a label on the verso side (using |\syncrolabel|), and a corresponding +% reference on the recto side (using |\synchroref|). You may also wish to add a mark to +% that reference (using |\setsynchroflag|) to specify to the reader what edition it refers to. So, for +% instance, if your verso text is the 1805 version of Wordsworth's +% \emph{The Prelude}, and your recto text is the 1850 version, you may +% wish to specify |\setsynchroflag{1805: }|, which will preface the +% references put out by the |\synchroref| command with~`1805:~'. +% Suppose you wished to tie these corresponding passages from the ``Boy of Winander'' +% episode in Book 3. To make the label, issue the +% |\synchrolabel| command on the verso side (the 1805 side) just after the +% |\verseline| or |\end{stanza}| which closes the line you wish to +% label: +% +% \begin{verbatim} +%This boy was taken from his mates, and died \verseline +%In childhood ere he was full ten years old \verseline +% \synchrolabel{full ten years old} +% \end{verbatim} +% You don't have to quote the whole line in the label, but it should be +% long enough to uniquely pick out that line in the poem. (If the line +% is repeated in the poem, you will have to exercise your ingenuity in +% making up a unique label.) +% +% Over on the recto side (the 1850 side), you will want to use |\synchroref| in order +% to print the marginal cross reference. The |\synchroref| command +% should come \emph{before} the |\verseline| that closes the line it is +% tied to, as follows: +% +% \begin{verbatim} +%This Boy was taken from his mates, and died\verseline +%In childhood, ere he was full twelve years old. +% \synchroref{full ten years old}}\verseline +% \end{verbatim} +% +% \subsection{~Parallel prose passages} +% \DescribeMacro{parallelprose} +% \DescribeMacro{\startparalleltextprose} +% \DescribeMacro{\finishparalleltextprose} +% \textsf{poemscol} is not designed to manage long parallel texts in prose, +% but for shorter texts up to a couple of dozen pages, such as +% two versions of an Author's Preface, say, \textsf{poemscol} has the |parallelprose| +% environment. (You can also use |\startparalleltextprose| and |\finishparalleltextprose|.) +% Like passages of parallel text in verse, parallel prose passages must start +% on a verso page. +% +% \DescribeMacro{\startversoprosepage} +% \DescribeMacro{\finishversoprosepage} +% \DescribeMacro{\startrectoprosepage} +% \DescribeMacro{\finishrectoprosepage} +% Each verso page must start with |\startversoprosepage| and finish with +% |\finishversoprosepage|, and each recto page must start with |\startrectoprosepage| +% and finish with |\finishrectoprosepage|. If a page continues a paragraph from the previous +% page, say, from a previous recto page, put the beginning of the +% text on the second page right after the |\startrectopage| command with +% no blank line. (Alternatively, you could just +% begin that page with |\noindent|.) +% +% \DescribeMacro{\parastart} +% \DescribeMacro{\paraend} +% You must mark the beginning and end of every paragraph in parallel prose passages +% with |\parastart| and |\paraend|. +% +% You will have to pick the page breaks manually, using |\newpage|, once you find where +% \LaTeX\ would naturally break the page. Because how \LaTeX\ justifies text is a little +% unpredictable, however, you may find that the line before the page break, which filled +% the line before you added the page break, is actually a little shorter, and thus is +% no longer justified, once you add the page break. You may well not be able to exactly +% fill out the line by trial and error, adding a word or even just a syllable, to the line at a time. +% You can kludge around the problem, however, by adding +% an |\hfil| between each word of the last line. +% +% \section{Using \textsf{poemscol} in a multilingual world} +% +% \begin{sloppypar} +% \DescribeMacro{\changecontentsname} +% By default, \textsf{poemscol} uses English language titles for such +% things as the Table of Contents, the Explanatory Notes, and so on, +% and uses English language running headers. As of version 2.5 these +% are easily changed. To change the name of the Table of Contents +% (the default is CONTENTS) to Inhaltsverzeichnis, issue +% |\changecontentsname{Inhaltsverzeichnis}|. To change the running +% header on contents pages, issue +% |\changecontentsheader{your header}|.\end{sloppypar} +% +% \begin{sloppypar} +% \DescribeMacro{\changenotesname} To change the name for the endnote +% section for textual notes (the default is TEXTUAL NOTES), issue +% |\changenotesname{your version}|. To change the running header (by +% default ``Textual Notes to'') issue +% |\changenotesheader{your version}|. +% To change the name for +% the textual notes in the table of contents issue +% |\changetextnotescontentsname{your version}|. +% +% \DescribeMacro{\changesinglepageabbrev} +% \DescribeMacro{\changemultiplepageabbrev} +% Running headers refer to single pages with the English +% abbreviation ``p.'' and to multiple pages with the English +% abbreviation ``pp.'' To change these issue +% |\changesinglepageabbrev{new abbrev}| or +% |\changemultiplepageabbrev{new abbrev}| respectively. The ultimate +% outcome is to translate a header of the form ``Textual Notes to +% pp.~xx-yy'' to the form appropriate for your language.\end{sloppypar} +% +% \begin{sloppypar} +% \DescribeMacro{\changeemendationsname} To change the name for the endnote +% section for emendations (the default is EMENDATIONS), issue +% |\changeemendationsname{your version}|. To change the running header (by +% default ``Emendations to'') issue +% |\changeemendationsheader{your version}|. To change the name for +% the emendations in the table of contents issue +% |\changeemendationscontentsname{your version}.|\end{sloppypar} +% +%\begin{sloppypar} +% \DescribeMacro{\changeexplanationsname} To change the name for the endnote +% section for explanatory notes (the default is EXPLANATORY NOTES), issue +% |\changeexplanationsname{your version}|. To change the running header (by +% default ``Explanatory Notes to'') issue +% |\changeexplanationsheader{your version}|. +% To change the name for +% the explanatory notes in the table of contents issue +% |\changeexplanationscontentsname{your version}|.\end{sloppypar} +% +% \begin{sloppypar} \DescribeMacro{\changepoemindexname} To change the name +% for the index (the default is ``Index of Titles and First Lines'', issue +% |\changepoemindexname{your version}|. To change the running +% header (the default is ``Index of Titles and First Lines'') issue +% |\changepoemindexheader{your version}|. To change the contents +% entry for the index (the default is ``Index of Titles and First Lines'') +% issue +% |\changepoemindexcontentsname{your version}|.\end{sloppypar} +% +%\section{A sample driver file} +% +% If you are compiling a collected poems, you are probably preparing +% your volume from many files. You may (or may not) wish to subdivide +% your edition by the original volumes. Or you may subdivide by year, +% or by the significant phases of the poet's career. One way to keep +% in control of the process is to create a driver file, which calls +% all the appropriate\ .sty files and sets the variables globally, and +% then read in the sections of the edition using |\input|. Here is a +% version of the driver file I used for +% \emph{The Collected Poems of Robert Penn Warren}: +% \begin{verbatim} +% \documentclass[10pt,twoside]{article} +% \usepackage{fancyhdr,kdgreek,makeidx,times,multicol,geometry,} +% \usepackage{keyval,ifthen,mparhack,manyfoot,poemscol} +% \begin{document} +% \leftheader{The Collected Poems of Robert Penn Warren} +% \makeexplanatorynotes +% \makeemendations +% \maketextnotes +% \makepoemcontents +% \makeverselinenumbers +% \global\indexingontrue +% \global\includeaccidentalstrue +% \global\includetypescriptstrue +% \input maintitle.tex +% \input poems1922_1943.tex +% \input thirtysix.tex +% \input eleven.tex +% \input sp43.tex +% \input promises1.tex +% \input promises2.tex +% \input promises3.tex +% \input yeo1.tex +% \input yeo2.tex +% \input yeo3.tex +% \input tale1.tex +% \input tale2.tex +% \input incarnations.tex +% \input audubon.tex +% \input orelse1.tex +% \input orelse2.tex +% \input arcturus.tex +% \input nowthen.tex +% \input beinghere.tex +% \input rumor1.tex +% \input rumor2.tex +% \input cj1.tex +% \input cj2.tex +% \input altitudes.tex +% \input poems1943_1989.tex +% \input introduction.tex +% \finish +% \end{verbatim} +% +% \section{A sample poem markup} +% Here is a poem Robert Penn Warren wrote in his first volume, +% \emph{Thirty-Six Poems} (1935). The poem is the first poem of his +% sequence ``Kentucky Mountain Farm.'' I include the over-title, to +% demonstrate how to mark up such cases. +% \begin{verbatim} +% \sequencetitle{Kentucky Mountain Farm} +% \index{Kentucky Mountain Farm@{\em Kentucky Mountain Farm\/}} +% \sources{Text: TSP. Variants: SP43, SP66 (Deletes ``The Cardinal,'' ``The +% Jay,'' and ``Watershed''), SP75 (Same sections as SP66), SP85 (Restores +% ``Watershed''), {\em Helsinki\/} (includes only ``Rebuke of +% the Rocks'' and +% ``At the Hour of the Breaking of the Rocks''). +% ``The Owl'' (above) was marked as a section of ``Kentucky +% Mountain Farm'' when it first appeared in {\em Poetry,\/} but it was never +% included in any book version of the entire sequence. The sequence in {\em +% Poetry\/} included, in this order, ``The Owl,'' ``The Cardinal,'' and +% ``Watershed.'' TSP uses lower case Roman numerals in the section +% titles. The typescript drafts in the Beinecke Library do not seem to +% be setting copies.} +% \sequencefirstsectiontitle{I. Rebuke of the Rocks} +% \index{Rebuke of the Rocks@{\em Rebuke of the Rocks\/}} +% \sources{Text: TSP. Variants: {\em Nation\/}, 11 Jan.\ 1928, +% p.~47, {\em Literary +% Digest,\/} 28 Jan.\ 1928, p.~32, {\em Vanderbilt Masquerader,\/} 10 +% (Dec.\ 1933), p.~16, SP43, SP66, SP75, SP85, {\em Helsinki\/}, +% Broadside: The Press at Colorado College, printed on paper handmade by +% Thomas Leech for the American Poetry Society, April~26, 1985. This +% poem was not included in SP85 until the second set of galleys, in +% which a photocopy of the SP75 text is a stapled insert.} +% \begin{poem} +% \begin{stanza} +% Now on you is the hungry equinox,\verseline +% \index{Now on you is the hungry equinox} +% O little stubborn people of the hill,\verseline +% \accidental{hill,] \sameword--- {\em Nation,\/} {\em Literary Digest\/} +% \sameword, {\em Vanderbilt\/} (I include the reading +% from {\em Vanderbilt\/} +% even though it is the same as in TSP, because +% {\em Vanderbilt\/} was published +% after the other magazine versions but before TSP.)} +% The season of the obscene moon whose pull\verseline +% Disturbs the sod, the rabbit, the lank fox,\verseline +% Moving the waters, the boar's dull blood,\verseline +% And the acrid sap of the ironwood.\end{stanza} +% +% \begin{stanza} +% But breed no tender thing among the rocks.\verseline +% Rocks are too old under the mad moon,\verseline +% \accidental{old\missingpunct] \sameword, {\em Vanderbilt\/}} +% Renouncing passion by the strength that locks\verseline +% The eternal agony of fire in stone.\end{stanza} +% +% \begin{stanza} +% Then quit yourselves as stone and cease\verseline +% \accidental{stone\missingpunct] \sameword, {\em Vanderbilt\/}} +% To break the weary stubble-field for seed;\verseline +% Let not the naked cattle bear increase,\verseline +% Let barley wither and the bright milkweed.\verseline +% \accidental{milkweed.] milk-weed. {\em Vanderbilt\/}} +% Instruct the heart, lean men, of a rocky place\verseline +% That even the little flesh and fevered bone\verseline +% May keep the sweet sterility of stone.\end{stanza} +% \end{poem} +% \end{verbatim} + +% \goodbreak +% \section{A sample divider page} +% \begin{verbatim} +% \begin{volumetitlepage} +% +% \volumetitle{Being Here} +% \volumeheader{Being Here} +% \volumesubtitle{Poetry 1977--1980} +% \volumededication{To Gabriel Thomas Penn\\ +% (1836--1920)} +% \bigskip +% +% \volumeepigraph{OLD MAN: You get old and you can't do anybody +% any good any more.\\ +% BOY: You do me some good, Grandpa. You +% tell me things.} +% +% +% \bigskip +% +% \volumeepigraph{There is in short no absolute time standard.} +% \volumeattribution{{\em Van Nostrand's Scientific Encyclopedia,\/}\\ +% Fifth Edition, p. 2203} +% +% \bigskip +% +% +% \volumeepigraph{I thirst to know the power and nature of Time\ldots.} +% \volumeattribution{St.\ Augustine: {\em Confessions,\/}\\ +% Book {\em XI,\/} Chapter {\em XXIII\/}\\ +% Translated by Albert C. Outler} +% +% +% \bigskip +% +% \volumeepigraph{Time is the dimension in which God +% strives to define His own Being.} +% +% \sources{The typescript material in the Beinecke Library +% indicates that this +% book went through many drafts, and some rethinking about what to +% include and how to order the poems. Until a late stage of +% production---very late, since the typescript includes a designed +% mock-up of the proposed title page---the title of this volume was {\em +% Life is a Fable.\/} Indeed, as late as the time the book was set in +% galleys it was called {\em Life is a Fable\/}, although the title was +% corrected on the galleys. Like {\em Now and Then\/}, the typescript +% was assembled from photocopies of re-typed copies of poems made after +% their magazine appearance, with annotations giving the name of the +% magazine in which they occurred. Unlike {\em Now and Then\/}, the +% typescript seems to have been typed in one piece, and the annotations +% added for the convenience of the permissions department at +% Random House. The page numbers have been added---presumably +% later---in blue pen. The copy is marked up in Warren's hand in black +% pencil, and in another hand in red pencil. (Unless marked otherwise, +% all of the mark-up described here is in black pencil.) \tsentry{Like most +% Warren typescripts BHTS is single-spaced. The dedication to Gabriel +% Thomas Penn and the dialogue between the old man and the boy appeared +% on a separate page, and the three epigraphs appeared on another +% separate page. BHTS gives 1838 as the year of Gabriel +% Thomas Penn's +% birth (the error is corrected on the galleys). In the quotation from +% Augustine, the second word is corrected to ``thirst'' from ``yearn,'' +% and the translator's name is added in pencil, not in Warren's +% handwriting.} In one of Warren's own +% copies at Western Kentucky University, he has corrected the date of +% Gabriel Thomas Penn's birth to 1837 (copy 310). Some revisions in this book +% may have come very late +% indeed. A letter to Erskine of January 28, 1980, refers to changes +% made in a bound manuscript that Warren kept after returning the +% copy-edited typescripts. There are revisions not only on the galleys, +% but also on the page proofs. There are even some corrections on the +% ``blues'' for this volume, including some new copy on a card referred +% to in a note on the cover of the ``blues'' but now lost. The Secker +% and Warburg London edition is, except for the title page, printed from +% the American plates. There is a copy of this book, marked up by +% Warren with +% proposed revisions for Stuart Wright's use on May 25, 1987, in the +% Special Collections +% Department of the Emory University Library. I quote Warren's +% notes by permission. +% Warren has also marked up, slightly, a copy of this book now in the +% Robert Penn Warren Room of the Library of the Kentucky Museum at +% Western Kentucky University. I quote that volume too by permission. +% The setting typescript for the section of SP85 drawn from this volume +% consisted of taped-in photocopies of passages from BH. Because the +% revisions for SP85 are sometimes a vexed question, I have indicated +% where the SP85 revisions are made on SP85TS.} +% +% +% \sources{Title Page] SP85 omits the dialogue between the old man and +% the young boy. SP85 capitalizes ``time standard'' in the quotation +% from Van Nostrand's Scientific Encyclopedia, and does not capitalize +% ``Time'' in the quotation from Augustine.} +% +% +% +% \end{volumetitlepage} +% \end{verbatim} +% +% +% +% +% \StopEventually{\PrintChanges\PrintIndex} +% \section{Implementation}\label{implementation} +% \subsection{~Page geometry and crop marks} + + +% \begin{macro}{\tightgeometry} There's no reason why you should use the +% page geometry I used in \emph{The Collected Poems of Robert Penn Warren}, +% and there are many reasons not to. But I include it just to show what is possible. +% If you issue |\tightgeometry| in your +% preamble, you will have the geometry I have used. If you issue +% |\tightleading| you will +% redefine |\normalsize| and |\small| to use tighter leading. +% Normal +% 10 point \LaTeX\ uses 12 point leading. Strictly to save money, I +% redefined |\normalsize| to use 11 point leading. +% I use the \textsf{geometry} package, +% since it's simpler to figure out. I give my page geometry here +% chiefly to remind the reader of some important variables that should +% be kept track of, such as marginparsep, which controls the +% separation of the marginal line numbers from the verse line, +% marginparwidth, which controls how wide the block for the marginal +% line numbers will be, headsep, which controls how far the text will +% be from the running headers, and footskip, which controls how far +% the last verse line will be from the marker which tells the reader +% that there is a stanza break at the end of the page (if there is +% one). I've also set the odd side margin and the even side margin +% for two-sided printing. Finally, I have set the default handling +% of page endings to |\raggedbottom|. Verse should always be set with +% a ragged bottom margin, otherwise \LaTeX\ will stretch the spaces +% between stanzas to make the bottom perfectly flush. When you enter +% prose sections, such as the editor's introduction, you should enter +% the command |\flushbottom| to make sure that the prose sections have +% flush page bottoms. +% \begin{macrocode} + \newcommand{\tightgeometry}{\geometry{verbose, tmargin= 33pt, + textwidth=318.21pt,textheight=550pt, + marginparsep=7pt,marginparwidth=10pt, + headheight= 15pt, + headsep=19pt, + footskip=15pt, + lmargin=132pt} +\setlength{\oddsidemargin}{60pt} +\setlength{\evensidemargin}{65.41pt}} +\newcommand{\tightleading}{% +\makeatletter +\renewcommand\normalsize{% + \@setfontsize\normalsize\@xpt\@xipt + \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +\makeatother +\normalsize +\makeatletter +\renewcommand\small{% + \@setfontsize\small\@ixpt{10}% + \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus2\p@ + \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \topsep 4\p@ \@plus2\p@ \@minus2\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip +} +\makeatother} + + +% \end{macrocode} +% \end{macro} +% + +% \subsubsection{Internal font size commands} You will probably never need +% to use these font commands explicitly. I defined these for internal +% use within \textsf{poemscol}, so that a command will always call the +% same fonts. \label{internal font size commands} +% +% As a way of making global changes to repeated features I have +% defined various special fonts for special purposes. For instance, +% in a Collected Poems in which the poems are arranged by volume, with +% divider pages for the beginning of each volume, the first command +% sets the font for the volume title on the divider page, using the +% default font family, setting it in 18 point type on 23 point +% leading. The second command, as the name of the command indicates, +% sets the font for the subtitle of the volume to be 14 point type on +% 18 point leading. You can change these either by changing the +% values in your (renamed) style file, or by using |\renewcommand|. +% For instance, you can change the font parameters for the font for +% setting poem titles from 14 on 18 to 12 on 14 by issuing +% |\renewcommand{\poemtitlefont}{\fontsize{12}{14}\selectfont}| in +% your preamble. Notice that there are special fonts for titles in +% the back matter and in the table of contents as well. + +% \begin{macrocode} +\newcommand{\volumetitlefont}{\fontsize{18}{23}\selectfont} +\newcommand{\volumesubtitlefont}{\fontsize{14}{18}\selectfont} +\newcommand{\poemtitlefont}{\fontsize{14}{18}\selectfont} +\newcommand{\sequencetitlefont}{\fontsize{16}{20}\selectfont} +\newcommand{\subsectiontitlefont}{\fontsize{12}{14.5}\selectfont} +\newcommand{\backmatterheaderfont}{\fontsize{16}{20}\selectfont} +\newcommand{\volumetitlesink}{\leavevmode\vspace{23.5pt}} +\newcommand{\backmattersink}{\leavevmode\vspace{21.5pt}} +\newcommand{\backmatterafterheadersink}{\leavevmode\vspace{11pt}} +\newcommand{\backmattertextfont}{\small} +\newcommand{\backmatterintrofont}{\normalsize} +\newcommand{\backmattervolumefont}{\fontsize{12}{14.5}\selectfont} +\newcommand{\backmattervolumesubtitlefont}{\fontsize{11}{13}\selectfont} +\newcommand{\contentsvolumefont}{\fontsize{14}{20}\selectfont} +\newcommand{\contentsvolumesubtitlefont}{\fontsize{12}{14.5}\selectfont} +\newcommand{\contentssequencetitlefont}{\fontsize{10}{14}\selectfont} +\newcommand{\contentspoemtitlefont}{\fontsize{10}{14}\selectfont} +% \end{macrocode} + +% \subsection{~Miscellaneous dimensions and constants} +% \textsf{poemscol} sets relatively large penalties for widows and +% clubs, both in the main text, and in the notes sections. There are +% also special penalties after volume titles in the notes sections, +% since one does not want to leave a volume title in the notes +% sections stranded at the bottom of a page. (Setting penalties may +% not automatically solve all the problems, however. You can fix an +% intractable widow problem in the contents or in the notes sections +% by issuing |\literalcontents{\pagebreak}| or +% |\literalemend{\pagebreak}| just before you issue the +% |\poemtitle| or |\volumetitle| that resulted in the problematic +% title line.) \textsf{poemscol} also manipulates penalties for places like +% the space between a poem's title and its first line. It defines +% special values for the white space before and after poems and for +% the amount of a stanza break. |\contentsindentone|, +% |\contentsindenttwo|, and so on are amounts to indent different +% hierarchical levels, say of poetic sequences and subsequences, in +% the table of contents. +% \begin{macrocode} +\widowpenalty=300 +\clubpenalty=300 +\newcommand{\notespoemclubpenalty}{\penalty-300} +\newcommand{\notessequenceclubpenalty}{\penalty-1500} +\newcommand{\notesvolumetitlepenalty}{\penalty-1500} +% \end{macrocode} +% Since the right margin of verse is ragged anyway, I allowed some +% flexibility for slightly longer lines. +% \begin{macrocode} +\hfuzz=2pt +% \end{macrocode} +% For explicitly declared indented lines or ranges of lines: +% \begin{macrocode} +\newlength{\verseindentamount} +\setlength{\verseindentamount}{2em} +\newcount\l@@pcounter +\newcommand{\repeatedindent}[1]{\l@@pcounter=#1% +\loop% +\ifnum\l@@pcounter>0% +\hspace{\verseindentamount}% +\advance \l@@pcounter -1 +\repeat} +\newcommand{\verseindent}[1][]{% +\ifthenelse{\equal{#1}{}}{\hspace{\verseindentamount}}{\repeatedindent{#1}}} +%\newcommand{\verseindent}{\hspace{\verseindentamount}} %old version +\newlength{\indentedstanzaamount} +\setlength{\indentedstanzaamount}{\verseindentamount} +\newlength{\variablestanzaamount} +\setlength{\variablestanzaamount}{\indentedstanzaamount} +\newcommand{\adjustst@nzaindent}[1]{\l@@pcounter=#1% +\loop% + \addtolength{\variablestanzaamount}{\indentedstanzaamount}% + \advance \l@@pcounter -1% +\ifnum \l@@pcounter>0 +\repeat} +\newif\ifinindentedverse +\newenvironment{indentedverse}[1][]{% +\inindentedversetrue% +\ifthenelse{\equal{#1}{}}{\relax}{\adjustst@nzaindent{#1}}% +\let\\=\@centercr% +\list{}{\itemsep\z@ \itemindent -\runoverindentvalue\listparindent \itemindent +\rightmargin 0sp\leftmargin 0sp\advance\leftmargin +\variablestanzaamount}\item[]} +{\endlist\inindentedversefalse\setlength{\variablestanzaamount}{\indentedstanzaamount}} +% \end{macrocode} +% For multicolumn notes: +% \begin{macrocode} +\setlength{\columnsep}{15pt} +% \end{macrocode} +% A hierarchy of indentations for sequence section titles and +% subsection titles. +% \begin{macrocode} +\newdimen\titleindentamount \titleindentamount=1pc +\newdimen\titleindenttwoamount \titleindenttwoamount=2pc +\newdimen\titleindentthreeamount \titleindentthreeamount=3pc +\newcommand{\titleindent}{\hspace{\titleindentamount}} +\setlength{\parindent}{\titleindentamount} +% \end{macrocode} +% White space after poem titles, after poems, and after sequence +% titles. \label{skiplist} +% \begin{macrocode} +\newcommand{\afterpoemtitleskip}{\smallskip} +\newcommand{\afterpoemskip}{\bigskip} +\newcommand{\aftersequencetitleskip}{\medskip} +% \end{macrocode} +% A little extra white space between stanzas. +% \begin{macrocode} +\newcommand{\stanzaskip}{\medskip} +% \end{macrocode} +% A hierarchy of indentations for the table of contents: \label{contents indentation hierarchy} +% \begin{macrocode} +\newdimen\volumetitleshiftamount \volumetitleshiftamount=1pc +\newcommand{\volumetitleshift}{\hbox{\hspace{\volumetitleshiftamount}}} +\newdimen\voladditionalamount \voladditionalamount=2pc +\newdimen\contentsindentoneamount \contentsindentoneamount=24pt +\newcommand{\contentsindentone}{\hspace{\contentsindentoneamount}} +\newdimen\contentsindenttwoamount \contentsindenttwoamount=42pt +\newcommand{\contentsindenttwo}{\hspace{\contentsindenttwoamount}} +\newdimen\contentsindentthreeamount \contentsindentthreeamount=60pt +\newcommand{\contentsindentthree}{\hspace{\contentsindentthreeamount}} +\newdimen\contentsindentfouramount \contentsindentfouramount=72pt +\newcommand{\contentsindentfour}{\hspace{\contentsindentfouramount}} +\newdimen\contentsindentfiveamount \contentsindentfiveamount=80pt +\newcommand{\contentsindentfive}{\hspace{\contentsindentfiveamount}} +% \end{macrocode} +% Penalties to encourage page breaks before poem titles, before +% multi-line poem titles, and before sequence titles. +% \begin{macrocode} +\newcommand{\poemtitlepenalty}{\penalty-1000} +\newcommand{\multilinetitlepenalty}{\penalty-3000} +\newcommand{\sequencetitlepenalty}{\penalty-3000} +\newcommand{\multilinesequencepenalty}{\penalty-3500} +% \end{macrocode} + +% \subsection{~Verse} The verse environment here is taken from \LaTeX, +% slightly modified to indent run over lines more. The idea is to +% distinguish the automatic indentation of run over lines from the +% explicitly declared indentation of indented lines. You can change +% the amount of indentation of runover lines with |\runoverindent|. +% \label{versedefine} +% \begin{macrocode} +\def\makeatletter{\catcode`\@=11} +\def\makeatother{\catcode`\@=12 } +\newcommand{\runoverindent}[1]{\global\edef\runoverindentvalue{#1} +} +\runoverindent{6em} +% pmclverse (runover indented more than it is in the normal verse +% environment) +% \newenvironment{pmclverse}{% +% \let\\=\@centercr% +% \list{}{\itemsep\z@ \itemindent -\runoverindentvalue\listparindent \itemindent +% \rightmargin 1sp\leftmargin 1sp\advance\leftmargin +% \runoverindentvalue}\item[]} +% {\endlist} +\newif\iflinenumberscenteredwithverse +\linenumberscenteredwithversetrue +% +\newlength{\marginparsepmin} +\setlength{\marginparsepmin}{2em} +% +\newlength{\versemarginadjust} +\setlength{\versemarginadjust}{0pt} +% +\newif\iftextcenteringturnedon +\textcenteringturnedontrue +% +\newcommand{\v@riablemarginpar}{\setlength{\marginparsep}{-\leftmargin}% +\addtolength{\marginparsep}{\marginparsepmin}} +% +\newcommand{\c@nterverseblock}[1]{\rightmargin \z@% + \setlength{\leftmargin}{\linewidth}% + \addtolength{\leftmargin}{-#1}% + \addtolength{\leftmargin}{-0.5\leftmargin}% + \iflinenumberscenteredwithverse\v@riablemarginpar\fi} +\newif\iflastpoemcentered +\newenvironment{pmclverse}[1][\linewidth]{% +\global\lastpoemcenteredfalse +\let\\=\@centercr% +\list{}{\itemsep\z@ +\itemindent -\runoverindentvalue +\listparindent \itemindent + \ifdim #1 < \linewidth + \iftextcenteringturnedon + \c@nterverseblock{#1}% + \global\lastpoemcenteredtrue + \else + \rightmargin \leftmargin + \addtolength{\leftmargin}{-\versemarginadjust}\fi + \else + \rightmargin \leftmargin + \addtolength{\leftmargin}{-\versemarginadjust} + \fi +\advance\leftmargin\runoverindentvalue} +\item[]} +{\endlist} +% next is from 2.88 +%\newenvironment{pmclverse}[1][\linewidth]{% +%\let\\=\@centercr% +%\list{}{\itemsep\z@ +%\itemindent -\runoverindentvalue +%\listparindent \itemindent +% \ifdim #1 < \linewidth +% \iftextcenteringturnedon +% \c@nterverseblock{#1}% +% \else +% \rightmargin \leftmargin +% \addtolength{\leftmargin}{-\versemarginadjust}\fi +% \else +% \rightmargin \leftmargin +% \addtolength{\leftmargin}{-\versemarginadjust} +% \fi +%\advance\leftmargin\runoverindentvalue} +%\item[]} +%{\endlist}% from 2.72 with additions +% \newenvironment{pmclverse}[1][\linewidth]{% +% \let\\=\@centercr% +% \list{}{\itemsep\z@ +% \itemindent -\runoverindentvalue +% \listparindent \itemindent +% \ifdim #1 < \linewidth +% \rightmargin \z@ +% \setlength{\leftmargin}{\linewidth}% +% \addtolength{\leftmargin}{-#1}% +% \addtolength{\leftmargin}{-0.5\leftmargin}% +% \iflinenumberscenteredwithverse +% \setlength{\marginparsep}{-\leftmargin+\marginparsepmin} +% \fi +% \else +% \rightmargin \leftmargin +% \addtolength{\leftmargin}{-\versemarginadjust} +% \fi +% \advance\leftmargin\runoverindentvalue} +% \item[]} +% {\endlist\setlength{\marginparsep}{0pt}} % from email + +% \newenvironment{pmclverse}[1][\linewidth]{% +% \let\\=\@centercr% +% \list{}{\itemsep\z@ +% \itemindent -\runoverindentvalue +% \listparindent \itemindent +% \iftextcenteringturnedon +% \ifdim #1 < \linewidth +% \rightmargin \z@ +% \setlength{\leftmargin}{\linewidth}% +% \addtolength{\leftmargin}{-#1}% +% \addtolength{\leftmargin}{-0.5\leftmargin}% +% \iflinenumberscenteredwithverse\setlength{\marginparsep}{-\leftmargin+\marginparsepmin}\fi +% \else +% \rightmargin \leftmargin +% \addtolength{\leftmargin}{-\versemarginadjust} +% \fi % linewidth +% \else +% \rightmargin \leftmargin +% \addtolength{\leftmargin}{-\versemarginadjust} +% +% \fi% textcentering +% \advance\leftmargin\runoverindentvalue} +% \item[]} +% {\endlist\setlength{\marginparsep}{0pt}}% % draft + +% \let\\=\@centercr% +% \list{}{\itemsep\z@ +% \itemindent -\runoverindentvalue +% \listparindent \itemindent +% \ifdim #1 < \linewidth +% \rightmargin \z@ +% \setlength{\leftmargin}{\linewidth}% +% \addtolength{\leftmargin}{-#1}% +% \addtolength{\leftmargin}{-0.5\leftmargin}% +% \else +% \rightmargin \leftmargin +% \addtolength{\leftmargin}{-\versemarginadjust} +% \fi +% \advance\leftmargin\runoverindentvalue} +% \item[]} +% {\endlist} % first version from 2.81 +% \newenvironment{pmclverse}[1][\linewidth]{% +% \let\\=\@centercr% +% \list{}{\itemsep\z@ +% \itemindent -\runoverindentvalue +% \listparindent \itemindent +% \ifdim #1 < \linewidth +% \rightmargin \z@ +% \setlength{\leftmargin}{\linewidth}% +% \addtolength{\leftmargin}{-#1}% +% \addtolength{\leftmargin}{-0.5\leftmargin}% +% \else +% \rightmargin \leftmargin +% \fi +% \advance\leftmargin\runoverindentvalue} +% \item[]} +% {\endlist}% from 2.72 +\newif\ifinquotedverse + \newenvironment{quotedverse}{% + \inquotedversetrue + \let\\=\@centercr% + \list{}{\itemsep\z@ \itemindent -\runoverindentvalue\listparindent \itemindent + \rightmargin 0sp\leftmargin 0sp\advance\leftmargin + \runoverindentvalue}\item[]} + {\endlist\inquotedversefalse} +% rfoverse (flushes runover to right) (Just a placeholder now.) +% \newif\ifrfv +% \rfvfalse +% \newcommand{\rightflushrunoververse}{\global\rfvtrue} +% \newcommand{\indentrunoververse}{\global\rfvfalse} +% \newenvironment{rfoverse}{\begin{pmclverse}}{\end{pmclverse}} +% % verse environment with a switch +% \renewenvironment{verse}{\ifrfv\begin{rfoverse}\else\begin{pmclverse}\fi} +% {\ifrfv\end{rfoverse}\else\end{pmclverse}\fi} +% \end{macrocode} + +% \subsection{~Miscellaneous internal counters} +% |\verselinenumber| is the line number, obviously. |\printlineindex| +% records how many lines have passed since the last marginal line +% number was output. |\lineindexrepeat| governs how often the marginal +% line numbers appear. |\lemmalines| and |\lemmaend| are for setting +% number ranges for multiline lemmas. +% \begin{macrocode} +\newcounter{verselinenumber} +\newcounter{printlineindex} +\newcounter{verselinenumberscratch} +\newcounter{printlineindexscratch} +\newcounter{lineindexrepeat} \setcounter{lineindexrepeat}{9} +\newcounter{lemmalines} +\setcounter{lemmalines}{0} +\newcounter{lemmaend} +\setcounter{lemmaend}{0} +% \end{macrocode} +% This next counter is used to make labels for each poem for the contents and notes sections. +% \begin{macrocode} +\newcounter{poemnumber} +\setcounter{poemnumber}{1} +% \end{macrocode} +% These next two are used to set the page numbers in the running +% headers of the various notes sections, which are of the form +% ``Textual notes to pp.~xx--yy.'' +% \begin{macrocode} +\newcounter{notepageholdertitle} \setcounter{notepageholdertitle}{1} +\newcounter{notepageholdernote} \setcounter{notepageholdernote}{1} +% \end{macrocode} +% \subsection{~Miscellaneous token lists} +% Since the explanatory notes section and the emendations section should +% only open an entry for poems for which there actually are explanatory notes or +% emendations, the current are held in token lists in case they are needed.|\titlesofar| +% and |\titleincrement| are used to concatenate multi-line titles. +% \begin{macrocode} +\newtoks{\fulltitleholder} +\newtoks{\titlesofar} +\newtoks{\titleincrement} +% \end{macrocode} +% \subsection{~Miscellaneous booleans} +% Most of these have self-explanatory names. +% \begin{macrocode} +\newif\ifinstanza +\newif\ifinpoem +\newif\ifpoemcontentson +\newif\iftextnoteson +\newif\ifverselinenumbers +\newif\ifexplanon +\newif\ifemendationson + \global\verselinenumberstrue +\newif\ifindexingon +\global\indexingontrue +\ifindexingon + \makeindex +\fi +\newif\ifincludeaccidentals +\global\includeaccidentalstrue +\newif\ifincludetypescripts +\global\includetypescriptstrue +\newif\ifredundantemendations +\global\redundantemendationsfalse +\newif\ifnoemendyet +\newif\ifnoexplainyet +\global\noemendyettrue +\global\noexplainyettrue +\newif{\ifmiddlecontentsline} +\middlecontentslinefalse +\newif{\iflastcontentsline} +\lastcontentslinefalse +\newif{\ifputpagenumberincontents} +\putpagenumberincontentstrue +\newif{\ifputpagenumberinnotes} +\putpagenumberinnotestrue +\newif{\ifsinglelinetitle} +\singlelinetitletrue +\newif{\iftitlefirstline} +\titlefirstlinefalse +\newif{\iftitlemiddleline} +\titlemiddlelinefalse +\newif{\iftitlelastline} +\titlelastlinefalse +\newif{\ifverserightflush} +\verserightflushfalse +\newif\ifrangelemma +\rangelemmafalse +\newcommand{\makeverselinenumbers}{\global\verselinenumberstrue} +\let\makelinenumbers=\makeverselinenumbers% for compatibility +\newif\iftextnotesatend +\textnotesatendtrue +\newif\ifemendationsatend +\emendationsatendtrue +\newif\ifexplanatend +\explanatendtrue +\newif\iftextfootnotespara +\textfootnotesparatrue +\newif\ifsourcesfootnotespara +\sourcesfootnotesparafalse +\newif\ifemendationfootnotespara +\emendationfootnotesparatrue +\newif\ifexplanfootnotespara +\explanfootnotesparafalse +% \end{macrocode} + +% \subsection{~Defining page styles} \label{pagestyledefs} These define several special page styles. +% To use them you must have the \textsf{fancyhdr} package installed. +% First, the default running headers: the right side (|\volumeheader|) +% is the title of the volume in a multivolume edition, and the left +% (|\leftheader|) is the title of the general collection. +% \begin{macro}{\volumeheader} +% \begin{macrocode} +\newcommand{\volumeheader}[1]{\global\edef\volumeheadervalue{#1} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\leftheader} +% \begin{macrocode} +\newcommand{\leftheader}[1]{\global\edef\leftheadervalue{#1} +} +\leftheader{\relax} +\volumeheader{\relax} +\newcommand{\rightheader}[1]{\volumeheader{#1}} +% \end{macrocode} +% \end{macro} +% The default page style. Note the use of the mark mechanism to keep +% track of cases where the stanza breaks and page breaks overlap. +% \begin{macro}{\pagestyle{fancy}} +% \begin{macrocode} +\newlength{\headoffsetlength} +\setlength{\headoffsetlength}{-1sp} +%\addtolength{\headoffsetlength}{\parindent} +\raggedbottom +\pagestyle{fancy} +\fancyhead{} +\fancyfoot{} +\fancyhfoffset[RO,LE]{\headoffsetlength} +\fancyhead[RO]{{\small\textrm{\thepage}}} +\fancyhead[LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{\hfil{\small{\em \volumeheadervalue}}\hfil} +\fancyhead[CE]{\hfil{\small{\em \leftheadervalue}}\hfil} +\fancyfoot[CE]{{\small \botmark}\hfil} +\fancyfoot[CO]{\hfil{\small \botmark}} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pagestyle{main}} +% \begin{macrocode} +\fancypagestyle{main}{% +\fancyhead{} +\fancyfoot{} +\fancyhfoffset[RO,LE]{\headoffsetlength} +\fancyhead[RO]{{\small\textrm{\thepage}}} +\fancyhead[LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{\hfil{\small{\em \volumeheadervalue}}\hfil} +\fancyhead[CE]{\hfil{\small{\em \leftheadervalue}}\hfil} +\fancyfoot[CE]{{\small \botmark}\hfil} +\fancyfoot[CO]{\hfil{\small \botmark}} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +} +% \end{macrocode} +% \end{macro} +% Style for the first page of every volume in a Collected Poems. You +% don't have to call this style explicitly. It is called by the |\volumetitlepage| +% environment. But of course if you want to change the style of those +% pages, you should do it here. +% \begin{macro}{volumefirststyle} +% \begin{macrocode} +\fancypagestyle{volumefirststyle}{% +\fancyhf{} +\fancyfoot[C]{\hfil{\small \botmark}\hfil} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +} +% \end{macrocode} +% \end{macro} +% Style for plain pages. +% \begin{macro}{plain} +% \begin{macrocode} +\fancypagestyle{plain}{% +\fancyhf{} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +} +% \end{macrocode} +% \end{macro} +% Style for long poems. +% \begin{macro}{\myversemarks} +% \begin{macrocode} +\newtoks{\singlelineabbrev} +\singlelineabbrev={l.\ } +\newcommand{\changesinglelineabbrev}[1]{\singlelineabbrev={#1}} +\newtoks{\multiplelineabbrev} +\newcommand{\changemultiplelineabbrev}[1]{\multiplelineabbrev={#1}} +\multiplelineabbrev{ll.\ } +\newcommand{\myversemarks}{% + \ifthenelse{\equal{\thefirstmarks{verselinemark}}{\thebotmarks{verselinemark}}}% + {\unskip ~\the\singlelineabbrev~\thefirstmarks{verselinemark}}% if equal +{\unskip ~\the\multiplelineabbrev\thefirstmarks{verselinemark}--\thebotmarks{verselinemark}}} % if not equal +% \end{macrocode} +% \end{macro} +% \begin{macro}{longpoem} +% \begin{macrocode} +\fancypagestyle{longpoem}{% +\fancyhead{} +\fancyfoot{} +\fancyhfoffset[RO,LE]{\headoffsetlength} +\fancyhead[RO]{{\small\textrm{\thepage}}} +\fancyhead[LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{\hfil{\small{\em \volumeheadervalue ~\myversemarks}}\hfil} +\fancyhead[CE]{\hfil{\small{\em \leftheadervalue~\myversemarks}}\hfil} +\fancyfoot[CE]{{\small \botmark}\hfil} +\fancyfoot[CO]{\hfil{\small \botmark}} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +} +% \end{macrocode} +% \end{macro} +% Style for divider pages between volumes +% \begin{macro}{volumetitlestyle} +% \begin{macrocode} +\fancypagestyle{volumetitlestyle}{% +\fancyhf{} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\resetpagestyle} +% |\resetpagestyle| restores the fancy page style of the main sections of the +% book. |\putpoemcontents| changes the fancy page style, and |\resetpagestyle|, +% which is called by |\putpoemcontents| as it finishes, restores the original +% style +% \begin{macrocode} + \newcommand{\resetpagestyle}{\pagestyle{main} +% \fancyhead{} +% \fancyfoot{} +% \fancyhead[RO,LE]{{\small\textrm{\thepage}}} +% \fancyhead[CO]{\hfil{\small{\em \volumeheadervalue}}} +% \fancyhead[CE]{{\small{\em \leftheadervalue}\hfil}} +% \fancyfoot[CE]{{\small \botmark}\hfil} +% \fancyfoot[CO]{\hfil{\small \botmark}} +% \renewcommand{\headrulewidth}{0pt} +% \renewcommand{\footrulewidth}{0pt} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\clearemptydoublepage} +% This macro is useful for making sure that the verso of a title +% page is blank. +% \begin{macrocode} + \newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}} +% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\mymarks} +% Here the marks mechanism keeps track of pages from which notes +% come. Marks are used different in the notes sections and in the body +% of the volume. In the body, they are used to keep track of cases +% where a stanza break falls on a page break. In the notes sections, +% they set the running headers. +% \begin{macrocode} +\newtoks{\singlepageabbrev} +\singlepageabbrev={p.} +\newcommand{\changesinglepageabbrev}[1]{\singlepageabbrev={#1}} +\newtoks{\multiplepageabbrev} +\newcommand{\changemultiplepageabbrev}[1]{\multiplepageabbrev={#1}} +\multiplepageabbrev{pp.} +\newcommand{\mymarks}{% + \ifthenelse{\equal{\firstmark}{\botmark}}% + {\unskip ~\the\singlepageabbrev~\firstmark}% if equal + {\unskip ~\the\multiplepageabbrev~\firstmark--\botmark}}%if not equal +\newcommand{\poemdotfill}{\dotfill} +% \end{macrocode} +% \end{macro} +% \subsection{~Environments: poem, and stanza} Here are definitions +% of the poem and stanza environments, and of the |\verseline| and +% |\stanzalinestraddle| macros. +% \begin{macro}{stanza} \label{stanzadefine} +% Page breaks are slightly encouraged in stanza breaks. Notice that +% entering a stanza sets the mark to |\relax| and leaving it sets the +% mark to * (the default value of |\stanzaatbottom|). If you want to +% use some other symbol for this purpose, use |\stanzaatbottom| or +% |\nostanzaatbottom| (if you also want to mark cases where there +% is \emph{no} stanza break at the bottom of the page) to change it. +% \begin{macrocode} +\newenvironment{stanza}{\penalty-100\instanzatrue\mark{\nostanzaatbottomvalue\ }} + {\nobreak\mark{\stanzaatbottomvalue\ }\nobreak\ifspeciallinelock% +\relax\else% +\nolinebreak\incrementverselinenumber% +\fi% +\speciallinelockfalse% +\nobreak + \instanzafalse + + \stanzaskip +} + +\newenvironment{marginenvironment}{}{} +\newcommand{\stanzalinestraddle} + {\begin{stanza}\addtocounter{verselinenumber}{-1}% + \addtocounter{printlineindex}{-1}% + } +% \end{macrocode} +% The next two environments are for contents entries and titles. The +% idea is to handle overrun titles the way overrun lines are handled +% in verse. Contents entries indent the overrun slightly. Titles do +% not indent the overrun relative to the first line, but preserve the +% indentation of that line. +% \begin{macrocode} +\newlength{\contentsentryoverrun} +\setlength{\contentsentryoverrun}{\contentsindentoneamount} +\newenvironment{contentsentryenvironment}{% +\language=255%no hyphenation in contents +\let\\=\@centercr% +\list{}{\topsep\z@% +\partopsep\z@% +\itemsep\z@ \itemindent -\contentsentryoverrun\listparindent \itemindent + \rightmargin 1sp\leftmargin 1sp\advance\leftmargin + \contentsentryoverrun}\item[]}{\endlist} +\newlength{\titleentryoverrun} +\setlength{\titleentryoverrun}{\z@} +\newenvironment{titleentryenvironment}{% +\language=255%no hyphenation in poem titles +\let\\=\@centercr% +\list{}{\topsep\z@% +\partopsep\z@% +\itemsep\z@ \itemindent -\titleentryoverrun% +\listparindent \itemindent % +\ifleftaligntitles +\left@ligntitleblock +\rightmargin 1sp\leftmargin \lefttitlemargin% +\else +\rightmargin 1sp\leftmargin 1sp% +\fi +\advance\leftmargin \titleentryoverrun}\item[]}{\endlist} +% \end{macrocode} +% \end{macro} +% The poem environment. The little trick about setting the language +% number is designed to suppress automatic hyphenation in the poem +% environment. The booleans tell the |\emendation| and +% |\explanatory| macros that there have not yet been emendations or +% explanatory notes for this poem. The little trick with |\mark| sets +% the value of |\mark| to the current value of |\stanzaatbottom| (by +% default *) if the current location is in a poem but not in a stanza +% (which is to say, in a stanza break). The |\pagestyle| for poetry +% sets the value of |\mark| in the footer, which is * if the page break +% happens at a stanza break, and |\relax| if the page break happens +% anywhere else. \label{poemdef} +% \begin{macro}{poem} +% \begin{macrocode} +\newlength{\versewidth} +\setlength{\versewidth}{\linewidth}% default length for \versewidth +\newenvironment{poem}[1][\linewidth] +{\raggedright% + \language=255%no hyphenation in verse + \noemendyettrue% + \noexplainyettrue% + \setcounter{verselinenumber}{0}\setcounter{printlineindex}{0}% + \nobreak\begin{pmclverse}[#1]% + \inpoemtrue\nobreak\mark{\relax}% + }{\end{pmclverse}% + \inpoemfalse\mark{\relax}% + \goodbreak\afterpoemskip%\bigskip + } +% \end{macrocode} +% \end{macro} +% \begin{macro}{rightflushverse} +% Sets verse with the runover portions of long lines flushed to the right. Each line +% must begin with |\rightversebegin|.This code was suggested to me by Mark Wooding +% on comp.text.tex, who describes the code as ``very unpleasant.'' +% \begin{macrocode} +\newenvironment{rightflushverse}{\let\oldleftskip=\leftskip% +\leftskip=1 \leftskip\advance\leftskip by 0pt plus 1fill}% +{\let\leftskip=\oldleftskip} +% \end{macrocode} +% \end{macro} +% \subsection{~Environments: main title page, divider pages} +% Environments for the main title page, and for the divider pages for +% individual volumes in a Collected Poems. +% \begin{macro}{volumetitlepage} +% \begin{macro}{maintitlepage} +% \begin{macro}{booksectionpage} +% \begin{macrocode} +\newenvironment{volumetitlepage} +{\par\clearpage{\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} + {\newpage\thispagestyle{volumetitlestyle} + \cleardoublepage\thispagestyle{volumefirststyle}} +\newenvironment{maintitlepage} +{\par\cleardoublepage\thispagestyle{volumetitlestyle} +}{\newpage\thispagestyle{volumetitlestyle}\cleardoublepage} +\newenvironment{booksectionpage} +{\par\newpage\thispagestyle{volumetitlestyle}}{\newpage} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \subsection{~Marginal line numbers, verse lines, line cross +% references, etc.}\label{marginalgeometry} The default is that the +% line numbers are on the left side, and that the |\marginparsep| is +% 18pt. If you use |\pmclleftsidepar| the placement of the number is +% controlled by |\marginparsep| and |\marginparwidth|. You should +% experiment with different values until you find a set that suits +% you. A rule of thumb for me is that the |\marginparsep| if the +% numbers is on the right should be the negative of the value if it is +% on the left. First, some lengths and ifs: +% \begin{macrocode} + \setlength{\marginparsep}{18pt} + \setlength{\marginparwidth}{18pt} +\newif\ifnumbersswitch \numbersswitchfalse +\newif\ifnumbersright \numbersrightfalse +% \end{macrocode} +% Next, code for |\pmclsidepar|, taken from the memoir class, by +% Peter Wilson. Modified by Dan Luecking. +% \begin{macro}{\pmclsidepar} +% \begin{macrocode} +\newcommand{\pmclsidepar}{\@dblarg{\@pmclsidepar}} +%\long\def\@pmclsidepar[#1]#2{\@bsphack\leavevmode\vadjust{% +\long\def\@pmclsidepar[#1]#2{\@bsphack\strut\vadjust{% added +\checkoddpage + \ifpmclsideparswitch + \ifpmclreversesidepar + \ifoddpage + \oddpagefalse + \else + \oddpagetrue + \fi + \fi + \else + \oddpagetrue + \ifpmclreversesidepar + \oddpagefalse + \fi + \fi + \rlap{\kern-\parindent + \if@twocolumn + \if@firstcolumn % put at left + \kern -\marginparsep \kern -\marginparwidth % at left + \else % put at right + \kern \columnwidth \kern \marginparsep % at right + \fi + \else + \ifoddpage % put at right + \kern \textwidth \kern \marginparsep % at right + \else % put at left + \kern -\marginparsep \kern -\marginparwidth % at left + \fi + \fi +% \vbox to 0pt{% +% \kern \pmclsideparvshift% % vertical shift to align top text lines +% \begin{minipage}{\marginparwidth}% + \setbox0=\vtop to 0pt{% added + \begin{minipage}[t]{\marginparwidth}% added + \ifoddpage #2\else #1\fi% + \end{minipage}% +% \vss}}}\@esphack} +\vss}% added + \vtop to 0pt{\kern\pmclsideparvshift % default should be 0pt + \kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\@esphack}% added + + +% \end{macrocode} +% \end{macro} +% \begin{macro}{\thepmemc@@page} +% The value of the page counter. +% \begin{macrocode} +\gdef\thepmemc@@page{\the\c@page} + +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmemlabel} +% A version of |\label| that uses |\pmemprotected@write|. +% \begin{macrocode} +\providecommand{\pmemlabel}[1]{\@bsphack + \pmemprotected@write\@auxout{}% + {\string\newpmemlabel{#1}{\thepmemc@@page}}% + \@esphack} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmemprotected@write} +% |\pmemprotected@write| is a modified version of the kernel's +% |\protected@write|. +% +% \begin{macrocode} +\long\def\pmemprotected@write#1#2#3{% + \begingroup + \let\thepmemc@@page\relax + #2% + \let\protect\@unexpandable@protect + \edef\reserved@a{\write#1{#3}}% + \reserved@a + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi} + +% \end{macrocode} +% \end{macro} +% \begin{macro}{\newpmemlabel} +% \begin{macro}{\pmemlabelref} +% We have to be able to cope with a particular label +% not (yet) being in the the aux file when we come to check +% the page number. +% \begin{macrocode} +\providecommand{\newpmemlabel}[2]{{\global\@namedef{m@#1}{#2}}} +\providecommand{\pmemlabelref}[1]{% + \expandafter\ifx\csname m@#1\endcsname\relax + 0% + \else + \csname m@#1\endcsname + \fi} + +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\@memcnta} +% We need a scratch count register. +% \begin{macrocode} +\newcount\@memcnta +% \end{macrocode} +% \end{macro} +% \begin{macro}{\checkoddpage} +% This is the user level command to check for odd/even page. It does +% a robust check for |\strictpagecheck| otherwise the simple minded +% check. It sets |\ifoddpage| to TRUE if the page is odd, otherwise +% it sets it to FALSE. +% +% This is now fixed so that it should work for non-arabic page numbering. +% It uses a new label/pageref variant based on the page counter value, not +% its printed representation. This also gets rid of worrying about hyperref!! +% The problem was discovered by Bastiaan Niels Veelo +% +% \begin{macrocode} +\DeclareRobustCommand{\checkoddpage}{% + \oddpagefalse% + \ifstrictpagecheck% + \stepcounter{cp@cntr}\pmemlabel{\cplabel\thecp@cntr}% + \@memcnta=\pmemlabelref{\cplabel\thecp@cntr}\relax + \ifodd\@memcnta\oddpagetrue\fi + \else + \ifodd\c@page\oddpagetrue\fi + \fi} + +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ifpmclreversesidepar} +% \begin{macro}{\ifpmclsideparswitch} +% Analogues of |\marginpar| controls. +% \begin{macrocode} +\newif\ifpmclreversesidepar +% \pmclreversesideparfalse + \pmclreversesidepartrue +\newif\ifpmclsideparswitch + \pmclsideparswitchfalse +\if@twoside \pmclsideparswitchtrue \fi + +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\ifoddpage} +% \begin{macro}{\ifstrictpagecheck} +% \begin{macro}{\c@cp@cntr} +% \begin{macro}{\cplabel} +% The boolean |\ifoddpage| is TRUE if the checked page is odd. The +% boolean |\ifstrictpagecheck| is for turning on (TRUE) and off (FALSE) +% the strictest method of page checking. The counter |cp@cntr| is used +% to make unique labels, which start with |\cplabel|. +% \begin{macrocode} +\newif\ifoddpage +\newif\ifstrictpagecheck + \strictpagecheckfalse +\newcounter{cp@cntr} +\newcommand{\cplabel}{^_} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% Two-column and one-column printing is again realized via a switch +% which is defined in the kernel. The default is single column printing. +% +% +% \begin{macro}{\pmclsideparvshift} +% Vertical shift for sidepar to align with text line +% \begin{macrocode} +\newlength{\pmclsideparvshift} +% \setlength{\pmclsideparvshift}{-2.08ex}% seems to work for all font sizes +%\setlength{\pmclsideparvshift}{-2.58ex} +\setlength{\pmclsideparvshift}{0ex} +% \end{macrocode} +% \end{macro} +% My code resumes here +% \begin{macro}{\verselinenumberstoleft} +% \begin{macro}{\verselinenumberstoright} +% \begin{macrocode} +\newcommand{\verselinenumberstoleft}{% +% \setlength{\marginparsep}{18pt}% +% \setlength{\marginparwidth}{10pt}% + \numbersswitchfalse\numbersrightfalse} +\newcommand{\verselinenumberstoright}{% +% \setlength{\marginparsep}{18pt}% +% \setlength{\marginparwidth}{10pt}% + \numbersswitchfalse\numbersrighttrue} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\verselinenumbersswitch} +% \begin{macro}{\verselinenumbersgutter} +% \begin{macro}{\verselinenumbersouter} +% \begin{macrocode} +\newcommand{\verselinenumbersswitch}{% + \strictpagechecktrue% +% \setlength{\marginparsep}{18pt}% +% \setlength{\marginparwidth}{10pt}% + \numbersswitchtrue\numbersrightfalse\pmclsideparswitchtrue} +\newif\ifnumbersgutter \numbersgutterfalse% +\newcommand{\verselinenumbersgutter}{\verselinenumbersswitch% +\pmclreversesideparfalse% +\numbersguttertrue% +} +\newcommand{\verselinenumbersouter}{\verselinenumbersswitch% +\pmclreversesidepartrue% +\numbersgutterfalse} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\putverselinenumber} +% \begin{macrocode} +\newcommand{\putverselinenumber}{\nolinebreak\begin{marginenvironment}% + \nolinebreak% +% \ifnumbersswitch\marginpar{\hfil\textrm{\scriptsize\theverselinenumber}}% +% \else% +% \ifnumbersright\marginpar{\hfil\textrm{\scriptsize\theverselinenumber}}% +% \else% +% \marginpar{\textrm{\scriptsize\theverselinenumber}\hfil}% +% \fi% +% \fi + \ifnumbersswitch\pmclsidepar{\hfil\textrm{\scriptsize\theverselinenumber}}% + \else% + \ifnumbersright\pmclrightsidepar{\hfil\textrm{\scriptsize\theverselinenumber}}% + \else% + \pmclleftsidepar +{\textrm{\scriptsize\theverselinenumber}\hfil}% + \fi% + \fi% +% \marn{\hfil\textrm{\theverselinenumber}} +% \marginpar{\hfil\textrm{\scriptsize\theverselinenumber}} +% \linenumberside{\textrm{\scriptsize\theverselinenumber}\hfil} +% \pmclrightsidepar{\textrm{\scriptsize\theverselinenumber}} + \nolinebreak% + \end{marginenvironment}% + \nolinebreak% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\verseline} +% \begin{macrocode} +\newif\ifspeciallinelock +\speciallinelockfalse +\newcommand{\verseline}{\ifspeciallinelock% +\relax\else% +\nolinebreak\incrementverselinenumber% +\fi% +\speciallinelockfalse% +\nolinebreak\\ +} +% \newif\iflongpoemon +% \longpoemonfalse +\newcommand{\incrementverselinenumber}{% +\nolinebreak\addtocounter{verselinenumber}{1}% +%\iflongpoemon\marksthe{verselinemark}{\theverselinenumber}\fi% +\makeatletter + \@ifundefined{marksthe}{\relax}{\marksthe{verselinemark}{\theverselinenumber}} +\makeatother + \addtocounter{printlineindex}{1}% + \ifnum\theprintlineindex>\thelineindexrepeat% + \ifverselinenumbers\nobreak% + \putverselinenumber\nobreak% + \fi\nobreak% + \setcounter{printlineindex}{0}% + \fi% +} +\newcommand{\setverselinemodulo}[1]{% +\setcounter{lineindexrepeat}{#1}% +\addtocounter{lineindexrepeat}{-1}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\linebend} +% A linebend is a a normal linebreak from \LaTeX, with no incrementing +% of the line number counter, but the indentation makes the line look +% like a run over line. If you change the value of the run over in the +% definition of the |\verse| environment, be sure to change it here +% too. |\linebend| should be used for tweaking how \textsf{poemscol} +% runs over long lines. +% +% \begin{macrocode} +\newcommand{\linebend}{\\ +\hspace{\runoverindentvalue}% + } +% \end{macrocode} +% \end{macro} +% |\saveverselinenumber| and |\restoreverselinenumber| are useful for setting +% prose interjections in the midst of poems. +% \begin{macro}{\saveverselinenumber} +% \begin{macro}{\restoreverselinenumber} +% \begin{macrocode} +\newcommand{\saveverselinenumber}{\setcounter{verselinenumberscratch}% + {\value{verselinenumber}}% + \setcounter{printlineindexscratch}{\value{printlineindex}}} +\newcommand{\restoreverselinenumber}{\setcounter{verselinenumber}% + {\value{verselinenumberscratch}}% + \setcounter{printlineindex}{\value{printlineindexscratch}}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\rightversebegin} +% By default, \textsf{poemscol} indents the runover portion of long lines by the +% amount |\runoverindent| (by default 6 em). It is possible to set verse so that +% the runover portion is flushed to the right margin. To do this, you should +% enclose the |\poem| environment in the |\rightflushverse| environment. And you +% must mark the beginning of each verse line with |\rightversebegin| +% \begin{macrocode} +\newcommand{\rightversebegin} +{\leavevmode\nobreak\hskip0pt plus -1fill\ignorespaces} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\hour} +% |\hour| is useful for typesetting the AM and the PM in the time. +% \begin{macrocode} +\newcommand{\hour}[1]{{{\textsc{#1}}\ $\!\!\!$} + } +% \end{macrocode} +% \end{macro} +% \begin{macro}{\brokenline} +% \begin{macro}{\versephantom} +% |\brokenline| and |\versephantom{}| are a pair, useful for setting +% cases where there is a line break in the midst of a single metrical +% line. |\tweakbrokenline| ensures that the line number will mark +% the first partial line if the line numbers are on the left, the +% last partial line if the line numbers are on the right. If you +% have issued |\tweakbrokenline| in your preamble, the setting of +% runover lines may not be consistent with the setting of broken +% lines, because the line number will be set on the level of the end +% of the line. This is not a problem if the line numbers are set on +% the right, but it may look odd if the numbers are set on the left. +% |\startverseline| will ensure that the line number marks the +% beginning of any line it begins. If you put |\startverseline| at +% the beginning of the runover lines, it will ensure that the line +% number marks the beginning, not the end, of the line. If you wish +% |\startverseline| to align the number with the beginning of +% runover lines when the line number is on the left, and with the +% end of runover lines when the line number is on the right, issue +% |\tweakstartverseline| in your preamble. +% \begin{macrocode} +\newcommand{\brokenline}{\\} +\newcommand{\versephantom}[1]{\leavevmode\phantom{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\tweakbrokenline} +% Causes |\brokenline| to set the line number level with the +% beginning of the line if the number is on the left, level with the +% end of the line if the number is on the right. Issue it in the +% preamble. +% \begin{macrocode} +\newcommand{\tweakbrokenline}{% + \renewcommand{\brokenline}{\ifnumbersswitch\relax% + \ifnumbersgutter% shift on odd pages for gutter numbers + \ifodd\c@page \relax \else \speciallinelocktrue\incrementverselinenumber\fi + \else % shift on even pages for outer numbers + \ifodd\c@page \speciallinelocktrue\incrementverselinenumber \fi + \fi + \else \ifnumbersright \relax% + \else \speciallinelocktrue\incrementverselinenumber% + \fi% + \fi% +\\} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\brokenlineatbeginning} +% Issue |\brokenlineatbeginning| if you want broken line to set the +% line number level with the beginning of the line, regardless of +% whether the line number is at the right or at the left +% \begin{macrocode} +\newcommand{\brokenlineatbeginning}{% + \renewcommand{\brokenline}{% + \speciallinelocktrue\incrementverselinenumber% + \\ + } +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\startverseline} +% Put |\startverseline| at the beginning of every line where you wish +% to ensure that the line number is level with the beginning of the +% line. This is particularly useful for overrun lines when +% |\tweakbrokenline| or |\brokenlineatbeginning| is in effect. +% \begin{macrocode} +\newcommand{\startverseline}{% +\speciallinelocktrue% +\leavevmode% +%\kern-3pt +\incrementverselinenumber% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\tweakstartverseline} +% You may want |\startverseline| to align the line number with the +% beginning of the line if the line number is on the left, and with +% the end of the line if the line number is on the right. To do this, +% issue |\tweakstartline| in your preamble. +% \begin{macrocode} +\newcommand{\tweakstartverseline}{% +\renewcommand{\startverseline}{% +\leavevmode% +\ifnumbersswitch% +% gutter case: shift on odd pages to top of runover line + \ifnumbersgutter% + \ifodd\c@page \relax \else \speciallinelocktrue\incrementverselinenumber\fi +% outer case: shift on even pages to top of runover line + \else + \ifodd\c@page \speciallinelocktrue\incrementverselinenumber \fi + \fi% end of ifnumbersgutter +\else \ifnumbersright \relax% numbers don't switch. Are they to the right? + \else \speciallinelocktrue\incrementverselinenumber% or to the left? + \fi% end of ifnumbersright +\fi% end of ifnumbersswitch +}% end of renewcommand +}% end of tweakverseline +% \end{macrocode} +% \end{macro} +% \begin{macro}{\poemlinelabel} +% |\poemlinelabel| is a hacked version of |\label| for crossreferences by +% line. +% \begin{macrocode} +\def\poemlinelabel#1{\@bsphack + \protected@write\@auxout{}% + {\string\newlabel{#1}{{\theverselinenumber}{\thepage}}}% +\@esphack +} +% \end{macrocode} +% \end{macro} +% \subsection{~Setup for contents, textual notes, emendations, and explanatory notes} +% First, the table of contents: +% \begin{macro}{\makepoemcontents} +% An external file is created with the extension .ctn, and the +% filename of your driver file. The +% channel to that file is called |\poemcontents|. The rest of the +% command is the page style for the contents section. You will notice +% the running head Contents, and the title of the Contents section. I am +% assuming that the table of contents starts on page 5, but it may be +% different in different books. +% If you want to change that page +% number (say, to page 3) without messing with this file, issue +% |\literalcontents{\setcounter{page}{3}}| just after you issue +% |\makepoemcontents| Alternatively, you can issue |\makepoemcontents{}| with its +% optional argument, putting the page number in the argument. +% \begin{macrocode} +\newtoks{\pmclcontentsname} +\pmclcontentsname={CONTENTS} +\newtoks{\pmclcontentsheader} +\pmclcontentsheader={Contents} +\newcommand{\changecontentsname}[1]{% +\pmclcontentsname={#1}} +\newcommand{\changecontentsheader}[1]{% +\pmclcontentsheader={#1}} +\newcommand{\makepoemcontents}[1][5]{\global\poemcontentsontrue + \newwrite\poemcontents + \immediate\openout\poemcontents=\jobname.ctn + \literalcontents{\flushbottom\normalfont +{\par\clearpage{\pagestyle{volumetitlestyle}\cleardoublepage} +\pagestyle{fancy}\thispagestyle{volumetitlestyle}} +\pagenumbering{roman} +\setcounter{page}{#1} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\pmclcontentsheader}}} +\fancyhead[CE]{{\small{\em \the\pmclcontentsheader}}} +\fancyfoot{} +\backmattersink +\begin{center}{\normalfont \backmatterheaderfont +\the\pmclcontentsname}\end{center} +\lefthyphenmin=2\backmatterafterheadersink\tolerance=500\language=0} +\literalcontents{ \relax}} +% \end{macrocode} +% \end{macro} + +% Next, the textual collations: +% \begin{macro}{\maketextnotes} Like the |\makecontents| macro, +% |\maketextnotes| opens an external file using |\jobname|, this time with the extension .ent. It +% makes sure that line numbering is on (since it makes no sense to make +% notes without numbering the lines, particularly since the +% |\textnote{}| macro uses the line number). And it makes sure that the +% notes section is set with a flush bottom line, rather than with the +% ragged bottom line used for the verse sections. Also, it sets a +% label for sending the page number of the textual notes to the table of +% contents. +% +% First, a few commands for use by all of the endnotes +% sections. |\setendnotessectiontitledefaults| sets the title of the endnotes section +% at the top of the first page of that species of note, and takes six arguments, +% which are, in order, (1) the title of the endnote section, (2) +% commands to be issued before setting the +% title (minimally, a penalty, such as |\poemtitlepenalty|), (3) the +% font size in which the title is to be set in the text (such as +% |\poemtitlefont| or |\large|), (4) any indentation of the title +% (|\relax| to put the title where |\poemtitle| puts it, or |\titleindent| to put it where +% |\sequencesectiontitle| puts it), (5) commands to be issued after the +% title is set (such as |\afterpoemtitleskip|) and (6) the label to +% be used for this section, to be used to set the page number in the +% table of contents. +% +% |\setendnotessectiontitle| is a simpler version of |\setendnotessectiontitledefaults| +% with all the defaults filled in, leaving only two arguments, the +% title of the section, and the label for use by the table of +% contents. +% +% |\contentsendnotesdefaults| sets the defaults for the table of +% contents entries for endnotes sections. It takes four arguments +% which are, in order, (1) the title of the endnote section, (2) the +% indentation of the title in the table of contents (such as +% |\contentsindentone|), (3), the font size in which the title +% should be set (such as |\contentspoemtitlefont|) and (4) the amount +% overrun lines in the table of contents should be indented (such as +% |\contentsindenttwoamount|). +% +% |\contentsendnotesindent| sets the default indent for table of +% contents entries for endnotes sections, and |\contentsendnotesfont| +% sets the default font for the. +% +% |\contentsendnotestitle| is a simpler command for sending +% information about endnote sections to the table of contents, taking +% only two arguments, the title and the label used for page reference +% purposes. +% \begin{macrocode} +% Generic command for titles of endnote sections +\newcommand{\setendnotessectiontitledefaults}[6]{% +#2% +#3 \begin{titleentryenvironment}% +{\ifcentertitleson\begin{center}#4 #1\end{center}\else #4 #1\fi}% +\end{titleentryenvironment}% +#5% +\label{#6} +} +% Simpler version with only two parameters, the title and the label +% for page references +\newcommand{\setendnotessectiontitle}[2]{ +\setendnotessectiontitledefaults{#1}{\poemtitlepenalty\backmattersink\begin{center}}{\backmatterheaderfont} +{\relax}{\end{center}\lefthyphenmin=2\backmatterafterheadersink}{#2}} +% Generic command for sending info about endnotes sections to table +% of contents +\newcommand{\contentsendnotesdefaults}[4]{\ifpoemcontentson +\immediate\write\poemcontents{\string\begin\string{contentsentryenvironment\string}}% +\literalcontents{#2{#3#1}}% + \ifputpagenumberincontents +\immediate\write\poemcontents{\string\contentsleaders}% +\immediate\write\poemcontents{\string\pageref +\string{#4\string}}% + \else + \literalcontents{\relax}% + \fi +\immediate\write\poemcontents{\string\end\string{contentsentryenvironment\string}}% +\immediate\write\poemcontents{\string\par}% +\fi +} +% default styles for contents entries for endnotes sections +\newcommand{\contentsendnotesindent}{\contentsindentone} +\newcommand{\contentsendnotesfont}{\contentspoemtitlefont} +% simpler command to set up contents entry with only two parameters, +% the title and the label for page references +\newcommand{\contentsendnotestitle}[2]{% +\contentsendnotesdefaults{#1}{\contentsendnotesindent}{\contentsendnotesfont}{#2}% +} +% command for paragraph breaks within notes +\newlength{\noteindentation} +\setlength{\noteindentation}{1em} +\newcommand{\noteparbreak}{\\ +\hspace*{\noteindentation}} +% tokens to use to change the names of the sections +\newtoks{\pmclnotesname} +\pmclnotesname={TEXTUAL NOTES} +\newcommand{\changenotesname}[1]{\pmclnotesname={#1}} +\newtoks{\notesheadername} +\notesheadername={Textual Notes to} +\newcommand{\changenotesheader}[1]{\notesheadername={#1}} +\newtoks{\textnotescontentsname} +\textnotescontentsname={Textual Notes} +\newcommand{\changetextnotescontentsname}[1]{\textnotescontentsname={#1}} +% A boolean to change to two column notes. +\newif\iftextnotestwocol +\textnotestwocolfalse +% Setup for textual notes +\newcommand{\maketextnotes}{\global\textnotesontrue + \global\verselinenumberstrue + \newwrite\textnotes + \immediate\openout\textnotes=\jobname.ent + \literaltextnote{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead{} +\fancyfoot{} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\notesheadername~\mymarks}}} +\fancyhead[CE]{{\small{\em \the\notesheadername~\mymarks}}} +\fancyfoot[C]{} +\mark{3} +\setendnotessectiontitle{\the\pmclnotesname}{textualnotes} +\tolerance=500\language=0 +\normalfont \backmattertextfont +\iftextnotestwocol +\begin{multicols}{2} +\fi +\setlength{\parindent}{-10pt} +} +} + +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\makeemendations} +% Next, the emendations section: +% \begin{macrocode} +% tokens for changing the names of these notes +\newtoks{\emendationsname} +\emendationsname={EMENDATIONS} +\newcommand{\changeemendationsname}[1]{\emendationsname={#1}} +\newtoks{\emendationsheadername} +\emendationsheadername={Emendations to} +\newcommand{\changeemendationsheader}[1]{\emendationsheadername={#1}} +\newtoks{\emendationscontentsname} +\emendationscontentsname={Emendations} +\newcommand{\changeemendationscontentsname}[1]{% +\emendationscontentsname={#1}} +% two column notes +\newif\ifemendationstwocol +\emendationstwocolfalse +% Emendations section setup +\newcommand{\makeemendations}{\global\emendationsontrue + \newwrite\emendations + \global\verselinenumberstrue + \immediate\openout\emendations=\jobname.emd + \literalemend{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead{} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\emendationsheadername~\mymarks}}} +\fancyhead[CE]{{\small{\em \the\emendationsheadername~\mymarks}}} +\fancyfoot{} +\mark{3} +\setendnotessectiontitle{\the\emendationsname}{emendationnotes} +\tolerance=500\language=0 +\normalfont \backmattertextfont +\ifemendationstwocol +\begin{multicols}{2} +\fi +\setlength{\parindent}{-10pt} +} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\makeexplanatorynotes} +% And the explanatory notes: +% \begin{macrocode} +% Tokens to change names of these notes +\newtoks{\explanationsname} +\explanationsname={EXPLANATORY NOTES} +\newcommand{\changeexplanationsname}[1]{\explanationsname={#1}} +\newtoks{\explanationsheadername} +\explanationsheadername={Explanatory Notes to} +\newcommand{\changeexplanationsheader}[1]{\explanationsheadername={#1}} +\newtoks{\explanationscontentsname} +\explanationscontentsname={Explanatory Notes} +\newcommand{\changeexplanationscontentsname}[1]{% +\explanationscontentsname={#1}} +% Two column notes +\newif\ifexplanationstwocol +\explanationstwocolfalse +% Explanatory notes setup +\newcommand{\makeexplanatorynotes}{\global\explanontrue + \global\verselinenumberstrue + \newwrite\explanations + \immediate\openout\explanations=\jobname.enx + \literalexplain{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\explanationsheadername~\mymarks}}} +\fancyhead[CE]{{\small{\em \the\explanationsheadername~\mymarks}}} +\fancyfoot{} +\mark{3} +\setendnotessectiontitle{\the\explanationsname}{explanatorynotes} +\tolerance=500\language=0 +\normalfont \backmattertextfont +\ifexplanationstwocol +\begin{multicols}{2} +\fi +\setlength{\parindent}{-10pt} +} +} + +% \end{macrocode} +% \end{macro} +% +% Auxiliary commands for note and title sections +% \begin{macrocode} +% +\newcommand{\@pagemarktotextnotes}[1]{% +\immediate\write\textnotes{\string\setcounterfrompageref\string{notepageholdertitle\string}% +\string{#1\string}\string\unskip}% +\immediate\write\textnotes{\string\mark% +\string{\string\thenotepageholdertitle\string}}% +} +\newcommand{\@poempagetotextnotes}[1]{% +\immediate\write\textnotes{\string\par\string\argpageref\string{#1\string}\string\unskip}% +\@pagemarktotextnotes{#1}} +\newcommand{\@poemtitletotextnotes}[1]{\literaltextnote{\textbf{#1}}} +% \end{macrocode} +% + +% \subsection{~Book, volume, and volume section titles} +% \begin{macro}{\wholebooktitle} +% \begin{macro}{\booksection} +% \begin{macrocode} +\newcommand{\wholebooktitle}[1]{{\Huge\begin{center} +\hbox{#1}\end{center}} +} +\newcommand{\booksection}[1]{\volumesection{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\volumetitle{}} +% \begin{macrocode} +\newcommand{\volumetitle}[1]{% + \set@p@emtitle{#1}{\volumetitlesink\par}{\volumetitlefont} + {\relax}{\nobreak\par\nobreak}{\z@} + \putpagenumberincontentsfalse + \putpagenumberinnotesfalse + \literalcontents{\goodbreak} + \c@ntentsinfo{#1}{\relax}{\contentsvolumefont} + {\contentsindentoneamount} + \literalcontents{\vspace{5pt}\par\nobreak} + \literaltextnote{\notesvolumetitlepenalty\bigskip\goodbreak\par} + \t@xtnotesinfo{\backmattervolumefont #1 \backmattertextfont\nobreak} + \putpagenumberincontentstrue + \putpagenumberinnotestrue} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\volumetitlefirstline} +% \begin{macro}{\volumetitlelastline} +% \begin{macro}{\volumesubtitle} +% \begin{macro}{\volumesectiontitle} +% \begin{macrocode} +\newcommand{\volumetitlefirstline}[1]{\firstlinesettings% + \set@p@emtitle{#1}{\volumetitlesink\par} + {\volumetitlefont} + {\relax}{\nobreak\par\nobreak}{\z@} + \putpagenumberincontentsfalse + \putpagenumberinnotesfalse + \c@ntentsinfo{#1}{\relax}{\contentsvolumefont} + {\contentsindentoneamount} +% \literalcontents{\vspace{5pt}\par\nobreak} +% \literaltextnote{\notesvolumetitlepenalty\bigskip\par} + \t@xtnotesinfo{\backmattervolumefont #1 \backmattertextfont\nobreak} + \putpagenumberincontentstrue + \putpagenumberinnotestrue} +\newcommand{\volumetitlemiddleline}[1]{\middlelinesettings% + \set@p@emtitle{#1}{\relax} + {\volumetitlefont} + {\relax}{\nobreak\par\nobreak}{\z@} + \putpagenumberincontentsfalse + \putpagenumberinnotesfalse + \c@ntentsinfo{#1}{\contentsindentone}{\contentsvolumefont} + {\contentsindenttwoamount} + \t@xtnotesinfo{\backmattervolumefont #1 \backmattertextfont\nobreak} + \putpagenumberincontentstrue + \putpagenumberinnotestrue} +\newcommand{\volumetitlelastline}[1]{\lastlinesettings% + \set@p@emtitle{#1}{\relax} + {\volumetitlefont} + {\relax}{\nobreak\par\nobreak}{\z@} + \putpagenumberincontentsfalse + \putpagenumberinnotesfalse + \c@ntentsinfo{#1}{\contentsindentone}{\contentsvolumefont} + {\contentsindenttwoamount} + \literalcontents{\vspace{5pt}\par\nobreak} + \t@xtnotesinfo{\backmattervolumefont #1 \backmattertextfont\nobreak} + \putpagenumberincontentstrue + \putpagenumberinnotestrue} +\newcommand{\volumesubtitle}[1]{{\volumesubtitlefont +\volumetitleshift #1 \par} + \ifpoemcontentson + \literalcontents{{\contentsvolumesubtitlefont +#1\vspace{3pt}\par\nobreak}} + \fi + \iftextnoteson\iftextnotesatend + \immediate\write\textnotes{\string\backmattervolumesubtitlefont\ #1} + \immediate\write\textnotes{\string\par \string\backmattertextfont} + \immediate\write\textnotes{\string\nobreak} + \fi\fi +} +\newcommand{\volumesectiontitle}[1] +{\clearpage\thispagestyle{volumefirststyle} +\begin{center} {\volumesubtitlefont\textbf{#1}} +\end{center} \bigskip\bigskip + \ifpoemcontentson + \literalcontents{\goodbreak{\contentsvolumesubtitlefont #1\par\nobreak}} + \fi + \iftextnoteson\iftextnotesatend + \immediate\write\textnotes{\string\notesvolumetitlepenalty} + \immediate\write\textnotes{\string\par \string\begin{bf}} + \immediate\write\textnotes{#1 \string\end{bf}} + \immediate\write\textnotes{\string\par} + \immediate\write\textnotes{\string\nobreak} + \fi\fi +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} + +% \subsection{~Commands for setting titles of poems and sequences} +% First, commands for sending labels to the table of contents and to +% the notes sections. Since these are internal commands, not intended +% to be issued in the body of the text, they might have been marked out +% with ``at'' signs to prevent accidental redefinition. But since they +% are repeatedly written out to the external files, it seemed more +% economical to run the risk of redefinition than to write out +% |\makeatletter| and |\makeatother| with every note. +% \begin{macrocode} +\newcommand{\makepoemlabel}[1]{\label{#1}} +\newcommand{\argpageref}[1]{\pageref{#1}} +% \end{macrocode} +% \subsubsection{Poem Titles} +% \begin{macro}{\poemtitle}\label{poemtitlecode} +% All of the other commands in this section are variations on this +% one, changing the penalties, the skips, the indentations, and the +% fonts. The command breaks into three sections. First, the title +% is set in the text. |\poemtitlepenalty| tests whether there is +% room for the title and the first couple of lines. |\poemtitlefont| +% globally sets the fonts for all poem titles. You can put the +% argument in an |\hbox{}| to make sure that the poem title is not +% broken across two lines, and the |\label| records the page for the +% contents and notes sections. |\afterpoemtitleskip| is the amount +% of white space after a poem title. |\fulltitleholder| and +% |\@compoundlabelscratch| record the title for concatenation later. +% All of these commands can manage titles with control sequences in +% them, such as for italics or international characters. In an +% earlier version there were special commands for such titles, using +% two arguments (one with the control sequence, one without it). +% Those commands are no longer necessary, but have been retained for +% backward compatibility with earlier versions. +% +% Second, the poem is entered in the external file for the table of +% contents. |\contentsindentone| sets it in one level in the hierarchy +% of indentations, and |\contentspoemtitlefont| is the type size used +% for poems in the table of contents. The |\pageref{}| holds the page +% number of the poem. +% +% Third, a new paragraph is opened in the textual notes for textual +% collations. |\@poempagetotextnotes{}| sends the page number to the +% textual notes. |\@poemtitletotextnotes{}| sends the title. +% \begin{macrocode} + +\newcommand{\m@kep@emlabel}{\ifsinglelinetitle% + \addtocounter{poemnumber}{1}% + \makepoemlabel{poem\thepoemnumber}% + \else\iftitlefirstline% + \addtocounter{poemnumber}{1}% + \makepoemlabel{poem\thepoemnumber}% + \else \relax +\fi +\fi +} + +\newcommand{\m@ken@teholder}[1]{% +\ifsinglelinetitle +\fulltitleholder={#1}% +\global\edef\@compoundlabelscratch{poem\thepoemnumber}% +\else\iftitlefirstline + \fulltitleholder={#1}% + \global\edef\@compoundlabelscratch{poem\thepoemnumber}% + \else\iftitlemiddleline + \titlesofar=\fulltitleholder + \titleincrement={~#1}% + \global\edef\titleconcat{\the\titlesofar \the\titleincrement}% + \fulltitleholder=\expandafter{\titleconcat}% + \global\edef\@compoundlabelscratch{poem\thepoemnumber}% + \else + \titlesofar=\fulltitleholder + \titleincrement={~#1}% + \global\edef\titleconcat{\the\titlesofar \the\titleincrement}% + \fulltitleholder=\expandafter{\titleconcat}% + \global\edef\@compoundlabelscratch{poem\thepoemnumber}% + \fi + \fi + \fi +} +\newif\ifcentertitleson +\newcommand{\centertitles}{\centertitlesontrue\centerepigraphsontrue} +\makeatletter +\newcommand{\set@p@emtitle}[6]{\setlength{\titleentryoverrun}{#6}% +{#2}% +{#3 \begin{titleentryenvironment}% +{\ifcentertitleson\begin{center}#4 #1\end{center}\else #4 #1\fi}% +\end{titleentryenvironment}}% +{#5}% +\m@kep@emlabel +\m@ken@teholder{#1}% +\setlength{\titleentryoverrun}{\z@}} +% +\newcommand{\setcontentsleaders}[1]{% + \def\contentsleaders{#1\nobreak% +}} +\setcontentsleaders{~/~} +\newcommand{\c@ntentsinfo}[4]{\ifpoemcontentson +\immediate\write\poemcontents{\string\setlength\string\contentsentryoverrun\string{#4\string}}% +\immediate\write\poemcontents{\string\begin\string{contentsentryenvironment\string}}% +\literalcontents{#2{#3#1}}% + \ifputpagenumberincontents +\immediate\write\poemcontents{\string\contentsleaders}% +\immediate\write\poemcontents{\string\pageref +\string{poem\thepoemnumber\string}}% + \else + \literalcontents{\relax}% + \fi +\immediate\write\poemcontents{\string\end\string{contentsentryenvironment\string}}% +\immediate\write\poemcontents{\string\par}% +\immediate\write\poemcontents{\string\setlength\string\contentsentryoverrun +\string{\string\contentsindentoneamount\string}}% +\fi +} +\newif\ifputtitleinnotes +\puttitleinnotestrue +\newcommand{\t@xtnotesinfo}[1]{\iftextnoteson +\iftextnotesatend + \immediate\write\textnotes{\string\notespoemclubpenalty}% + \ifputpagenumberinnotes + \@poempagetotextnotes{poem\thepoemnumber}% + \fi +\ifputtitleinnotes + \@poemtitletotextnotes{#1}% +\fi +% \else +% \relax + \fi\fi +} +\newlength{\lefttitlemargin} +\newcommand{\leftaligntitlespace}{\hspace{\lefttitlemargin}} +\newif\ifleftaligntitles % title flush with left margin of centered poem +\leftaligntitlesfalse % default value +\newcommand{\left@ligntitleblock}{\rightmargin \z@%% + \setlength{\lefttitlemargin}{\linewidth}% + \addtolength{\lefttitlemargin}{-\versewidth}% + \addtolength{\lefttitlemargin}{-0.5\lefttitlemargin} +} +% +\newcommand{\poemtitle}[1]{% +\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +\t@xtnotesinfo{#1}% +} +\newcommand{\poemtitlenocontents}[1]{% +\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +\t@xtnotesinfo{#1}% +} +\newcommand{\poemtitlebaretitle}[1]{% +\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +} +\newcommand{\poemtitleonlycontents}[1]{% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +} +\newcommand{\poemtitleonlynotes}[1]{% +\m@kep@emlabel +\m@ken@teholder{#1}% +\t@xtnotesinfo{#1}% +} +\newcommand{\poemtitlenonotes}[1]{% +\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\poemtitleitalic} Poems with italic titles or other +% formatting (such as |\hour{}|) take two arguments. The second +% argument is discarded. This command is to maintain backward compatibility +% with earlier versions. +% \begin{macrocode} +\newcommand{\poemtitleitalic}[2]{% +\poemtitle{#1}} +% \end{macrocode} +% \end{macro} +% For poem subtitles, see the entry on |\sequencesectionsubtitle{}|. +% +% \begin{macro}{\poemtitlefirstline} +% \begin{macro}{\poemtitlemiddleline} +% \begin{macro}{\poemtitlelastline} +% Next, macros for setting multiline poem titles. Notice the special larger +% penalty for page breaks in the middle of multiple line title. +% \begin{macrocode} +\newcommand{\firstlinesettings}{\singlelinetitlefalse +\titlefirstlinetrue +\putpagenumberincontentsfalse +\putpagenumberinnotestrue} + +\newcommand{\middlelinesettings}{\singlelinetitlefalse +\titlemiddlelinetrue +\putpagenumberincontentsfalse +\putpagenumberinnotesfalse} + +\newcommand{\lastlinesettings}{\singlelinetitlefalse +\titlelastlinetrue +\putpagenumberincontentstrue +\putpagenumberinnotesfalse} + +\newcommand{\restoresinglelinesettings}{\putpagenumberinnotestrue +\putpagenumberincontentstrue +\titlefirstlinefalse +\titlemiddlelinefalse +\titlelastlinefalse +\singlelinetitletrue} + + +\newcommand{\poemtitlefirstline}[1]{ +\firstlinesettings +\set@p@emtitle{#1}{\multilinetitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak}{\z@}% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +\t@xtnotesinfo{#1}% +\restoresinglelinesettings +} +% \end{macrocode} + +% Notice the use of token registers and |\edef| here to concatenate the first and second +% lines. +% \begin{macrocode} +\newcommand{\poemtitlemiddleline}[1]{% +\middlelinesettings +\set@p@emtitle{#1}{\par\nobreak}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak}{\z@}% +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}% +{\contentsindentthreeamount}% +\t@xtnotesinfo{#1}% +\restoresinglelinesettings +} +\newcommand{\poemtitlelastline}[1]{% +\lastlinesettings +\set@p@emtitle{#1}{\par\nobreak}{\poemtitlefont}% +{\relax}{\nobreak\par\afterpoemtitleskip\nobreak}{\z@}% +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}% +{\contentsindentthreeamount}% +\t@xtnotesinfo{#1}% +\restoresinglelinesettings +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% Titles for sections of poems, and multi-line titles of sections +% of poems +% \begin{macro}{\poemsectiontitle} +% \begin{macro}{\poemsectiontitlefirstline} +% \begin{macro}{\poemsectiontitlemiddleline} +% \begin{macro}{\poemsectiontitlelastline} +% \begin{macrocode} +\newcommand{\poemsectiontitle}[1]{% +\set@p@emtitle{#1}{\poemtitlepenalty}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindentamount}% +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}% +{\contentsindentthreeamount}% +\t@xtnotesinfo{#1}% +} +\newcommand{\poemsectiontitlefirstline}[1]{% +\firstlinesettings +\set@p@emtitle{#1}{\multilinetitlepenalty}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\nobreak}{\titleindentamount}% +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}% +{\contentsindentthreeamount}% +\t@xtnotesinfo{#1}% +\restoresinglelinesettings +} +\newcommand{\poemsectiontitlemiddleline}[1]{% +\middlelinesettings +\set@p@emtitle{#1}{\relax}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\nobreak}{\titleindentamount}% +\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont}% +{\contentsindentfouramount}% +\t@xtnotesinfo{#1}% +\restoresinglelinesettings +} +\newcommand{\poemsectiontitlelastline}[1]{% +\lastlinesettings +\set@p@emtitle{#1}{\par\nobreak}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\afterpoemtitleskip\nobreak}% +{\titleindentamount}% +\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont}% +{\contentsindentfouramount}% +\t@xtnotesinfo{#1}% +\restoresinglelinesettings +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \begin{macro}{\poemsectiontitlenocontents} +% \begin{macro}{\poemsectionbaretitle} +% \begin{macro}{\poemsubsectiontitle} +% \begin{macro}{\poemtitlenotitle} +% \begin{macro}{\poemtitlenotitleitalic} +% \begin{macrocode} +\newcommand{\poemsectiontitlenocontents}[1]{% + \sequencesubsectiontitlenocontents{#1}}% +\newcommand{\poemfirstsectiontitle}[1]{% +\set@p@emtitle{#1}{\par\nobreak}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindentamount}% +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}% +{\contentsindentthreeamount}% +\t@xtnotesinfo{#1}% +} +\newcommand{\poemfirstsectiontitlebaretitle}[1]{% +\set@p@emtitle{#1}{\par\nobreak}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindentamount}} +\newcommand{\poemsectiontitlebaretitle}[1]{% +\set@p@emtitle{#1}{\poemtitlepenalty}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindentamount}% +} +\newcommand{\poemsubsectiontitle}[1]{% +\set@p@emtitle{#1}{\poemtitlepenalty}{\subsectiontitlefont}% +{\titleindent\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindenttwoamount}% +\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont}% +{\contentsindentfouramount}% +\t@xtnotesinfo{#1}% +} +\newcommand{\poemtitlenotitle}[1]{% +\m@kep@emlabel +\m@ken@teholder{#1}% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +\t@xtnotesinfo{#1}% +} +\newcommand{\poemtitlenotitleitalic}[2]{% +\poemtitlenotitle{1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \subsubsection{Poetic Sequences: Setting the Main Title} +% \begin{macro}{\sequencetitle} +% Variants here for multiple line titles and titles with font +% commands. Also some all-purpose kludges to work around other problems. +% \begin{macrocode} +\newcommand{\sequencetitle}[1]{ +\set@p@emtitle{#1}{\sequencetitlepenalty}{\sequencetitlefont} +{\relax}{\nobreak\par\nobreak\aftersequencetitleskip\nobreak}{\z@} +\putpagenumberincontentsfalse +\c@ntentsinfo{#1}{\contentsindentone}{\contentssequencetitlefont} +{\contentsindenttwoamount} +\putpagenumberincontentstrue +\t@xtnotesinfo{#1} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\sequencetitlefirstline} +% \begin{macro}{\sequencetitlemiddleline} +% \begin{macro}{\sequencetitlelastline} +% To set the title of a poetic sequence if it requires several lines +% to do so. +% \begin{macrocode} +\newcommand{\sequencetitlefirstline}[1]{ +\firstlinesettings +\set@p@emtitle{#1}{\multilinesequencepenalty}{\sequencetitlefont} +{\relax}{\nobreak\par\nobreak}{\z@} +\c@ntentsinfo{#1}{\contentsindentone}{\contentssequencetitlefont} +{\contentsindenttwoamount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +\newcommand{\sequencetitlemiddleline}[1]{ +\middlelinesettings +\set@p@emtitle{#1}{\par\nobreak}{\sequencetitlefont} +{\relax}{\nobreak\par\nobreak}{\z@} +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentssequencetitlefont} +{\contentsindentthreeamount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +\newcommand{\sequencetitlelastline}[1]{ +\lastlinesettings +\set@p@emtitle{#1}{\par\nobreak}{\sequencetitlefont} +{\relax}{\nobreak\par\aftersequencetitleskip\nobreak}{\z@} +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentssequencetitlefont} +{\contentsindentthreeamount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \subsubsection{Sections of poetic sequences} +% \begin{macro}{\sequencesectiontitle} +% First, the easy case: a simple section of a poetic sequence. +% \begin{macrocode} +\newcommand{\sequencesectiontitle}[1]{ +\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentamount} +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont} +{\contentsindentthreeamount} +\t@xtnotesinfo{#1} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\sequencefirstsectiontitle} +% The first poem in a sequence is a special case. +% \begin{macrocode} +\newcommand{\sequencefirstsectiontitle}[1]{ +\set@p@emtitle{#1}{\par\nobreak\afterpoemtitleskip}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentamount} +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont} +{\contentsindentthreeamount} +\t@xtnotesinfo{#1} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\sequencesectiontitlenonotes} +% If you don't have any notes on a sequence section, it seems a shame +% to open an entry in the textual notes for that section: +% \begin{macrocode} +\newcommand{\sequencetitlenonotes}[1]{ +\set@p@emtitle{#1}{\par\nobreak}{\sequencetitlefont} +{\relax}{\nobreak\par\aftersequencetitleskip\nobreak}{\z@} +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentssequencetitlefont} +{\contentsindentthreeamount} +%\t@xtnotesinfo{#1} +} +\newcommand{\sequencesectiontitlenonotes}[1]{ +\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentamount} +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont} +{\contentsindentthreeamount} +%\t@xtnotesinfo{#1} +} +% \end{macrocode} +% \end{macro} +% For multiple line titles of sequence sections +% \begin{macrocode} +\newcommand{\sequencesectiontitlefirstline}[1]{ +\firstlinesettings +\set@p@emtitle{#1}{\multilinetitlepenalty}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak}{\titleindentamount} +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont} +{\contentsindentthreeamount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +\newcommand{\sequencesectiontitlemiddleline}[1]{ +\middlelinesettings +\set@p@emtitle{#1}{\par\nobreak}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak}{\titleindentamount} +\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont} +{\contentsindentfouramount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +\newcommand{\sequencesectiontitlelastline}[1]{ +\lastlinesettings +\set@p@emtitle{#1}{\par\nobreak}{\poemtitlefont} +{\titleindent}{\nobreak\par\afterpoemtitleskip\nobreak}{\titleindentamount} +\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont} +{\contentsindentfouramount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +% \end{macrocode} +% The following macros are +% to kludge around situations where the section title is just a number. This +% macro has two arguments. Originally, the first was the title of the section. +% The second is the title of the sequence as a whole. I've retained +% the second argument for backward compatibility with earlier versions, but +% you can set it to anything, since it's discarded now. +% \begin{macrocode} +\newcommand{\sequencefirstsectiontitlenocontents}[2]{ +\set@p@emtitle{#1}{\par\nobreak\afterpoemtitleskip}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentamount} +%\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont} +\t@xtnotesinfo{#1} +} +\newcommand{\sequencesectiontitlenocontents}[2]{ +\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentamount} +%\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont} +\t@xtnotesinfo{#1} +} +% \end{macrocode} +% If the first section of a sequence is a multiple line title, the +% following macros can handle the special problems that situation poses. +% \begin{macrocode} +\newcommand{\sequencefirstsectiontitlefirstline}[1]{ +\firstlinesettings +\set@p@emtitle{#1}{\par\nobreak\afterpoemtitleskip}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentamount} +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont} +{\contentsindentthreeamount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +\newcommand{\sequencefirstsectiontitlemiddleline}[1]{ +\sequencesectiontitlemiddleline{#1}} + +\newcommand{\sequencefirstsectiontitlelastline}[1] +{\sequencesectiontitlelastline{#1}} + +\newcommand{\sequencefirstsectiontitlenonotes}[1]{ +\set@p@emtitle{#1}{\par\nobreak\afterpoemtitleskip}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentamount} +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont} +{\contentsindentthreeamount} +%\t@xtnotesinfo{#1} +} +% \end{macrocode} + +% \begin{macro}{\sequencesectionsubtitle} +% \begin{macro}{\poemsubtitle} +% \begin{macrocode} +% \newcommand{\sequencesectionsubtitle}[1]{{\subsectiontitlefont \hbox{\titleindent #1}} +% \nobreak\par\nobreak\afterpoemtitleskip\nobreak +% } +\newcommand{\sequencesectionsubtitle}[1]{\set@p@emtitle{#1}{\par\nobreak\afterpoemtitleskip} +{\subsectiontitlefont}{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\titleindentamount} +} +\newcommand{\poemsubtitle}[1]{\sequencesectionsubtitle{#1} +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% Another (former) kludge for special situations: +% \begin{macrocode} +\newcommand{\sequencesectiontitleitalicnonotes}[2] +{\sequencesectiontitlenonotes{#1} +} +% \end{macrocode} +% Italic titles used to require two arguments. These commands +% are retained only for backward compatibility. +% +% \begin{macro}{\sequencesectiontitleitalic} +% \begin{macrocode} +\newcommand{\sequencesectiontitleitalic}[2]{ +\sequencesectiontitle{#1}} +\newcommand{\sequencesectiontitlefirstlineitalic}[2] +{\sequencesectiontitlefirstline{#1}} +\newcommand{\sequencesectiontitlebaretitle}[1]{ +\set@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont} +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\titleindentamount} +} +% \end{macrocode} +% \end{macro} + + + +% \subsubsection{Subsections of sequences} +% \begin{macro}{\sequencesubsectiontitle} + +% Continuing several levels down: macros for setting subsections and +% subsubsections of sequences. +% \begin{macrocode} +\newcommand{\sequencesubsectiontitle}[1]{ +\set@p@emtitle{#1}{\poemtitlepenalty}{\subsectiontitlefont} +{\titleindent\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindenttwoamount} +\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont} +{\contentsindentfouramount} +\t@xtnotesinfo{#1} +} +\newcommand{\sequencesubsectiontitlenocontents}[1]{ +\set@p@emtitle{#1}{\poemtitlepenalty}{\subsectiontitlefont} +{\titleindent\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindenttwoamount} +%\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont}{\contentsindentfouramount} +\t@xtnotesinfo{#1} +} +\newcommand{\sequencefirstsubsectiontitle}[1] +{\set@p@emtitle{#1}{\par\nobreak}{\subsectiontitlefont} +{\titleindent\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindenttwoamount} +\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont} +{\contentsindentfouramount} +\t@xtnotesinfo{#1} +} +\newcommand{\sequencefirstsubsectiontitlenocontents}[1] +{\set@p@emtitle{#1}{\par\nobreak}{\subsectiontitlefont} +{\titleindent\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindenttwoamount} +%\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont} +%{\contentsindentfouramount} +\t@xtnotesinfo{#1} +} +\newcommand{\sequencesubsectiontitlefirstline}[1]{ +\firstlinesettings +\set@p@emtitle{#1}{\multilinetitlepenalty}{\subsectiontitlefont} +{\titleindent\titleindent}{\nobreak\par\nobreak}{\titleindenttwoamount} +\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont} +{\contentsindentfouramount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +\newcommand{\sequencesubsectiontitlemiddleline}[1]{ +\middlelinesettings +\set@p@emtitle{#1}{\nobreak}{\subsectiontitlefont} +{\titleindent\titleindent}{\nobreak\par\nobreak}{\titleindenttwoamount} +\c@ntentsinfo{#1}{\contentsindentfour}{\contentspoemtitlefont} +{\contentsindentfiveamount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +\newcommand{\sequencesubsectiontitlelastline}[1]{ +\lastlinesettings +\set@p@emtitle{#1}{\nobreak}{\subsectiontitlefont} +{\titleindent\titleindent}{\nobreak\par\afterpoemtitleskip\nobreak} +{\titleindenttwoamount} +\c@ntentsinfo{#1}{\contentsindentfour}{\contentspoemtitlefont} +{\contentsindentfiveamount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +\newcommand{\sequencesubsubsectiontitle}[1]{ +\set@p@emtitle{#1}{\poemtitlepenalty}{\subsectiontitlefont} +{\titleindent\titleindent\titleindent} +{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentthreeamount} +\c@ntentsinfo{#1}{\contentsindentfour}{\contentspoemtitlefont} +{\contentsindentfiveamount} +\t@xtnotesinfo{#1} +} +\newcommand{\sequencesubsubsectiontitlenocontents}[1]{ +\set@p@emtitle{#1}{\poemtitlepenalty}{\subsectiontitlefont} +{\titleindent\titleindent\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentthreeamount} +%\c@ntentsinfo{#1}{\contentsindentfour}{\contentspoemtitlefont} +%{\contentsindentfiveamount} +\t@xtnotesinfo{#1} +} +\newcommand{\sequencefirstsubsubsectiontitlenocontents}[1]{ +\set@p@emtitle{#1}{\nobreak\par\nobreak}{\subsectiontitlefont} +{\titleindent\titleindent\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak} +{\titleindentthreeamount} +%\c@ntentsinfo{#1}{\contentsindentfour}{\contentspoemtitlefont}{\contentsindentfiveamount} +\t@xtnotesinfo{#1} +} + + +\newcommand{\sequencefirstsubsectiontitlefirstline}[1]{ +\firstlinesettings +\set@p@emtitle{#1}{\par\nobreak}{\subsectiontitlefont} +{\titleindent\titleindent}{\nobreak\par\nobreak}{\titleindenttwoamount} +\c@ntentsinfo{#1}{\contentsindentthree}{\contentspoemtitlefont} +{\contentsindentfouramount} +\t@xtnotesinfo{#1} +\restoresinglelinesettings +} +\newcommand{\sequencefirstsubsectiontitlemiddleline}[1]{ +\sequencesubsectiontitlemiddleline{#1}} +\newcommand{\sequencefirstsubsectiontitlelastline}[1]{ +\sequencesubsectiontitlelastline{#1}} +% \end{macrocode} +% \end{macro} + +% Interjections in sequences, as in Robert Penn Warren's \emph{Or Else}. +% \begin{macrocode} +\newcommand{\interjectiontitlefirstline}[1]{ +\sequencefirstsubsectiontitlefirstline{#1}} +\newcommand{\interjectiontitlelastline}[1]{ +\sequencefirstsubsectiontitlelastline{#1} +} +\newcommand{\interjectiontitlemiddleline}[1]{ +\sequencefirstsubsectionmiddleline{#1} +} +% \end{macrocode} +% \begin{macro}{\setmargpoemtitle} +% Titles with a marginal reference to the notes giving the page in +% the notes where a comment on the poem appears, as in Altenberg's +% Heredia edition.\label{JHpoemtitle} |\setmargpoemtitle| takes as +% its second argument anything you want to add to the line while the +% title is being processed. |\JHpoemtitle| is just +% |\setmargpoemtitle| with the second argument passed to |\JHlabel|, +% which actually makes the marginal mark. +% \begin{macrocode} +\newcommand{\set@margp@emtitle}[7]{\setlength{\titleentryoverrun}{#6}% +{#2}% +{#3 \begin{titleentryenvironment}% +{\ifcentertitleson\begin{center}#4 #1 #7\end{center}\else #4 #1 +#7\fi}\end{titleentryenvironment}}% +{#5}% +\m@kep@emlabel% +\m@ken@teholder{#1}% +\setlength{\titleentryoverrun}{\z@}} + +\newcommand{\setmargpoemtitle}[2]{% +\set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}{#2}% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +\t@xtnotesinfo{#1}% +\sources{\label{#2}}% +} +%\newcommand{\set@margp@emtitle}[7]{\setlength{\titleentryoverrun}{#6}% +%{#2}% +%{#3 \begin{titleentryenvironment}% +%{#4 #1 #7}\end{titleentryenvironment}}% +%{#5}% +%\m@kep@emlabel% +%\m@ken@teholder{#1}% +%\setlength{\titleentryoverrun}{\z@}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\JHpoemtitle} Macros to set marginal line +% references. +% \begin{macrocode} +% \newcommand{\JHpoemtitle}[2]{% +% \setmargpoemtitle{#1}{\JHlabel{#2}}% +% } +\newcommand{\JHpoemtitle}[2]{% +\set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +{\JHlabel{#2}}% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +\t@xtnotesinfo{#1}% +\sources{\label{#2}}% +} +\newcommand{\JHprosesectiontitle}[2]{% +\set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +{\JHlabel{#2}}% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +\t@xtnotesinfo{#1}% +\sources{\label{#2}}% +} +\newcommand{\JHlabel}[1]{% +\marginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\JHsequencetitle} Macros to set marginal page +% references for sequences, sequence sections, poem sections, poem +% subtitles, dedications, and epigraphs. +% \begin{macrocode} +\newcommand{\JHsequencetitle}[2]{% +\set@margp@emtitle{#1}{\sequencetitlepenalty}{\sequencetitlefont}% +{\relax}{\nobreak\par\nobreak\aftersequencetitleskip\nobreak}{\z@}% +{\JHlabel{#2}}% +\putpagenumberincontentsfalse% +\c@ntentsinfo{#1}{\contentsindentone}{\contentssequencetitlefont}% +{\contentsindenttwoamount}% +\putpagenumberincontentstrue% +\t@xtnotesinfo{#1}% +\sources{\label{#2}}% +} +\newcommand{\JHsequencesectiontitle}[2]{% +\set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindentamount}{\JHlabel{#2}}% +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}% +{\contentsindentthreeamount}% +\t@xtnotesinfo{#1}% +\sources{\label{#2}}% +} +\newcommand{\JHsequencefirstsectiontitle}[2]{% +\set@margp@emtitle{#1}{\par\nobreak\afterpoemtitleskip}{\poemtitlefont}% +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindentamount}{\JHlabel{#2}}% +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}% +{\contentsindentthreeamount}% +\t@xtnotesinfo{#1}% +\sources{\label{#2}}% +} +\newcommand{\JHpoemsectiontitle}[2]{% +\set@margp@emtitle{#1}{\poemtitlepenalty}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindentamount}{\JHlabel{#2}}% +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}% +{\contentsindentthreeamount}% +\t@xtnotesinfo{#1}% +\sources{\label{#2}}% +} +\newcommand{\JHpoemfirstsectiontitle}[2]{% +\set@margp@emtitle{#1}{\par\nobreak}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindentamount}{\JHlabel{#2}}% +\c@ntentsinfo{#1}{\contentsindenttwo}{\contentspoemtitlefont}% +{\contentsindentthreeamount}% +\t@xtnotesinfo{#1}% +\sources{\label{#2}}% +} +\newcommand{\JHsequencesectionsubtitle}[2]{% +\set@margp@emtitle{#1}{\par\nobreak}{\subsectiontitlefont}% +{\titleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}% +{\titleindentamount}{\JHlabel{#2}}% +\sources{\label{#2}}% +} +\newcommand{\JHpoemsubtitle}[2]{\JHsequencesectionsubtitle{#1}{#2} +} +\newcommand{\JHdedication}[2]{\nopagebreak\afterpoemtitleskip\testforcenterepigraph% +\begin{epigraphquote}% +\emph{#1}\JHlabel{#2}\end{epigraphquote}% +\sources{\label{#2}}\afterpoemtitleskip\nopagebreak} +\newcommand{\JHepigraph}[2]{\nopagebreak\afterpoemtitleskip\testforcenterepigraph% +\begin{epigraphquote}% +\emph{#1}\JHlabel{#2}\end{epigraphquote}% +\sources{\label{#2}}\afterpoemtitleskip\nopagebreak} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\backmattersectiontitle} Macros to set the titles of back matter sections +% such as textual notes. +% +% \begin{macrocode} +\newcommand{\backmattersectiontitle}[1]{% +\set@p@emtitle{#1}{\poemtitlepenalty}{\volumetitlefont}% +{\relax}{\backmattersink}{\z@}% +\c@ntentsinfo{#1}{contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +\t@xtnotesinfo{#1} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\margreftextnote} Macros to set marginal page +% references showing where in the apparatus a comment upon the +% marked line is to be found. |\margrefspecial{}| is for occasions +% when you might need to set the label by hand. For instance, suppose +% you have several textnotes on a line, and the note you wish to draw +% attention to is on a different page from the other notes. +% |\margreftextnote| under those circumstances will point only to the +% first note. Use |\margrefspecial| to point to the other note, +% giving |\margrefspecial| a unique argument, and opening that note +% with a \label{} command using the same argument. +% +% \begin{macrocode} +\newcounter{margrefnumber} +\setcounter{margrefnumber}{1} +\newtoks{\margrefmarker} +\margrefmarker={\dag} +\newcommand{\setmargrefmarker}[1]{\margrefmarker={#1}} +\newcommand{\makemargreflabel}{\string\label\string{margref\themargrefnumber\string}} +\newif{\ifmargrefstomargin} +\margrefstomarginfalse +\newcommand{\setmargref} +{\marginpar{\ifmargrefstomargin\hspace*{.5\leftmargin}\fi\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}} +} +% \newcommand{\setmargref} +% {\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}} +% } +\newcommand{\margreftextnote}{% +\iftextnoteson\addtocounter{margrefnumber}{1}% +\immediate\write\textnotes{\makemargreflabel}% +\setmargref\else\relax\fi% +} +\newcommand{\margrefexplanatory}{% +\ifexplanon\addtocounter{margrefnumber}{1}% +\immediate\write\explanations{\makemargreflabel}% +\setmargref\else\relax\fi% +} +\newcommand{\margrefemendation}{% +\ifemendationson\addtocounter{margrefnumber}{1}% +\immediate\write\emendations{\makemargreflabel}% +\setmargref\else\relax\fi% +} +\newcommand{\margrefspecial}[1]{% +\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{#1}}} +} +% \end{macrocode} +% \end{macro} +% To change other title making commands to produce titles which add +% something while processing the title, you should: 1. add one to +% the number of arguments it uses 2. replace the use of +% |\set@p@emtitle| with |\set@margp@emtitle| 3. add |{#2}| or +% |\JHlabel{#2}| or whatever as the +% last (seventh) argument to |\set@margp@emtitle|. So, to change +% |\sequencetitle{}| to |\JHsequencetitle{}{}| start with: +% \begin{verbatim} +% \newcommand{\sequencetitle}[1]{ +% \set@p@emtitle{#1}{\sequencetitlepenalty}{\sequencetitlefont} +% {\relax}{\nobreak\par\nobreak\aftersequencetitleskip\nobreak}{\z@} +% \putpagenumberincontentsfalse +% \c@ntentsinfo{#1}{\contentsindentone}{\contentssequencetitlefont} +% {\contentsindenttwoamount} +% \putpagenumberincontentstrue +% \t@xtnotesinfo{#1} +% } +% \end{verbatim} +% and change it to +% \begin{verbatim} +% \catcode`\@=11 +% \newcommand{\JHsequencetitle}[2]{ +% \set@margp@emtitle{#1}{\sequencetitlepenalty}{\sequencetitlefont} +% {\relax}{\nobreak\par\nobreak\aftersequencetitleskip\nobreak}{\z@} +% {\JHlabel{#2}}\putpagenumberincontentsfalse +% \c@ntentsinfo{#1}{\contentsindentone}{\contentssequencetitlefont} +% {\contentsindenttwoamount} +% \putpagenumberincontentstrue +% \t@xtnotesinfo{#1} +% } +% \catcode`\@=12 +% \end{verbatim} +% \subsection{~Epigraphs, headnotes, attributions, dedications} +% Notice that epigraphs to volumes are handled differently from +% epigraphs to poems. +% \begin{macro}{\epigraph} +% \begin{macro}{\headnote} +% \begin{macro}{\attribution} +% \begin{macro}{\poemdedication} +% \begin{macro}{\volumededication} +% \begin{macro}{\volumeepigraph} +% \begin{macro}{\volumeattribution} +% \begin{macrocode} +\newif\ifcenterepigraphson +\centerepigraphsonfalse +\newlength{\centerepigraphindentation} +\setlength{\centerepigraphindentation}{6em} +\newlength{\normalepigraphindentation} +\setlength{\normalepigraphindentation}{1.5em} +\newcommand{\centerepigraphquote}{% +\setlength{\epigraphquoteleftmargin}{\centerepigraphindentation} +\setlength{\epigraphquoterightmargin}{\centerepigraphindentation} +} +\newcommand{\normalepigraphquote}{% +\setlength{\epigraphquoteleftmargin}{\normalepigraphindentation} +\setlength{\epigraphquoterightmargin}{\normalepigraphindentation} +} +\newcommand{\testforcenterepigraph}{\ifcenterepigraphson% +\centerepigraphquote +\else +\normalepigraphquote +\fi} +\newcommand{\epigraph}[1]{\nopagebreak\afterpoemtitleskip\testforcenterepigraph% +\begin{epigraphquote}% + \emph{#1}\end{epigraphquote}\afterpoemtitleskip\nopagebreak} +\newcommand{\headnote}[1]{\epigraph{#1}} +\newcommand{\attribution}[1]{\nopagebreak\afterpoemtitleskip\testforcenterepigraph% +\begin{epigraphquote}% + {\small\emph{#1}}\end{epigraphquote}\afterpoemtitleskip\nopagebreak} +\newcommand{\poemdedication}[1]{\nopagebreak\afterpoemtitleskip\testforcenterepigraph% +\begin{epigraphquote}% + \emph{#1}\end{epigraphquote}\afterpoemtitleskip\nopagebreak} +\providecommand{\dedication}[1]{\poemdedication{#1}} +\newcommand{\volumededication}[1]{\par\bigskip\begin{volumetitlepagequote} + \emph{#1}\end{volumetitlepagequote}} +\newcommand{\volumeepigraph}[1]{\par\bigskip\begin{volumetitlepagequote} + \emph{#1}\end{volumetitlepagequote}} +\newcommand{\volumeattribution}[1]{\par\smallskip\begin{volumetitlepagequote} + {\small \emph{#1}}\end{volumetitlepagequote}} + \newenvironment{epigraphenvironment}{\nopagebreak\afterpoemtitleskip\testforcenterepigraph% +\begin{epigraphquote}\em}{\end{epigraphquote}\afterpoemtitleskip\nopagebreak} +\newlength{\dateindent}% +\setlength{\dateindent}{\leftmargin}% +\newcommand{\variabledateindent}{% +\setlength{\dateindent}{\linewidth}% +\addtolength{\dateindent}{-\versewidth}% +\addtolength{\dateindent}{-.5\dateindent}} +%\newcommand{\poemdate}[1]{\bigskip\begin{raggedleft}\hspace{\dateindent}#1\end{raggedleft}\bigskip}% +\newcommand{\poemdate}[1]{\iflastpoemcentered\variabledateindent% +\else\setlength{\dateindent}{\leftmargin}% +\fi% +\bigskip\begin{raggedleft}\hspace{\dateindent}#1\end{raggedleft}\bigskip}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \subsection{~Tools used for making note sections} \label{notetools} The main tool is +% a dirty trick borrowed from John Lavagnino's package for endnotes, +% \textsf{endnotes}, which allows for writing out literal characters to an +% external file. The trick involves redefining the space character as +% the newline character and treating the text of the note as the body of +% a macro that |\meaning| specifies. The result is that the text is +% written to the external file in a long ribbon one word wide. +% \begin{macrocode} +\def\strip#1>{} +\newcommand{\literaltextnote}[1]{\iftextnotesatend + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\textnotes{\expandafter\strip\meaning\next}% + \endgroup\fi + } +\newcommand{\literalemend}[1]{\ifemendationsatend + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\emendations{\expandafter\strip\meaning\next}% + \endgroup\fi +} +\newcommand{\literalexplain}[1]{\ifexplanatend + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\explanations{\expandafter\strip\meaning\next}% + \endgroup\fi +} +\newcommand{\literalcontents}[1]{\ifpoemcontentson + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\poemcontents{\expandafter\strip\meaning\next}% + \endgroup\fi +} +\newcommand{\literaltextnoteshort}[1]{ +\iftextnotesatend + \begingroup + \def\next{#1}% + \immediate\write\textnotes{\expandafter\strip\meaning\next}% + \endgroup\fi} +\newcommand{\literalemendshort}[1]{\ifemendationsatend + \begingroup + \def\next{#1}% + \immediate\write\emendations{\expandafter\strip\meaning\next}% + \endgroup\fi} +\newcommand{\literalexplainshort}[1]{\ifexplanatend + \begingroup + \def\next{#1}% + \immediate\write\explanations{\expandafter\strip\meaning\next}% + \endgroup\fi} +\newcommand{\literalcontentsshort}[1]{\ifpoemcontentson + \begingroup + \immediate\write\poemcontents{\expandafter\strip\meaning\next}% + \endgroup\fi} +\newcommand{\sameword}{$\sim$} +\newcommand{\missingpunct}{${}_{\wedge}$} +% \end{macrocode} +% \begin{macro}{\pmccheckifinteger} +% |\pmccheckifinteger{|\meta{num}|}| checks if \meta{num} is an integer. +% If it is, then |\ifinteger| is set TRUE, otherwise it is set FALSE. +% (Code taken from memoir class, and based on Donald Arseneau's +% |\Lpack{cite}| package). +% \begin{macrocode} +\newcommand{\pmccheckifinteger}[1]{% + \protected@edef\@vsa{#1}% + \ifcat _\ifnum9<1\pmcgobm{#1} _\else A\fi + \integertrue% + \else + \integerfalse% + \fi% +} +\newif\ifinteger +% \begin{macro}{\pmcgobm} +% |\pmcgobm{|\meta{num}|}| is defined as \meta{num}. It could be defined as: \\ +% |\newcommand{\pmcgobm}[1]{\ifx-#1\expandafter\gobm\else#1\fi}| \\ +% which would remove a leading minus sign (hyphen) from its argument +% (|gobm| = gobble minus sign). +% (Code from memoir class and a posting to comp.text.tex by Donald Arseneau on 1997/07/21). +% \begin{macrocode} +\newcommand{\pmcgobm}[1]{#1} +% \end{macrocode} +% \end{macro} +% \subsection{~Commands to make notes and send info to contents} +% \begin{macro}{\setlemmarange} +% |\setlemmarange| calculates the range of line numbers for multi-line +% lemmas. +% \begin{macrocode} +% \newcommand{\setlemmarange}[1]{ +% \setcounter{lemmalines}{#1} +% \ifthenelse{\equal{\value{lemmalines}}{0}}{\rangelemmafalse}{\rangelemmatrue} +% \setcounter{lemmaend}{\theverselinenumber} +% \addtocounter{lemmaend}{\thelemmalines} +% } +\newcommand{\setlemmarange}[1]{% +\pmccheckifinteger{#1}% +\ifinteger +\setcounter{lemmalines}{#1}% +\ifthenelse{\equal{\value{lemmalines}}{0}}{\rangelemmafalse}{\rangelemmatrue}% +\setcounter{lemmaend}{\theverselinenumber}% +\addtocounter{lemmaend}{\thelemmalines}% +\else +\setcounterfromref{lemmaend}{#1}\rangelemmatrue +\fi +\makeatother} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\citerange} +% |\citerange| sets the range of line numbers for multi-line lemmas +% \begin{macrocode} +\newcommand{\citerange}{% +\ifrangelemma +\theverselinenumber --\thelemmaend +\else +\theverselinenumber +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\resetlemmacounters} +% |\resetlemmacounters| resets the counts for multiline lemmas. +% \begin{macrocode} +\newcommand{\resetlemmacounters}{\rangelemmafalse +\setcounter{lemmalines}{0}% +\setcounter{lemmaend}{0}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\checknoteheaders} +% |\checknoteheaders| Checks and corrects the values in the running +% headers of notes sections. The running headers are of the form +% ``Notes to pages xx--yy.'' Every title and every note checks +% whether the values in the running header should be changed. This +% command essentially gives a list of strings to be written on the +% external file for the note section. When these strings are read +% back in when the file is set, they make a little program that +% recalculates the values in the headers during the processing of +% every note. Also typesets the line number or line number range in +% notes sections. +% \begin{macrocode} +\newcommand{\checknoteheaders}{\string\setcounter\string{notepageholdernote\string}% +\string{\thepage\string}\string\ifhmode\string\unskip\string\fi% +\string\ifthenelse\string{\string\value\string{notepageholdernote\string}>% +\string\value\string{notepageholdertitle\string}\string}% +\string{\string\mark\string{\string\thenotepageholdernote\string}\string}% +\string{\string\mark\string{\string\thenotepageholdertitle\string}\string}\string\unskip +\string\unskip\string\relax\ \citerange :\string~\string\nolinebreak}% + +% \end{macrocode} +% \end{macro} +% \begin{macro}{\textnote} +% The +% basic |\textnote{}| command, on which everything else is based, has +% several parts. First, it writes out a little program +% on the external endnotes file which, when it is read back in when +% the endnotes are typeset, sets a variable with the value of +% the page of the line the note is commenting upon and checks to see +% whether that value is equal to or greater than that of previous notes +% on that page of notes. Depending upon the outcome of that test, it +% sets the value of |\mark| with the correct numbers to print the proper +% running header of the form ``Textual Notes to pp.xx--yy.'' Second, it +% sends the line number of the line it is a comment upon and the text of +% the note to the notes section. The optional first argument is the +% number of lines covered by a multiline lemma. If there is no +% optional first argument specified, the default is 0. The second +% argument is the text of the note, which includes the rest of the +% lemma, other than the line number. It is up to you to suitably +% abbreviate long lemmas. +% +% +% +% \begin{macrocode} +\newif\iftextnotessinglepar +\newcommand{\textnote}[2][0]{% +\iftextnoteson + \setlemmarange{#1}% +\immediate\write\textnotes{\checknoteheaders}% + \literaltextnote{#2}% + \iftextnotessinglepar% + \literaltextnote{\par}% + \fi% + \fi +\resetlemmacounters +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\accidental} +% Accidentals: As it is, the command just tests to see whether +% accidentals are being included or not, and sets the accidental as a +% textnote if accidentals are being included. It would not be hard to +% divert accidentals to another external file in order to compile a +% separate list of accidentals. Accidentals, by their nature, cannot have multiline +% lemmas. +% \begin{macrocode} +\newcommand{\accidental}[1]{% +\iftextnoteson% + \ifincludeaccidentals% + \iftextnotesatend\immediate\write\textnotes{\string\nobreak}\fi% +\textnote{#1}% +\iftextnotesatend\immediate\write\textnotes{\string\nobreak}\fi% + \iftextnotessinglepar% + \literaltextnote{\par}% + \fi% + \fi\fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\tsvariant} +% \begin{macro}{\tsaccidental} +% Typescript variants. Treated like accidentals. If they are being +% collected, they are sent to the textual notes. Again, it would not be +% hard to collect them separately. Typescript variants can have +% multiline lemmas. +% \begin{macrocode} +\newcommand{\tsvariant}[2][0]{% +\iftextnoteson + \ifincludetypescripts% + \iftextnotesatend\immediate\write\textnotes{\string\nobreak}\fi% +\textnote[#1]{#2}% +\iftextnotesatend\immediate\write\textnotes{\string\nobreak}\fi% + \fi\fi +} +\newcommand{\tsaccidental}[1]{\iftextnoteson\ifincludetypescripts\accidental{#1}\fi\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{macro}{\tsentry} +% Typescript entries. Allows one to to selectively include or exclude +% typescript entries from lists of variants. If an entry begins with +% a comma (as it commonly will, since it will typically be a member +% of a list of entries, you need not put |\unskip| before the comma, +% since \textsf{poemscol} will do it for you. Thanks to Donald +% Arseneau for suggesting how to do this. +% \begin{macrocode} +\newcommand{\tsentry}[1]{\iftextnoteson\ifincludetypescripts{\@ifnextchar,{\unskip}{% +Ê\@ifnextchar;{\unskip}{}% +}#1}\fi\fi\unskip} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\sources} +% |\sources{}| is essentially a |\textnote{}| with no line number +% and no page checking. Useful for typesetting the sources of the text +% (hence the name) and for sending literal characters to the endnotes +% file for other purposes. +% \begin{macrocode} +\newcommand{\sources}[1]{% +\iftextnoteson + \begingroup + \newlinechar='40 + \def\next{#1}% + \immediate\write\textnotes{\expandafter\strip\meaning\next}% + \endgroup + \iftextnotessinglepar% + \literaltextnote{\par}% + \fi% + \fi +} +% \end{macrocode} +% \end{macro} +% +% \subsection{~Emendations and explanatory notes} +% The difference between these kinds of notes and ordinary +% |\textnotes{}| is that they must first test to see whether there have +% been any emendations or explanatory notes for the poem in question. +% If there have not been prior notes, then a new paragraph must be +% opened and the page number and title of the poem set in the note +% section. +% \begin{macro}{\titletoothernotes} +% |\titletoothernotes| sends the page and title information to the +% Emendations or Explanatory Notes sections. It is called only for +% the first emendation or explanatory note for a poem. It is designed +% so that if the user wishes to define another category of notes in +% which might not apply to all of the poems to be set --- not all +% poems, for instance, have emendations --- this command can be used +% for those notes as well. +% \begin{macrocode} +\newcommand{\titletoothernotes}{\string\par +\ifputpagenumberinnotes% +\string\argpageref\string{\@compoundlabelscratch\string}% +\string\setcounterfrompageref\string{notepageholdertitle\string}% +\string{\@compoundlabelscratch\string}% +\fi% +\string\textbf\string{\ \the\fulltitleholder\string}}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\emendation} +% \begin{macrocode} +\newif\ifemendationssinglepar +\newcommand{\emendation}[2][0]{ +\ifemendationson + \setlemmarange{#1}% + \ifredundantemendations + \iftextnoteson + \ifrangelemma + \textnote[#1]{#2}% + \else + \textnote{#2}% + \fi % ifrangelemma} + \iftextnotessinglepar% + \literaltextnote{\par}% + \fi% iftextnotesinglepar + \fi %iftextnoteson + \fi % ifredundantemendations + \ifnoemendyet % firstemendation + \firstemendation + \fi %noemendyet + \global\noemendyetfalse +\immediate\write\emendations{\checknoteheaders}% + \literalemend{#2}% + \ifemendationssinglepar% + \literalemend{\par}% + \fi% ifemendationssinglepar +\fi % ifemendationson +\resetlemmacounters +} +% \end{macrocode} +% \end{macro} +% This next is an internal command, +% called by |\emendation|. There's no need to use it explicitly. +% \begin{macrocode} +\newcommand{\firstemendation}{\ifemendationsatend +\immediate\write\emendations{\titletoothernotes}\fi +} +% \end{macrocode} +% \begin{macro}{\explanatory} +% Again, |\firstexplanatory| is internal, called by |\explanatory|. +% \begin{macrocode} +\newif\ifexplanationssinglepar +\newcommand{\explanatory}[2][0]{% +\ifexplanon + \setlemmarange{#1}% + \ifnoexplainyet % first explanation + \firstexplanatory + \fi %noexplainyet + \global\noexplainyetfalse +\immediate\write\explanations{\checknoteheaders}% + \literalexplain{#2}% + \ifexplanationssinglepar% + \literalexplain{\par}% + \fi% + \fi % ifexplanon +\resetlemmacounters +} + +\newcommand{\firstexplanatory}{\ifexplanatend +\immediate\write\explanations{\titletoothernotes}\fi +} + +% \end{macrocode} +% \end{macro} +% +% \subsection{~Making new notes sections} +% +% \begin{macro}{\definenewnotetype} This monster macro has nine +% sections, and does all of the things required to set up a new end +% notes section. If you decide to mark a new kind of note in your +% text with, say |\mynote|, but decide at the last moment against +% including those notes in your edition, simply don't issue |\putmynotes| at +% the point it might have appeared, and neither the notes section nor +% the contents entry for it will be included. +% +% \begin{macrocode} +\makeatletter +\long\def\appendtomacro#1#2{% +\begingroup + \toks@\expandafter{#1#2}% + \xdef#1{\the\toks@}% + \endgroup} +\makeatother +\newcommand{\definenewnotetype}[5]{% +% 1. make an if for this kind of note and set it to true by default; +% make an if for the first instance of the command per poem and set it +% to false; make an if for setting the notes in single note +% paragraphs and set it to false; make an if for setting +% these notes in two column mode and set it to false +% +% Thanks to Igor Pechtchanski and Ulrich Schwarz. +\expandafter\newif\csname if#1son\endcsname +\global\csname #1sontrue\endcsname +\expandafter\newif\csname ifno#1yet\endcsname +\csname no#1yettrue\endcsname +\expandafter\newif\csname if#1ssinglepar\endcsname +\csname #1singleparfalse\endcsname +\expandafter\newif\csname if#1stwocol\endcsname +\csname #1stwocolfalse\endcsname +% 2. open a new output stream +\expandafter\newwrite\csname #1s\endcsname +% 3. open a file to associate with the stream +\immediate\expandafter\openout\csname #1s\endcsname=\expandafter\jobname .#2 +% 4. set up a literalwrite command + \expandafter\newcommand\csname literal#1\endcsname[1]{ +\begingroup +\def\next{##1}% +\newlinechar='40 +\immediate\write\expandafter\csname #1s\endcsname{\expandafter\strip\meaning\next}% +\endgroup} +% 5. send heading information to output file +% first, use literaltext to send commands without parameters +\csname literal#1\endcsname{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead{} +\fancyfoot{} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}}} +% then immediate write to send the parameter for the marks in the +% headers +\immediate\write\csname #1s\endcsname{\string\fancyhead[CO]\string{\string{\string\small +\string{\string\em\ #3\string~\string\mymarks\string}\string}\string}} +\immediate\write\csname #1s\endcsname{\string\fancyhead[CE]\string{\string{\string\small +\string{\string\em\ #3\string~\string\mymarks\string}\string}\string}} +% then literal to finish the headers +\csname literal#1\endcsname{\fancyfoot[C]{} +\mark{3} +\backmattersink} +% then immediate write to send the title of the section to print at +% the top of the page +\immediate\write\csname #1s\endcsname{ +\string\setendnotessectiontitle\string{#4\string}\string{#1notes\string}} +% literal write to turn hyphenation on, set the font for the note +% section, and turn on two column mode (if the boolean is set) +\csname literal#1\endcsname{\lefthyphenmin=2\backmatterafterheadersink +\tolerance=500\language=0 +\normalfont \backmattertextfont} +\immediate\write\csname #1s\endcsname{\string\if#1stwocol} +\csname +literal#1\endcsname{\begin{multicols}{2}\fi\setlength{\parindent}{-10pt}}% +% \csname literal#1\endcsname{\setlength}{\parindent}{2}}% problem here +% 6. set up a command to write the page and title of the poem for the first +% instance of this kind of note in a poem +\expandafter\newcommand\csname first#1\endcsname{% +\immediate\write\expandafter\csname #1s\endcsname{\titletoothernotes}% +\immediate\write\csname #1s\endcsname{\string\if#1ssinglepar}% +\immediate\write\csname #1s\endcsname{\string\par}% +\immediate\write\csname #1s\endcsname{\string\fi}% +} +% 7. set up a command to write a note, complete with line numbers +\expandafter\newcommand\csname #1\endcsname[2][0]{% +\setlemmarange{##1}% +\csname ifno#1yet\endcsname% + \csname first#1\endcsname% + \fi% +\global\csname no#1yetfalse\endcsname% +\immediate\write\expandafter\csname +#1s\endcsname{\string\nobreak\string\nobreak\checknoteheaders}% +\csname literal#1\endcsname{##2}% +\csname if#1ssinglepar\endcsname% +\csname literal#1\endcsname{\par}% +\fi% +\resetlemmacounters% +} +% prose version +\expandafter\newcommand\csname prose#1\endcsname[3][0]{% +\unskip\proselinelabel{##2}% +\setproselemmarange{##2}{##1}% +\csname ifno#1yet\endcsname% +\csname first#1\endcsname% +\fi% +\global\csname no#1yetfalse\endcsname% +\immediate\write\expandafter\csname #1s\endcsname{\checkprosenoteheaders}% +\csname literal#1\endcsname{##3}% +\csname if#1ssinglepar\endcsname% +\csname literal#1\endcsname{\par}% +\unskip% +\fi% +\resetlemmacounters\unskip% +} +% pm version +\expandafter\newcommand\csname pm#1\endcsname[2][0]{% + \setpmlemmarange{##1}% + \csname ifno#1yet\endcsname% + \csname first#1\endcsname% + \fi% +\global\csname no#1yetfalse\endcsname% +\immediate\write\expandafter\csname #1s\endcsname{\pmchecknoteheaders\string~}% +\immediate\write\expandafter\csname #1s\endcsname{\pmciterange}% +\csname literal#1\endcsname{##2}% +\csname if#1ssinglepar\endcsname% +\csname literal#1\endcsname{\par}% +\fi% +\pmresetlemmacounters\unskip% +} +% 8. modify the end of the poem environment to reset the first +% command per poem boolean (so that the page and title will be set in +% the notes section when the first note is called for a poem) +% thanks to Heiko Oberdiek +\makeatletter +\appendtomacro{\endpoem}{\global\expandafter\csname no#1yettrue\endcsname} +\makeatother +\makeatletter +\appendtomacro{\endprosesection}{\global\expandafter\csname no#1yettrue\endcsname} +\makeatother +\makeatletter +\appendtomacro{\endpmsection}{\global\expandafter\csname no#1yettrue\endcsname} +\makeatother + +% 9. command for closing the output file +% command for reading in and printing the output file +\expandafter\newcommand\csname put#1s\endcsname{ +\newpage\hyphenationforsmall +\csname if#1stwocol\endcsname% +\csname literal#1\endcsname{\end{multicols}}% +\fi %\iftwocol +\immediate\expandafter\closeout\csname #1s\endcsname +\expandafter\input \jobname.#2 +\ifpoemcontentson + \contentsendnotestitle{#5}{#1notes} +\fi + } +% 10. command for making a marginal mark at a line, giving the page +% number in the apparatus where a note is to be found +\expandafter\newcommand\csname margref#1\endcsname{% +\addtocounter{margrefnumber}{1} +\immediate\write\expandafter\csname #1s\endcsname{\makemargreflabel}% +\setmargref +} +} +% \end{macrocode} +% \end{macro} +% \subsection{~Prose sections}\textsf{poemscol} calls on +% \textsf{lineno} to do all the heavy lifting for making line numbers +% in prose sections and for making endnotes of various kinds for prose +% sections. First, set up a counter for the line number and for the +% modulo line number for prose sections, and set it to equal that used +% in verse sections. Then set the font for marginal line numbers to +% the size used in marginal line numbers in verse sections. +% \begin{macrocode} +\newcounter{proselinenumber} +\setcounter{proselinenumber}{1} +\newcounter{prosemodulo} +\setcounter{prosemodulo}{\value{lineindexrepeat}} +\addtocounter{prosemodulo}{1} +\newcommand{\setprosemodulo}[1]{\modulolinenumbers[#1]} +% \end{macrocode} +% Then commands for setting titles of prose sections. These are just +% versions of |\poemtitle|. Fancier versions will follow if there is +% need. +% \begin{macrocode} +\newcommand{\prosesectiontitle}[1]{\poemtitle{#1}} +\newcommand{\prosesectiontitlenotitle}[1]{\poemtitlenotitle{#1}} +% \end{macrocode} +% Next, environments for prose sections. The environment resets (or +% doesn't, in the second case) the marginal line number. The +% default modulo line number is that prevailing in verse sections, +% but you can change it at will. +% \begin{macrocode} +\setcounter{prosemodulo}{\value{lineindexrepeat}}% +\addtocounter{prosemodulo}{1}% +\ifx\modulolinenumbers\undefined% + \relax\else +\modulolinenumbers[\value{prosemodulo}]% if lineno is called +\fi +\newif\ifinprosesection +\newenvironment{prosesection} +{\inprosesectiontrue\resetlinenumber\begin{linenumbers}% +\renewcommand{\linenumberfont}{\scriptsize}% +\ifnumbersright\rightlinenumbers*\setlength{\linenumbersep}{-\marginparsep}% +%\else\ifnumbersswitch\switchlinenumbers\setlength{\linenumbersep}{\marginparsep}% +\else\ifnumbersswitch\rightlinenumbers*\setlength{\linenumbersep}{-\marginparsep}% +\else\leftlinenumbers*\setlength{\linenumbersep}{\marginparsep}% +\addtolength{\linenumbersep}{5pt}% seems about right +\fi\fi +\noemendyettrue% +\noexplainyettrue% +} +{\end{linenumbers}\inprosesectionfalse} +\newenvironment{prosesectionnoreset} +{\begin{linenumbers}% +\renewcommand{\linenumberfont}{\scriptsize} +\ifnumbersright\rightlinenumbers*\setlength{\linenumbersep}{-\marginparsep}% +%\else\ifnumbersswitch\switchlinenumbers\setlength{\linenumbersep}{\marginparsep}% +\else\ifnumbersswitch\rightlinenumbers*\setlength{\linenumbersep}{-\marginparsep}% +\else\leftlinenumbers*\setlength{\linenumbersep}{\marginparsep}% +\addtolength{\linenumbersep}{5pt}% seems about right +\fi\fi +% \noemendyettrue% +% \noexplainyettrue% +}{\end{linenumbers}} +% \end{macrocode} +% +% Set up commands for notes sections. +% \begin{macro}{\setproselemmastart} +% Finds the line number at the beginning of a lemma. Thanks to Robin +% Fairbairns and Heiko Oberdiek for |\ifrefundefined|. +% Fairbairns version +% \begin{macrocode} +% \newcommand*\ifrefundefined[1] {% +% Ê Ê\expandafter\ifx\csname r@#1\endcsname\relax +% } +% Oberdiek version +\makeatletter +\newcommand*{\ifrefundefined}[1]{% + \expandafter\ifx\csname r@#1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\@extract@ref}[2]{% + \expandafter\expandafter\expandafter#1\csname +r@#2\endcsname{}{}\@nil +} + +\newcommand*{\@extractref}{% + \@extract@ref\@car +} + +\newcommand*{\@extractpageref}{% + \@extract@ref\@secondcar +} + +\long\def\@secondcar#1#2#3\@nil{#2} + +\newcommand*{\setcounterfromref}[2]{% + \ifrefundefined{#2}{% + \protect\G@refundefinedtrue + \@latex@warning{Reference `#2' on page \thepage \space + undefined}% + \setcounter{#1}{0}% + }{% + \setcounter{#1}{\@extractref{#2}}% + }% +} +\newcommand*{\setcounterfrompageref}[2]{% + \ifrefundefined{#2}{% + \protect\G@refundefinedtrue + \@latex@warning{Reference `#2' on page \thepage \space + undefined}% + \setcounter{#1}{0}% + }{% + \setcounter{#1}{\@extractpageref{#2}}% + }% +} +% +\makeatother +\newcommand{\setproselemmastart}[1]{% +\unskip +\setcounterfromref{proselinenumber}{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\setproselemmarange} +% Finds the end of a multi-line lemma. +% \begin{macrocode} +% \newcommand{\setproselemmarange}[2]{% +% \setproselemmastart{#1}% +% \setcounter{lemmalines}{#2}% +% \ifthenelse{\equal{\value{lemmalines}}{0}}{\rangelemmafalse}{\rangelemmatrue}% +% \setcounter{lemmaend}{\theproselinenumber}% +% \addtocounter{lemmaend}{\thelemmalines}\unskip% +% } +\newcommand{\setproselemmarange}[2]{% +\setproselemmastart{#1}% +\pmccheckifinteger{#2}% +\ifinteger +\setcounter{lemmalines}{#2}% +\ifthenelse{\equal{\value{lemmalines}}{0}}{\rangelemmafalse}{\rangelemmatrue}% +\setcounter{lemmaend}{\theproselinenumber}% +\addtocounter{lemmaend}{\thelemmalines}\unskip% +\else +% \ref{#2} +\setcounterfromref{lemmaend}{#2}\rangelemmatrue +\fi\unskip +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\proseciterange} +% Sets the range note for in a multi-line lemma. +% \begin{macrocode} +\newcommand{\proseciterange}{% +\ifrangelemma% +\theproselinenumber --\thelemmaend% +\else% +\theproselinenumber% +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\checkprosenoteheaders} +% Updates running header for note sections. Typesets line number in +% notes. +% \begin{macrocode} +\newcommand{\checkprosenoteheaders}{\string\setcounter\string{notepageholdernote\string}% +\string{\thepage\string}\string\ifhmode\string\unskip\string\fi +\string\ifthenelse\string{\string\value\string{notepageholdernote\string}> +\string\value\string{notepageholdertitle\string}\string}% +\string{\string\mark\string{\string\thenotepageholdernote\string}\string}% +\string{\string\mark\string{\string\thenotepageholdertitle\string}\string}\string\unskip +\string\unskip\string\relax\ \proseciterange :\string~\string\nolinebreak}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\prosetextnote} +% \begin{macrocode} +\newcommand{\proselinelabel}[1]{\ifhmode\unskip\fi\linelabel{#1}} +\newcommand{\prosetextnote}[3][0]{% +\iftextnoteson% +\unskip\proselinelabel{#2}% +\setproselemmarange{#2}{#1}% +\immediate\write\textnotes{\checkprosenoteheaders}% +\literaltextnote{#3}% +\iftextnotessinglepar% +\literaltextnote{\par}% +\fi% +\resetlemmacounters% +\fi\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\proseemendation} +% Notice that it calls |\firstemendation| as usual. +% \begin{macrocode} +\newcommand{\proseemendation}[3][0]{% +\ifemendationson% +\unskip\proselinelabel{#2}% +\setproselemmarange{#2}{#1}% + \ifredundantemendations + \iftextnoteson + \ifrangelemma + \prosetextnote[#1]{#2}{#3}% + \else + \prosetextnote{#2}{#3}% + \fi % ifrangelemma} + \fi %iftextnoteson +\iftextnotessinglepar% +\literaltextnote{\par}% +\fi% iftextnotessinglepar + \fi % ifredundantemendations + \ifnoemendyet % firstemendation + \firstemendation + \fi%noemendyet + \global\noemendyetfalse +\immediate\write\emendations{\checkprosenoteheaders}% + \literalemend{#3}% +\ifemendationssinglepar% +\literalemend{\par}% +\fi% ifemendationssinglep + \resetlemmacounters% +\fi\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\proseexplanatory} +% \begin{macrocode} +\newcommand{\proseexplanatory}[3][0]{% +\ifexplanon% +\unskip\proselinelabel{#2}% +\setproselemmarange{#2}{#1}% + \ifnoexplainyet% firstexplanation + \firstexplanatory% + \fi%noexplainyet + \global\noexplainyetfalse% +\immediate\write\explanations{\checkprosenoteheaders}% + \literalexplain{#3}% +\ifexplanationssinglepar% + \literalexplain{\par}% + \fi% ifexplanationssinglepar + \resetlemmacounters% +\fi\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\proseaccidental} +% \begin{macrocode} +\newcommand{\proseaccidental}[2]{ +\iftextnoteson + \ifincludeaccidentals + \immediate\write\textnotes{\string\nobreak}% +\prosetextnote{#1}{#2}% +\immediate\write\textnotes{\string\nobreak}% + \iftextnotessinglepar% + \literaltextnote{\par}% + \fi% +\fi\fi +} +\newcommand{\prosetsvariant}[3][0]{\iftextnoteson + \ifincludetypescripts + \immediate\write +\textnotes{\string\nobreak}% +\prosetextnote[#1]{#2}{#3}% +\immediate\write\textnotes{\string\nobreak}% + \iftextnotessinglepar% + \literaltextnote{\par}% + \fi% +\fi\fi +} +\newcommand{\prosetsaccidental}[2]{\iftextnoteson +\ifincludetypescripts\proseaccidental{#1}{#2}\fi\fi} +% \end{macrocode} +% \end{macro} +% \subsection{~Annotation by Sentence and Paragraph Number} +% Marking sentences. First, some |\if|s, token lists, and counters. +% \begin{macrocode} +\newif{\ifprosebysentence} +\newif{\ifrunningsentencenumbers}\runningsentencenumberstrue +\newif{\ifmarginsentencenumbers}\marginsentencenumberstrue + +\newtoks{\pmnoteheader} + +\newcounter{pmsentencenumber}\setcounter{pmsentencenumber}{0} +\newcounter{pmmodulo}\setcounter{pmmodulo}{3} +\newcounter{pmindexcount}\setcounter{pmindexcount}{0} +% \end{macrocode} +% A starter. Mostly a placeholder. For changes to a whole section. +% \begin{macrocode} +\newcommand{\setprosebysentence}{\prosebysentencetrue% +} +\newenvironment{pmsection}{ +\noemendyettrue% +\noexplainyettrue% +}{} +% \end{macrocode} +% Formatting for sentence numbers in the running text and in the +% margin. \label{runningsentencenumberformat} +% \begin{macrocode} +\newcommand{\runningsentencenumberformat}[1]{\nobreak% +\textsuperscript{\scriptsize{#1}}\unskip\nobreak} +\newcommand{\marginsentencenumberformat}[1]{\scriptsize{#1}} +\newcommand{\setpmmodulo}[1]{\setcounter{pmmodulo}{#1}% +\addtocounter{pmmodulo}{-1}% +} +\newcommand{\pmnumberstoleft}{%\catcode`\@=11% +\numbersswitchfalse\numbersrightfalse% +\setlength{\marginparsep}{18pt}% +} +\newcommand{\pmnumberstoright}{%\catcode`\@=11% +\numbersswitchfalse\numbersrighttrue% +\setlength{\marginparsep}{-18pt} +% \setlength{\marginparsep}{18pt} +} +\newcommand{\pmnumbersswitch}{\strictpagechecktrue\numbersswitchtrue\numbersrightfalse% +\setlength{\marginparsep}{18pt}% +} +\newcommand{\pmnumbersgutter}{%\catcode`\@=11% +\pmnumbersswitch% +\pmclreversesideparfalse\numbersguttertrue% +\setlength{\marginparsep}{18pt}% +} +\newcommand{\pmnumbersouter}{%\catcode`\@=11% +\pmnumbersswitch% +\pmclreversesidepartrue\numbersgutterfalse% +\setlength{\marginparsep}{18pt}% +} +% \end{macrocode} +% Macros for actually writing the numbers in the margin. +% \begin{macrocode} +\newcommand{\putpmsentencenumber}{% +\putpmmarginnumber{\thepmsentencenumber}% +{\marginsentencenumberformat}} +\newcommand{\putpmmarginnumber}[2]{% +\nolinebreak\begin{marginenvironment}% + \nolinebreak% + \ifnumbersswitch%\marginpar{\hfil #2{#1}} + \pmclsidepar{\hfil #2{#1}}% + \else% + \ifnumbersright%\marginpar{\hfil #2{#1}} + \pmclrightsidepar{\hfil #2{#1}}% + \else% \marginpar{#2{#1}\hfil} + \pmclleftsidepar +{#2{#1}\hfil}% + \fi% + \fi% + \nolinebreak% + \end{marginenvironment}\nolinebreak% +} +% \end{macrocode} +% \begin{macro}{\pmsentence} +% Put this before every sentence. (This is the opposite of the +% convention in verse sections, where |\verseline| is at the end of +% each line. +% \begin{macrocode} +\newcommand{\pmsentence}{% +% increment sentence number at beginning of sentence +\addtocounter{pmsentencenumber}{1}% +\ifrunningsentencenumbers% add running number +\runningsentencenumberformat{\thepmsentencenumber}% +\fi% +\ifmarginsentencenumbers% add marginal number + \addtocounter{pmindexcount}{1}% + \leavevmode% +\ifthenelse{\value{pmindexcount}>\value{pmmodulo}}% +{ \putpmsentencenumber\nobreak% + \setcounter{pmindexcount}{0}% +}{\relax}% +\fi% +% create header for notes if any are to occur +\ifpmparas% +\global\edef\noteheaderconcat{\thepmparagraph:\thepmsentencenumber}% +\pmnoteheader=\expandafter{\noteheaderconcat}% +\else% +%\global\edef\noteheaderconcat{\thepmsentencenumber:}% +\global\edef\noteheaderconcat{\thepmsentencenumber} +\pmnoteheader=\expandafter{\noteheaderconcat}% +\fi% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmsentencetwo} +% Kludge for the second sentence in a line. +% \begin{macrocode} +\newcommand{\pmsentencetwo}{% +% increment sentence number at beginning of sentence +\addtocounter{pmsentencenumber}{1}% +\ifrunningsentencenumbers% add running number +\runningsentencenumberformat{\thepmsentencenumber}% +\fi% +\ifmarginsentencenumbers% add marginal number + \addtocounter{pmindexcount}{1}% + \leavevmode% +\ifthenelse{\value{pmindexcount}>\value{pmmodulo}}% +{ \putpmsentencenumbertwo\nobreak% + \setcounter{pmindexcount}{0}% +}{\relax}% +% \ifnum\thepmindexcount>\thepmmodulo% +% \putpmsentencenumbertwo\nobreak% +% \setcounter{pmindexcount}{0}% +% \fi% +\fi% +% create header for notes if any are to occur +\ifpmparas% +\global\edef\noteheaderconcat{\thepmparagraph:\thepmsentencenumber}% +\pmnoteheader=\expandafter{\noteheaderconcat}% +\else% +\global\edef\noteheaderconcat{\thepmsentencenumber}% +\pmnoteheader=\expandafter{\noteheaderconcat}% +\fi% +} + +\newcommand{\putpmsentencenumbertwo}{% +\putpmmarginnumber{\rlap{\phantom{1},~\thepmsentencenumber}}% +{\marginsentencenumberformat}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmsentencethree} +% Kludge for the third sentence in a line. +% \begin{macrocode} +\newcommand{\pmsentencethree}{% +% increment sentence number at beginning of sentence +\addtocounter{pmsentencenumber}{1}% +\ifrunningsentencenumbers% add running number +\runningsentencenumberformat{\thepmsentencenumber}% +\fi% +\ifmarginsentencenumbers% add marginal number + \addtocounter{pmindexcount}{1}% + \leavevmode% +\ifthenelse{\value{pmindexcount}>\value{pmmodulo}}% +{ \putpmsentencenumberthree\nobreak% + \setcounter{pmindexcount}{0}% +}{\relax}% +% \ifnum\thepmindexcount>\thepmmodulo% +% \putpmsentencenumberthree\nobreak% +% \setcounter{pmindexcount}{0}% +% \fi% +\fi% +% create header for notes if any are to occur +\ifpmparas% +\global\edef\noteheaderconcat{\thepmparagraph:\thepmsentencenumber}% +\pmnoteheader=\expandafter{\noteheaderconcat}% +\else% +\global\edef\noteheaderconcat{\thepmsentencenumber}% +\pmnoteheader=\expandafter{\noteheaderconcat}% +\fi% +} + +\newcommand{\putpmsentencenumberthree}{% +\putpmmarginnumber{\rlap{\phantom{1,~2},~\thepmsentencenumber}}% +{\marginsentencenumberformat}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmsentencefour} +% \begin{macrocode} +\newcommand{\pmsentencefour}{% +% increment sentence number at beginning of sentence +\addtocounter{pmsentencenumber}{1}% +\ifrunningsentencenumbers% add running number +\runningsentencenumberformat{\thepmsentencenumber}% +\fi% +\ifmarginsentencenumbers% add marginal number + \addtocounter{pmindexcount}{1}% + \leavevmode% +\ifthenelse{\value{pmindexcount}>\value{pmmodulo}}% +{ \putpmsentencenumberfour\nobreak% + \setcounter{pmindexcount}{0}% +}{\relax}% +\fi% +% create header for notes if any are to occur +\ifpmparas% +\global\edef\noteheaderconcat{\thepmparagraph:\thepmsentencenumber}% +\pmnoteheader=\expandafter{\noteheaderconcat}% +\else% +\global\edef\noteheaderconcat{\thepmsentencenumber}% +\pmnoteheader=\expandafter{\noteheaderconcat}% +\fi% +} + +\newcommand{\putpmsentencenumberfour}{% +\putpmmarginnumber{\rlap{\phantom{1,~2,~3},~\thepmsentencenumber}}% +{\marginsentencenumberformat}} + +% \end{macrocode} +% \end{macro} +% Macros for numbering paragraphs +% \begin{macrocode} +\newcounter{pmparagraph} +\setcounter{pmparagraph}{0} +\newif{\ifpmparas}\pmparasfalse +\newif{\ifpmparainmar}\pmparainmartrue +\newif{\ifpmpararunning}\pmpararunningfalse +\newif{\ifpmsentencebypara}% reset sentence counter every paragraph +\pmsentencebyparatrue +% \end{macrocode} +% Formatting marginal and running paragraph numbers, printing them. \label{pmparrunningformat} +% \begin{macrocode} +\newcommand{\pmparmarformat}[1]{\textbf{{\small #1}}} +\newcommand{\pmpararunningformat}[1]{\textbf{\small #1}} +\newcommand{\putpmmarparanumber}{% +\putpmmarginnumber{\llap{\thepmparagraph~~}}{\pmparmarformat}} +% \end{macrocode} +% \begin{macro}{\pmpara} +% Mark the beginning of each paragraph with |\pmpara| +% \begin{macrocode} +\newcommand{\pmpara}{\leavevmode% +\pmparastrue\addtocounter{pmparagraph}{1}% +\ifpmparainmar% put in marginal paragraph number + \putpmmarparanumber +\fi +\ifpmpararunning% put in running number + \pmpararunningformat{\thepmparagraph}% +\fi +\ifpmsentencebypara% reset sentence counter + \setcounter{pmsentencenumber}{0}% + \setcounter{pmindexcount}{0}% +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\sentencelabel} +% Makes a label either by sentence number or by paragraph and +% sentence number, for use by |\ref| and by the various notes commands. +% \begin{macrocode} +\makeatletter +\def\sentencelabel#1{\@bsphack% +\ifpmparas% +\protected@write\@auxout{}% + {\string\newlabel{#1}{{\thepmparagraph :\thepmsentencenumber}{\thepage}}}% +\else% +\protected@write\@auxout{}% + {\string\newlabel{#1}{{\thepmsentencenumber}{\thepage}}}% +\fi% +\@esphack% +} +\makeatother +% \end{macrocode} +% \end{macro} +% Macros to set up endnote commands for paragraph and sentence +% annotation. +% \begin{macrocode} +\newtoks{\pmrangeend} % for notes that refer to ranges +% setting the range for the lemma: +\newcommand{\setpmlemmarange}[1]{% +\pmccheckifinteger{#1}% +\ifinteger% +\setcounter{lemmalines}{#1}% +\ifthenelse{\equal{\value{lemmalines}}{0}}{\rangelemmafalse}{\rangelemmatrue}% +\setcounter{lemmaend}{\thepmsentencenumber}% +\addtocounter{lemmaend}{\thelemmalines}% +\pmrangeend={\thelemmaend}% +\else% +\pmrangeend={\ref{#1}}\rangelemmatrue% +\fi% +} +% Setting the string to include ranges in notes: +\newcommand{\pmciterange}{% +\ifrangelemma{\the\pmnoteheader --\the\pmrangeend:}% +\else% +\the\pmnoteheader:% +\fi} +% For running headers +\newcommand{\pmchecknoteheaders}{\string\setcounter\string{notepageholdernote\string}% +\string{\thepage\string}\string\ifhmode\string\unskip\string\fi +\string\ifthenelse\string{\string\value\string{notepageholdernote\string}> +\string\value\string{notepageholdertitle\string}\string}% +\string{\string\mark\string{\string\thenotepageholdernote\string}\string}% +\string{\string\mark\string{\string\thenotepageholdertitle\string}\string}\string\unskip} +% to reset lemma counters at end of note +\newcommand{\pmresetlemmacounters}{\rangelemmafalse% +\setcounter{lemmalines}{0}% +\setcounter{lemmaend}{0}% +\pmrangeend={\relax}% +} +% \end{macrocode} +% \begin{macro}{\pmtextnote} +% \begin{macrocode} +\newcommand{\pmtextnote}[2][0]{% +\iftextnoteson% +\setpmlemmarange{#1}% +\immediate\write\textnotes{\pmchecknoteheaders\string~}% + \immediate\write\textnotes{\pmciterange}% + \literaltextnote{#2}% + \iftextnotessinglepar% + \literaltextnote{\par}% + \fi% + \fi% +\pmresetlemmacounters% +\unskip} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmexplanatory} +% \begin{macrocode} +\newcommand{\pmexplanatory}[2][0]{% +\ifexplanon% +\setpmlemmarange{#1}% + \ifnoexplainyet % first explanation + \firstexplanatory% + \fi %noexplainyet + \global\noexplainyetfalse% +\immediate\write\explanations{\pmchecknoteheaders\string~}% +\immediate\write\explanations{\pmciterange}% + \literalexplain{#2}% + \ifexplanationssinglepar% + \literalexplain{\par}% + \fi %ifexplanationssinglepar + \fi % ifexplanon +\pmresetlemmacounters% +\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmemendation} +% \begin{macrocode} +\newcommand{\pmemendation}[2][0]{% +\ifemendationson% + \setpmlemmarange{#1}% + \ifredundantemendations% + \iftextnoteson% + \ifrangelemma% + \pmtextnote[#1]{#2}% + \else% + \pmtextnote{#2}% + \fi % ifrangelemma} + \fi %iftextnoteson + \fi % ifredundantemendations + \ifnoemendyet % firstemendation + \firstemendation% + \fi %noemendyet + \global\noemendyetfalse% +\immediate\write\emendations{\pmchecknoteheaders\string~}% +\immediate\write\emendations{\pmciterange}% + \literalemend{#2}% +\ifemendationssinglepar% + \literalemend{\par}% + \fi% ifemendationssinglepar + \fi % ifemendationson +\pmresetlemmacounters% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmaccidental} +% \begin{macrocode} +\newcommand{\pmaccidental}[1]{% +\iftextnoteson% + \ifincludeaccidentals% + \immediate\write\textnotes{\string\nobreak}% +\pmtextnote{#1}% +\immediate\write\textnotes{\string\nobreak}% + \iftextnotessinglepar% + \literaltextnote{\par}% + \fi% +\fi\fi% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmtsvariant} +% \begin{macrocode} +\newcommand{\pmtsvariant}[2][0]{\iftextnoteson% + \ifincludetypescripts% + \immediate\write\textnotes{\string\nobreak}% +\pmtextnote[#1]{#2}% +\immediate\write\textnotes{\string\nobreak}% + \iftextnotessinglepar% + \literaltextnote{\par}% + \fi% +\fi\fi% +} +\newcommand{\pmtsaccidental}[1]{\iftextnoteson\ifincludetypescripts\pmaccidental{#1}\fi\fi} +% \end{macrocode} +% \end{macro} +%\subsection{~Using Footnotes} |\texnotesatfoot| has to redefine +% |\sources| and a few others as well. +% \begin{macro}{\textnotesatfoot} +% \begin{macrocode} +\newcommand{\textnotesatfoot}{% first redefine textnotes +\global\textnotesontrue% +\global\textnotesatendfalse% +\ifsourcesfootnotespara% +\DeclareNewFootnote[para]{A}% +\else% +\DeclareNewFootnote[plain]{A}% +\fi% +\iftextfootnotespara% +\DeclareNewFootnote[para]{B}% +\else% +\DeclareNewFootnote[plain]{B}% +\fi% +\renewcommand{\textnote}[2][0]{\setlemmarange{##1}% +\FootnotetextB{\relax}{\citerange:~##2}% +\resetlemmacounters}% +% then redefine sources +\renewcommand{\sources}[1]{\FootnotetextA{\relax}{##1}}% +% then prose textnote +\renewcommand{\prosetextnote}[3][0]{% +\unskip\proselinelabel{##2}% +\setproselemmarange{##2}{##1}% +\FootnotetextB{\relax}{\proseciterange:~##3}\resetlemmacounters}% +% then pmtextnote +\renewcommand{\pmtextnote}[2][0]{\setpmlemmarange{##1}% +\FootnotetextB{\relax}{\pmciterange~##2}\pmresetlemmacounters} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\emendationsatfoot} +% \begin{macrocode} +\newcommand{\emendationsatfoot}{% +\global\emendationsontrue% +\global\emendationsatendfalse% +\ifemendationfootnotespara% +\DeclareNewFootnote[para]{C}% +\else% +\DeclareNewFootnote[plain]{C}% +\fi% +\renewcommand{\emendation}[2][0]{\setlemmarange{##1}% +\FootnotetextC{\relax}{\citerange:~##2}% +\resetlemmacounters}% +\renewcommand{\proseemendation}[3][0]{\unskip\proselinelabel{##2}% +\setproselemmarange{##2}{##1}% +\FootnotetextC{\relax}{\proseciterange:~##3}\resetlemmacounters}% +\renewcommand{\pmemendation}[2][0]{\setpmlemmarange{##1}% +\FootnotetextC{\relax}{\pmciterange~##2}\pmresetlemmacounters} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\explanationsatfoot} +% \begin{macrocode} +\newcommand{\explanationsatfoot}{% +\global\explanontrue% +\global\explanatendfalse% +\ifexplanfootnotespara% +\DeclareNewFootnote[para]{D}% +\else% +\DeclareNewFootnote[plain]{D}% +\fi% +\renewcommand{\explanatory}[2][0]{\setlemmarange{##1}% +\FootnotetextD{\relax}{\citerange:~##2}% +\resetlemmacounters}% +\renewcommand{\proseexplanatory}[3][0]{\unskip\proselinelabel{##2}% +\setproselemmarange{##2}{##1}% +\FootnotetextD{\relax}{\proseciterange:~##3}} +\renewcommand{\pmexplanatory}[2][0]{\setpmlemmarange{##1}% +\FootnotetextD{\relax}{\pmciterange~##2}\pmresetlemmacounters}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bibleverse} +% \begin{macrocode} +\newcommand{\bibleverse}{\pmsentence} +\newcommand{\biblechapter}{\pmpara} +% \end{macrocode} +% \end{macro} +% +% \subsection{~Notes at the foot of individual poems} +% +% \begin{macro}{\poemendnote} +% \begin{macrocode} +\newif\ifpoemendnoteson +\poemendnotesontrue +\newif\ifpoemendnotessinglepar +\poemendnotessinglepartrue +\newcommand{\makepoemendnotes}{ + \global\verselinenumberstrue + \newwrite\poemendnotes + \immediate\openout\poemendnotes=\jobname.pnd + \literalpoemendnote{\bigskip} + } +\newcommand{\poemendnote}[2][0]{% +\ifpoemendnoteson + \setlemmarange{#1}% + \immediate\write\poemendnotes{\checknoteheaders} + \literalpoemendnote{#2}% + \ifpoemendnotessinglepar% + \literalpoemendnote{\par}% + \fi% + \fi +\resetlemmacounters +} +\newcommand{\literalpoemendnote}[1]{% + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\poemendnotes{\expandafter\strip\meaning\next}% + \endgroup + } +\newcommand{\putpoemendnotes}{ +\ifpoemendnoteson + \immediate\closeout\poemendnotes + \input \jobname.pnd +\else + \relax +\fi} +% \begin{macro}{\poemendemendationnote} +% \begin{macrocode} +\newif\ifpoemendemendationnoteson +\poemendemendationnotesontrue +\newif\ifpoemendemendationnotessinglepar +\poemendemendationnotessinglepartrue +\newcommand{\makepoemendemendationnotes}{ + \global\verselinenumberstrue + \newwrite\poemendemendationnotes + \immediate\openout\poemendemendationnotes=\jobname.pmd + \literalpoemendemendationnote{\bigskip} + } +\newcommand{\poemendemendationnote}[2][0]{% +\ifpoemendemendationnoteson + \setlemmarange{#1}% + \immediate\write\poemendemendationnotes{\checknoteheaders} + \literalpoemendemendationnote{#2}% + \ifpoemendemendationnotessinglepar% + \literalpoemendemendationnote{\par}% + \fi% + \fi +\resetlemmacounters +} +\newcommand{\literalpoemendemendationnote}[1]{% + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\poemendemendationnotes{\expandafter\strip\meaning\next}% + \endgroup + } +\newcommand{\putpoemendemendationnotes}{ +\ifpoemendemendationnoteson + \immediate\closeout\poemendemendationnotes + \input \jobname.pmd +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\poemendexplanatorynote} +% \begin{macrocode} +\newif\ifpoemendexplanatorynoteson +\poemendexplanatorynotesontrue +\newif\ifpoemendexplanatorynotessinglepar +\poemendexplanatorynotessinglepartrue +\newcommand{\makepoemendexplanatorynotes}{ + \global\verselinenumberstrue + \newwrite\poemendexplanatorynotes + \immediate\openout\poemendexplanatorynotes=\jobname.pxd + \literalpoemendexplanatorynote{\bigskip} + } +\newcommand{\poemendexplanatorynote}[2][0]{% +\ifpoemendexplanatorynoteson + \setlemmarange{#1}% + \immediate\write\poemendexplanatorynotes{\checknoteheaders} + \literalpoemendexplanatorynote{#2}% + \ifpoemendexplanatorynotessinglepar% + \literalpoemendexplanatorynote{\par}% + \fi% + \fi +\resetlemmacounters +} +\newcommand{\literalpoemendexplanatorynote}[1]{% + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\poemendexplanatorynotes{\expandafter\strip\meaning\next}% + \endgroup + } +\newcommand{\putpoemendexplanatorynotes}{ +\ifpoemendexplanatorynoteson + \immediate\closeout\poemendexplanatorynotes + \input \jobname.pxd +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\poemendtextnote} +% \begin{macrocode} +\newif\ifpoemendtextnoteson +\poemendtextnotesontrue +\newif\ifpoemendtextnotessinglepar +\poemendtextnotessinglepartrue +\newcommand{\makepoemendtextnotes}{ + \global\verselinenumberstrue + \newwrite\poemendtextnotes + \immediate\openout\poemendtextnotes=\jobname.pmd + \literalpoemendtextnote{\bigskip} + } +\newcommand{\poemendtextnote}[2][0]{% +\ifpoemendtextnoteson + \setlemmarange{#1}% + \immediate\write\poemendtextnotes{\checknoteheaders} + \literalpoemendtextnote{#2}% + \ifpoemendtextnotessinglepar% + \literalpoemendtextnote{\par}% + \fi% + \fi +\resetlemmacounters +} +\newcommand{\literalpoemendtextnote}[1]{% + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\poemendtextnotes{\expandafter\strip\meaning\next}% + \endgroup + } +\newcommand{\putpoemendtextnotes}{ +\ifpoemendtextnoteson + \immediate\closeout\poemendtextnotes + \input \jobname.pmd +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \subsection{~Embarrassing kludges} Because the dirty trick +% mentioned above writes out textnotes as a ribbon one word wide, +% quoted poetry in the notes sections will leave a blank line at the +% end, which will be interpreted as a paragraph break when the file is +% read back in by \LaTeX. These kludges correct that problem. +% \begin{macrocode} +\newcommand{\quotedversecorrectiontextnote}[1][0pt] +{\iftextnoteson% +\immediate\write\textnotes{\string\noindent\string\kern-#1}% +\fi} +\newcommand{\quotedversecorrectionemendation}[1][0pt] +{\ifemendationson% +\immediate\write\emendations{\string\noindent\string\kern-#1}% +\fi} +\newcommand{\quotedversecorrectionexplanatory}[1][0pt] +{\ifexplanon% +\immediate\write\explanations{\string\noindent\string\kern-#1}% +\fi} +% \end{macrocode} +% \subsection{~Marking stanza breaks on page turns} Use the macro +% below to change the symbol used to mark cases in which there is or is +% not a stanza break at a page turn. +% \begin{macrocode} +\newcommand{\stanzaatbottom}[1]{\global\edef\stanzaatbottomvalue{#1}} +\stanzaatbottom{*} +\newcommand{\nostanzaatbottom}[1]{\global\edef\nostanzaatbottomvalue{#1}} +\nostanzaatbottom{\relax} +% \end{macrocode} +% \subsection{~Parallel Texts} +% First, three utility macros from the memoir class: +% \begin{macro}{\cleartorecto} +% A repeat of |\cleardoublepage|; clears to a recto (odd-numbered) page. +% \begin{macrocode} +\def\cleartorecto{\clearpage\if@twoside \ifodd\c@page\else + \hbox{}\thispagestyle{empty}% + \newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\cleartoverso} +% Clears to a verso (even-numbered) page. +% \begin{macrocode} +\def\cleartoverso{\clearpage\if@twoside + \ifodd\c@page\hbox{}\thispagestyle{empty}% + \newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\ifenv} +% Macro for testing whether one is in a particular environment. +% \begin{macrocode} +\makeatletter +\def\ifenv#1{% + \def\reserved@a{#1}% + \ifx\reserved@a\@currenvir + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\makeatother +% \end{macrocode} +% \end{macro} +% Macros for forcing the marginal line numbers to the left side or +% the right side. These marginal line numbers, unlike those made with +% |\marginpar|, do not float. This code is modeled after code from +% the memoir class, by Peter Wilson. +% +% \begin{macro}{\pmclleftsidepar} +% As in the memoir class, these sidepars do not float. +% \begin{macrocode} +\newdimen\pmclsavsk +\newcount\pmclsavsf +\def\pmclbsphack{% + \relax + \ifhmode + \pmclsavsk\lastskip + \pmclsavsf\spacefactor + \fi} +\def\pmclesphack{% + \relax + \ifhmode + \spacefactor\pmclsavsf + \ifdim\pmclsavsk>0pt + \ignorespaces + \fi + \fi} +% \newcommand{\pmclleftsidepar}[1]{% +% \pmclbsphack\leavevmode\vadjust{% +% \rlap{\kern-\parindent% +% \kern -\marginparsep \kern -\marginparwidth % at left +% \vbox to 0pt{% +% \kern \pmclsideparvshift% % vertical shift to align top text lines +% \begin{minipage}{\marginparwidth}% +% #1% +% \end{minipage}% +% \vss}}}\pmclesphack% +% } % version 2.44 +\newcommand{\pmclleftsidepar}[1]{% +\pmclbsphack\strut\vadjust{% changed +\rlap{\kern-\parindent% +\kern -\marginparsep \kern -\marginparwidth% at left +% \vbox to 0pt{% +% \kern \pmclsideparvshift% % vertical shift to align top text lines +% \begin{minipage}{\marginparwidth}% +\setbox0=\vtop to 0pt{% added +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +% \vss}}}\pmclesphack% +\vss}% changed +\vtop to 0pt{\kern\pmclsideparvshift % default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% changed + +\newcommand{\pmclrightsidepar}[1]{% +% \pmclbsphack\leavevmode\vadjust{% +\pmclbsphack\strut\vadjust{% +\rlap{\kern-\parindent% +% \kern \textwidth \kern -\marginparsep % at right +\kern\textwidth\kern\marginparsep% at right +% \vbox to 0pt{% +% \kern \pmclsideparvshift% % vertical shift to align top text lines +% \begin{minipage}{\marginparwidth}% +\setbox0=\vtop to 0pt{% added +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +% \vss}}}\pmclesphack% +\vss}% changed +\vtop to 0pt{\kern\pmclsideparvshift% default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% changed + +% \end{macrocode} +% \end{macro} + +% Booleans for parallel texts +% \begin{macrocode} +\newif\ifparalleltexts +\paralleltextsfalse +\newif\ifrecto +\rectofalse +\newif\ifverso +\versofalse +% \end{macrocode} +% Booleans are needed to describe situations in which poems and stanzas +% are left open at the page break. |\finishrectopage| and +% |\finishversopage| will close poems and stanzas (so as not to +% generate errors because of environments left open), although as far +% as the poem is concerned the stanza or poem may still be open. (I +% will say that the stanza or poem in such a case is ``artificially +% closed.'') There are two of them for each case of artificial closure. +% The first boolean (for each stanza or poem artificially closed) +% must reflect whether the stanza or poem has been (artificially) +% closed, to reopen on the next page of the same kind (recto or verso). +% If a poem or stanza has been (artificially) closed, the |\mark| will +% not be changed (so that it will still reflect whether the reader +% should understand there to be a stanza break at the bottom of the +% page or not). The second boolean for each case of artificial closure +% reflects whether the |\mark| has been changed or not. +% \begin{macrocode} +\newif\ifrectopoempending +\rectopoempendingfalse +\newif\ifversopoempending +\versopoempendingfalse +\newif\ifrectostanzapending +\rectostanzapendingfalse +\newif\ifversostanzapending +\versostanzapendingfalse +\newif\ifrectostanzastillopen +\rectostanzastillopenfalse +\newif\ifversostanzastillopen +\versostanzastillopenfalse +\newif\ifrectopoemstillopen +\rectopoemstillopenfalse +\newif\ifversopoemstillopen +\versopoemstillopenfalse +% the same for prose sections +\newif\ifrectoprosesectionpending +\rectoprosesectionpendingfalse +\newif\ifversoprosesectionpending +\versoprosesectionpendingfalse +\newif\ifrectoprosesectionstillopen +\rectoprosesectionstillopenfalse +\newif\ifversoprosesectionstillopen +\versoprosesectionstillopenfalse +% the same for quoted verse +\newif\ifrectoquotedversepending +\rectoquotedversependingfalse +\newif\ifversoquotedversepending +\versoquotedversependingfalse +\newif\ifrectoquotedversestillopen +\rectoquotedversestillopenfalse +\newif\ifversoquotedversestillopen +\versoquotedversestillopenfalse +% \end{macrocode} +% A further set of booleans is required for emendations and +% explanatory notes. Again the idea is that if a poem is artificially +% closed, but has already had its first emendation or explanatory note +% written to the external notes files, \textsf{poemscol} will remember that +% the next emendation or explanatory note it sees is not the first one +% for that poem and thus won't set the heading information for that +% poem in the notes section all over again. +% \begin{macrocode} +\newif\ifrectoemendationspending +\rectoemendationspendingfalse +\newif\ifversoemendationspending +\versoemendationspendingfalse +\newif\ifrectoexplanationspending +\rectoexplanationspendingfalse +\newif\ifversoexplanationspending +\versoexplanationspendingfalse +% \end{macrocode} +% Counters for parallel texts: New counters are needed, not only for the recto and verso lines, but +% also for the scratch value which determines whether or not it is time to +% output a marginal line number. These are saved at the end of every +% page, and restored at the beginning of every page of the same kind. +% \begin{macrocode} +\newcounter{rectolinecounter} +\setcounter{rectolinecounter}{1} +\newcounter{rectoindexscratch} +\setcounter{rectoindexscratch}{1} +\newcounter{versolinecounter} +\setcounter{versolinecounter}{1} +\newcounter{versoindexscratch} +\setcounter{versoindexscratch}{1} +% \end{macrocode} +% \begin{macro}{\startparalleltexts} +% Clears to a verso (even-numbered) page, fixes where to put line +% numbers, modifies poem and stanza environments, changes where +% marginal line numbers are set, sets the booleans. \label{startparalleltexts} +% \begin{macrocode} +\newcommand{\startparalleltexts}{% +\leavevmode +\cleartoverso +\paralleltextstrue +\renewenvironment{poem}{\raggedright + \language=255%no hyphenation in verse + \noemendyettrue + \noexplainyettrue + \setcounter{verselinenumber}{0}\setcounter{printlineindex}{0} + \nobreak\begin{pmclverse} + \inpoemtrue\nobreak\mark{\relax}} + % must end poem if parallel text. Don't worry, + % begin recto page and begin verso page will + % reopen the poem and reset the line counter to the right value + % if it was finish recto page or finish verso page + % that closed the poem rather than your own declaration. +{\ifversopoemstillopen + \end{pmclverse} + \inpoemfalse\mark{\relax} + \else + \ifrectopoemstillopen + \end{pmclverse} + \inpoemfalse\mark{\relax} + \else +\end{pmclverse} + \inpoemfalse\mark{\relax} + \goodbreak\afterpoemskip%\bigskip +\fi\fi } +\renewenvironment{stanza}{\penalty-100\instanzatrue\mark{\nostanzaatbottomvalue\ }} +% must end stanza if parallel text. Don't worry, +% begin recto page and begin verso page will +% reopen the stanza and reset the line counter to the right value +% if it was finish recto page or finish verso page +% that closed the stanza rather than your own declaration. +{\ifversostanzastillopen + \relax + \else + \ifrectostanzastillopen + \relax + \else + \nobreak\mark{\stanzaatbottomvalue\ }\nobreak +\ifspeciallinelock% +\relax\else% +\nolinebreak\incrementverselinenumber% +\fi% +\speciallinelockfalse% + \nobreak + \instanzafalse + + \stanzaskip +\fi\fi +} +\renewcommand{\putverselinenumber}{\nolinebreak\begin{marginenvironment}% + \nolinebreak +% \marn{\hfil\textrm{\theverselinenumber}} +% \marginpar{\hfil\textrm{\scriptsize\theverselinenumber}} + \pmclleftsidepar{\textrm{\scriptsize\theverselinenumber}}% + \nolinebreak + \end{marginenvironment}% + \nolinebreak +} +} +\newenvironment{parallelverse}{\startparalleltexts} +{\finishparalleltexts} +\newtoks{\versotitleholder} +\newtoks{\rectotitleholder} +\newcommand{\makeversotitleholder}[1]{% +\versotitleholder={#1}% +} +\newcommand{\makerectotitleholder}[1]{% +\rectotitleholder={#1}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\versopoemtitle} +% \begin{macrocode} +\makeatletter +\newcommand{\versopoemtitle}[1]{% +\versoset@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +} +\newcommand{\versoset@p@emtitle}[6]{\pmclversoresetsettitleinnotes% +\setlength{\titleentryoverrun}{#6}% +{#2}% +{#3 \begin{titleentryenvironment}% +{\ifcentertitleson\begin{center}#4 #1\end{center}\else #4 #1\fi}% +\end{titleentryenvironment}}% +{#5}% +\m@kep@emlabel +\versom@ken@teholder{#1}% +\setlength{\titleentryoverrun}{\z@}} +\newcommand{\versom@ken@teholder}[1]{% +\ifsinglelinetitle +\versotitleholder={#1}% +\global\edef\@compoundlabelscratch{poem\thepoemnumber}% +\else\iftitlefirstline + \versotitleholder={#1}% + \global\edef\@compoundlabelscratch{poem\thepoemnumber}% + \else\iftitlemiddleline + \titlesofar=\versotitleholder + \titleincrement={~#1}% + \global\edef\titleconcat{\the\titlesofar \the\titleincrement}% + \versotitleholder=\expandafter{\titleconcat}% + \global\edef\@compoundlabelscratch{poem\thepoemnumber}% + \else + \titlesofar=\versotitleholder + \titleincrement={~#1}% + \global\edef\titleconcat{\the\titlesofar \the\titleincrement}% + \versotitleholder=\expandafter{\titleconcat}% + \global\edef\@compoundlabelscratch{poem\thepoemnumber}% + \fi + \fi + \fi +} +\newcommand{\versotitletoothernotes}{\string\par +\ifputpagenumberinnotes% +\string\argpageref\string{\@compoundlabelscratch\string}% +\string\setcounterfrompageref\string{notepageholdertitle\string}% +\string{\@compoundlabelscratch\string}% +\fi% +\string\textbf\string{\ \the\versotitleholder\string} +}% +\newcommand{\versopoemtitlenocontents}[1]{% +\versoset@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +} +\newcommand{\versotitleinnotescheck}{\ifparalleltexts\let\titletoothernotes=\versotitletoothernotes\fi} +\makeatother +% \end{macrocode} +% \end{macro} +% \begin{macro}{\rectopoemtitle} +% \begin{macrocode} +\makeatletter +\newcommand{\rectopoemtitle}[1]{% +\rectoset@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +{\contentsindenttwoamount}% +} +\newcommand{\rectoset@p@emtitle}[6]{\pmclrectoresetsettitleinnotes +\setlength{\titleentryoverrun}{#6}% +{#2}% +{#3 \begin{titleentryenvironment}% +{\ifcentertitleson\begin{center}#4 #1\end{center}\else #4 #1\fi}% +\end{titleentryenvironment}}% +{#5}% +\m@kep@emlabel +\rectom@ken@teholder{#1}% +\setlength{\titleentryoverrun}{\z@}} +\newcommand{\rectom@ken@teholder}[1]{% +\ifsinglelinetitle +\rectotitleholder={#1}% +\global\edef\@compoundlabelscratch{poem\thepoemnumber}% +\else\iftitlefirstline + \rectotitleholder={#1}% + \global\edef\@compoundlabelscratch{poem\thepoemnumber}% + \else\iftitlemiddleline + \titlesofar=\rectotitleholder + \titleincrement={~#1}% + \global\edef\titleconcat{\the\titlesofar \the\titleincrement}% + \rectotitleholder=\expandafter{\titleconcat}% + \global\edef\@compoundlabelscratch{poem\thepoemnumber}% + \else + \titlesofar=\rectotitleholder + \titleincrement={~#1}% + \global\edef\titleconcat{\the\titlesofar \the\titleincrement}% + \rectotitleholder=\expandafter{\titleconcat}% + \global\edef\@compoundlabelscratch{poem\thepoemnumber}% + \fi + \fi + \fi +} +\newcommand{\rectotitletoothernotes}{\string\par +\ifputpagenumberinnotes% +\string\argpageref\string{\@compoundlabelscratch\string}% +\string\setcounterfrompageref\string{notepageholdertitle\string}% +\string{\@compoundlabelscratch\string}% +\fi% +\string\textbf\string{\ \the\rectotitleholder\string} +}% +\newcommand{\rectopoemtitlenocontents}[1]{% +\rectoset@p@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% +{\relax}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% +%\c@ntentsinfo{#1}{\contentsindentone}{\contentspoemtitlefont}% +%{\contentsindenttwoamount}% +%\t@xtnotesinfo{#1}% +} +\newcommand{\rectotitleinnotescheck}{\ifparalleltexts\let\titletoothernotes=\rectotitletoothernotes\fi} +\makeatother +% \end{macrocode} +% \end{macro} +% \begin{macro}{\saveversoline} +% Macros for saving and restoring line numbers: +% \begin{macrocode} +\newcommand{\saveversoline}{\setcounter{versolinecounter}% + {\value{verselinenumber}}% +\setcounter{versoindexscratch}{\value{printlineindex}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\restoreversoline} +% \begin{macrocode} +\newcommand{\restoreversoline}{\setcounter{verselinenumber}% + {\value{versolinecounter}}% +\setcounter{printlineindex}{\value{versoindexscratch}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\saverectoline} +% \begin{macrocode} +\newcommand{\saverectoline}{\setcounter{rectolinecounter}% + {\value{verselinenumber}}% +\setcounter{rectoindexscratch}{\value{printlineindex}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\restorerectoline} +% \begin{macrocode} +\newcommand{\restorerectoline}{\setcounter{verselinenumber}% + {\value{rectolinecounter}}% +\setcounter{printlineindex}{\value{rectoindexscratch}}} +% \end{macrocode} +% \end{macro} +% Macros for line cross references: +% +% You will probably want to use line cross references to show which +% lines on the recto page correspond to which lines on the verso page. +% When you do this, you will set, in the margin of a line on the recto +% page, the line number of the corresponding line on the verso side, in +% square brackets. You may mark that line number with a distinctive +% identifier. |\synchroflag| is a token register to hold that +% identifier, and |\setsynchroflag| is a command to put the identifier +% in the register. For instance, if you are setting the 1805 version of +% Wordsworth's \emph{The Prelude} on the verso, and the 1850 version on +% the recto, you might wish to set the ``synchroflag'' to ``1805'' so +% that the line cross reference will look something like ``[1805: +% 147]''. +% \begin{macro}{\setsynchroflag} +% \begin{macrocode} +\newtoks{\synchroflag} +\newcommand{\setsynchroflag}[1]{\synchroflag={#1}} +\setsynchroflag{\relax} +% \end{macrocode} +% \end{macro} +% Here are commands for defining and calling ``synchrolabels'', line +% cross references that tie verso and recto pages: +% \begin{macro}{\synchrolabel} +% \begin{macrocode} +\newcommand{\synchrolabel}[1]{\poemlinelabel{#1}} +\newcommand{\hfilll}{\hskip 0pt plus 1 filll} +\newcommand{\synchroref}[1]{% +\pmclrightsidepar{{\textrm{\scriptsize[\the\synchroflag\ref{#1}]}}}% +% \hfill\rlap{{\textrm{\scriptsize[\the\synchroflag\ref{#1}]}}} +% \ifnum\theprintlineindex=\thelineindexrepeat +% \hspace{-7pt} +% \fi + } +% \end{macrocode} +% \end{macro} +% Finally, the |\startversopage|, |\finishversopage|, |\startrectopage| +% |\finishrectopage| and |\finishparalleltexts| macros: +% \begin{macro}{\startversopage} +% \begin{macrocode} +\newcommand{\startversopage}{ +\ifrectostanzastillopen + \end{stanza} + \rectostanzastillopenfalse + \end{poem} + \rectopoemstillopenfalse +\fi +\ifrectopoemstillopen % from previous page + \end{poem} + \rectopoemstillopenfalse +\fi +\ifversopoempending % from previous verso + \begin{poem} + \global\versopoempendingfalse +\fi +\ifversostanzapending % from previous verso + \begin{stanza} + \global\versostanzapendingfalse +\fi +\ifversoemendationspending + \noemendyetfalse + \global\versoemendationspendingfalse +\fi +\ifversoexplanationspending + \noexplainyetfalse + \global\versoexplanationspendingfalse +\fi +\rectofalse\versotrue\restoreversoline +\let\titletoothernotes=\versotitletoothernotes} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\finishversopage} +% \begin{macrocode} +\newcommand{\finishversopage}{ +\saveversoline\versofalse\ +\ifinpoem + \global\versopoempendingtrue + \versopoemstillopentrue +\fi +\ifinstanza + \global\versostanzapendingtrue + \versostanzastillopentrue + \global\versopoempendingtrue + \versopoemstillopentrue +\fi +\ifnoemendyet + \relax + \else + \global\versoemendationspendingtrue + \noemendyetfalse +\fi +\ifnoexplainyet + \relax + \else + \global\versoexplanationspendingtrue + \noexplainyetfalse +\fi +% \clearpage % keep in comment until footnotes problems are worked out +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\startrectopage} +% \begin{macrocode} +\newcommand{\startrectopage}{ +\ifversostanzastillopen + \end{stanza} + \versostanzastillopenfalse + \end{poem} + \versopoemstillopenfalse +\fi +\ifversopoemstillopen + \end{poem} + \versopoemstillopenfalse +\fi +\ifrectopoempending + \begin{poem} + \global\rectopoempendingfalse +\fi +\ifrectostanzapending + \begin{stanza} + \global\rectostanzapendingfalse +\fi +\ifrectoemendationspending + \noemendyetfalse + \global\rectoemendationspendingfalse +\fi +\ifrectoexplanationspending + \noexplainyetfalse + \global\rectoexplanationspendingfalse +\fi +\versofalse\rectotrue\restorerectoline +\let\titletoothernotes=\rectotitletoothernotes} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\finishrectopage} +% \begin{macrocode} +\newcommand{\finishrectopage}{\saverectoline\rectofalse +\ifinpoem + \global\rectopoempendingtrue + \rectopoemstillopentrue +\fi +\ifinstanza + \global\rectostanzapendingtrue + \rectostanzastillopentrue + \global\rectopoempendingtrue + \rectopoemstillopentrue +\fi +\ifnoemendyet + \relax + \else + \global\rectoemendationspendingtrue + \noemendyetfalse +\fi +\ifnoexplainyet + \relax + \else + \global\versoexplanationspendingtrue + \noexplainyetfalse +\fi +% \clearpage % until footnote problem is solved +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\finishparalleltexts} +% \begin{macrocode} +\newcommand{\finishparalleltexts}{ +\ifinstanza +\end{stanza} +\fi +\ifinpoem +\end{poem} +\fi +\ifinprosesection +\end{prosesection} +\fi +\ifinquotedverse +\end{quotedverse} +\fi +\rectofalse\versofalse\paralleltextsfalse +\makeatletter\pmclresetsettitleinnotes\makeatother +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\makeversotextnotes} +% Next, the versotextnotes section: +% \begin{macrocode} +% tokens for changing the names of these notes +\newtoks{\versotextnotesname} +\versotextnotesname={TEXTUAL NOTES} +\newcommand{\changeversotextnotesname}[1]{\versotextnotesname={#1}} +\newtoks{\versotextnotesheadername} +\versotextnotesheadername={Textual Notes to} +\newcommand{\changeversotextnotesheader}[1]{\versotextnotesheadername={#1}} +\newtoks{\versotextnotescontentsname} +\versotextnotescontentsname={Textual Notes} +\newcommand{\changeversotextnotescontentsname}[1]{% +\versotextnotescontentsname={#1}} +% two column notes +\newif\ifversotextnotestwocol +\versotextnotestwocolfalse +% versotextnotes section setup +\newcommand{\makeversotextnotes}{\global\textnotesontrue + \newwrite\versotextnotes + \global\verselinenumberstrue + \immediate\openout\versotextnotes=\jobname.vtn + \literalversotextnote{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead{} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\versotextnotesheadername~\mymarks}}} +\fancyhead[CE]{{\small{\em \the\versotextnotesheadername~\mymarks}}} +\fancyfoot{} +\mark{3} +\setendnotessectiontitle{\the\versotextnotesname}{versotextnotes} +\tolerance=500\language=0 +\normalfont \backmattertextfont +\ifversotextnotestwocol +\begin{multicols}{2} +\fi +\setlength{\parindent}{-10pt} +} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\versotextnote} +% \begin{macrocode} +\newif\ifversotextnotessinglepar +\newif\ifnoversotextnoteyet +\newcommand{\literalversotextnote}[1]{\begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\versotextnotes{\expandafter\strip\meaning\next}% + \endgroup +} +\newcommand{\firstversotextnote}{\immediate\write\versotextnotes{\versotitletoothernotes} + \ifversotextnotessinglepar% + \literalversotextnote{\par}% + \fi% ifversotextnotessinglepa + } +\newcommand{\versotextnote}[2][0]{\versotitleinnotescheck + \setlemmarange{#1}% + \ifnoversotextnoteyet % firstversotextnote + \firstversotextnote + \fi %noversotextnoteyet + \global\noversotextnoteyetfalse +\immediate\write\versotextnotes{\checknoteheaders}% + \literalversotextnote{#2}% + \ifversotextnotessinglepar% + \literalversotextnote{\par}% + \fi% ifversotextnotessinglepar +\resetlemmacounters +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\makerectotextnotes} +% Next, the rectotextnotes section: +% \begin{macrocode} +% tokens for changing the names of these notes +\newtoks{\rectotextnotesname} +\rectotextnotesname={TEXTUAL NOTES} +\newcommand{\changerectotextnotesname}[1]{\rectotextnotesname={#1}} +\newtoks{\rectotextnotesheadername} +\rectotextnotesheadername={Textual Notes to} +\newcommand{\changerectotextnotesheader}[1]{\rectotextnotesheadername={#1}} +\newtoks{\rectotextnotescontentsname} +\rectotextnotescontentsname={Textual Notes} +\newcommand{\changerectotextnotescontentsname}[1]{% +\rectotextnotescontentsname={#1}} +% two column notes +\newif\ifrectotextnotestwocol +\rectotextnotestwocolfalse +% rectotextnotes section setup +\newcommand{\makerectotextnotes}{\global\textnotesontrue + \newwrite\rectotextnotes + \global\verselinenumberstrue + \immediate\openout\rectotextnotes=\jobname.rtn + \literalrectotextnote{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead{} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\rectotextnotesheadername~\mymarks}}} +\fancyhead[CE]{{\small{\em \the\rectotextnotesheadername~\mymarks}}} +\fancyfoot{} +\mark{3} +\setendnotessectiontitle{\the\rectotextnotesname}{rectotextnotes} +\tolerance=500\language=0 +\normalfont \backmattertextfont +\ifrectotextnotestwocol +\begin{multicols}{2} +\fi +\setlength{\parindent}{-10pt} +} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\rectotextnote} +% \begin{macrocode} +\newif\ifrectotextnotessinglepar +\newif\ifnorectotextnoteyet +\newcommand{\literalrectotextnote}[1]{\begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\rectotextnotes{\expandafter\strip\meaning\next}% + \endgroup +} +\newcommand{\firstrectotextnote}{\immediate\write\rectotextnotes{\rectotitletoothernotes} + \ifrectotextnotessinglepar% + \literalrectotextnote{\par}% + \fi% ifrectotextnotessinglepar +} +\newcommand{\rectotextnote}[2][0]{\rectotitleinnotescheck + \setlemmarange{#1}% + \ifnorectotextnoteyet % firstrectotextnote + \firstrectotextnote + \fi %norectotextnoteyet + \global\norectotextnoteyetfalse +\immediate\write\rectotextnotes{\checknoteheaders}% + \literalrectotextnote{#2}% + \ifrectotextnotessinglepar% + \literalrectotextnote{\par}% + \fi% ifrectotextnotessinglepar +\resetlemmacounters +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\makeversoemendations} +% Next, the versoemendations section: +% \begin{macrocode} +% tokens for changing the names of these notes +\newtoks{\versoemendationsname} +\versoemendationsname={EMENDATIONS} +\newcommand{\changeversoemendationsname}[1]{\versoemendationsname={#1}} +\newtoks{\versoemendationsheadername} +\versoemendationsheadername={Emendations to} +\newcommand{\changeversoemendationsheader}[1]{\versoemendationsheadername={#1}} +\newtoks{\versoemendationscontentsname} +\versoemendationscontentsname={Emendations} +\newcommand{\changeversoemendationscontentsname}[1]{% +\versoemendationscontentsname={#1}} +% two column notes +\newif\ifversoemendationstwocol +\versoemendationstwocolfalse +% versoemendations section setup +\newcommand{\makeversoemendations}{\global\emendationsontrue + \newwrite\versoemendations + \global\verselinenumberstrue + \immediate\openout\versoemendations=\jobname.vem + \literalversoemendation{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead{} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\versoemendationsheadername~\mymarks}}} +\fancyhead[CE]{{\small{\em \the\versoemendationsheadername~\mymarks}}} +\fancyfoot{} +\mark{3} +\setendnotessectiontitle{\the\versoemendationsname}{versoemendations} +\tolerance=500\language=0 +\normalfont \backmattertextfont +\ifversoemendationstwocol +\begin{multicols}{2} +\fi +\setlength{\parindent}{-10pt} +} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\versoemendation} +% \begin{macrocode} +\newif\ifversoemendationssinglepar +\newif\ifnoversoemendationyet +\newcommand{\literalversoemendation}[1]{\begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\versoemendations{\expandafter\strip\meaning\next}% + \endgroup +} +\newcommand{\firstversoemendation}{\immediate\write\versoemendations{\versotitletoothernotes} + \ifversoemendationssinglepar% + \literalversoemendation{\par}% + \fi% ifversoemendationssinglepar +} +\newcommand{\versoemendation}[2][0]{\versotitleinnotescheck% + \setlemmarange{#1}% + \ifnoversoemendationyet % firstversoemendation + \firstversoemendation + \fi %noversoemendationyet + \global\noversoemendationyetfalse +\immediate\write\versoemendations{\checknoteheaders}% + \literalversoemendation{#2}% + \ifversoemendationssinglepar% + \literalversoemendation{\par}% + \fi% ifversoemendationssinglepar +\resetlemmacounters +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\makerectoemendations} +% Next, the rectoemendations section: +% \begin{macrocode} +% tokens for changing the names of these notes +\newtoks{\rectoemendationsname} +\rectoemendationsname={EMENDATIONS} +\newcommand{\changerectoemendationsname}[1]{\rectoemendationsname={#1}} +\newtoks{\rectoemendationsheadername} +\rectoemendationsheadername={Emendations to} +\newcommand{\changerectoemendationsheader}[1]{\rectoemendationsheadername={#1}} +\newtoks{\rectoemendationscontentsname} +\rectoemendationscontentsname={Emendations} +\newcommand{\changerectoemendationscontentsname}[1]{% +\rectoemendationscontentsname={#1}} +% two column notes +\newif\ifrectoemendationstwocol +\rectoemendationstwocolfalse +% rectoemendations section setup +\newcommand{\makerectoemendations}{\global\emendationsontrue + \newwrite\rectoemendations + \global\verselinenumberstrue + \immediate\openout\rectoemendations=\jobname.rem + \literalrectoemendation{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead{} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\rectoemendationsheadername~\mymarks}}} +\fancyhead[CE]{{\small{\em \the\rectoemendationsheadername~\mymarks}}} +\fancyfoot{} +\mark{3} +\setendnotessectiontitle{\the\rectoemendationsname}{rectoemendations} +\tolerance=500\language=0 +\normalfont \backmattertextfont +\ifrectoemendationstwocol +\begin{multicols}{2} +\fi +\setlength{\parindent}{-10pt} +} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\rectoemendation} +% \begin{macrocode} +\newif\ifrectoemendationssinglepar +\newif\ifnorectoemendationyet +\newcommand{\literalrectoemendation}[1]{\begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\rectoemendations{\expandafter\strip\meaning\next}% + \endgroup +} +\newcommand{\firstrectoemendation}{\immediate\write\rectoemendations{\rectotitletoothernotes} + \ifrectoemendationssinglepar% + \literalrectoemendation{\par}% + \fi% ifrectoemendationssinglepar +} +\newcommand{\rectoemendation}[2][0]{\rectotitleinnotescheck + \setlemmarange{#1}% + \ifnorectoemendationyet % firstrectoemendation + \firstrectoemendation + \fi %norectoemendationyet + \global\norectoemendationyetfalse +\immediate\write\rectoemendations{\checknoteheaders}% + \literalrectoemendation{#2}% + \ifrectoemendationssinglepar% + \literalrectoemendation{\par}% + \fi% ifrectoemendationssinglepar +\resetlemmacounters +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\makeversoexplanatorynotes} +% And the verso explanatory notes: +% \begin{macrocode} +% Tokens to change names of these notes +\newtoks{\versoexplanationsname} +\versoexplanationsname={EXPLANATORY NOTES} +\newcommand{\changeversoexplanationsname}[1]{\versoexplanationsname={#1}} +\newtoks{\versoexplanationsheadername} +\versoexplanationsheadername={Explanatory Notes to} +\newcommand{\changeversoexplanationsheader}[1]{\versoexplanationsheadername={#1}} +\newtoks{\versoexplanationscontentsname} +\versoexplanationscontentsname={Explanatory Notes} +\newcommand{\changeversoexplanationscontentsname}[1]{% +\versoexplanationscontentsname={#1}} +% Two column notes +\newif\ifversoexplanationstwocol +\versoexplanationstwocolfalse +% versoexplanatory notes setup +\newcommand{\makeversoexplanatorynotes}{\global\explanontrue + \global\verselinenumberstrue + \newwrite\versoexplanations + \immediate\openout\versoexplanations=\jobname.vex + \literalversoexplain{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\versoexplanationsheadername~\mymarks}}} +\fancyhead[CE]{{\small{\em \the\versoexplanationsheadername~\mymarks}}} +\fancyfoot{} +\mark{3} +\setendnotessectiontitle{\the\versoexplanationsname}{versoexplanatorynotes} +\tolerance=500\language=0 +\normalfont \backmattertextfont +\ifversoexplanationstwocol +\begin{multicols}{2} +\fi +\setlength{\parindent}{-10pt} +} +} +% \begin{macro}{\versoexplanatory} +% Again, |\firstversoexplanatory| is internal, called by |\versoexplanatory|. +% \begin{macrocode} +\newcommand{\literalversoexplain}[1]{ + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\versoexplanations{\expandafter\strip\meaning\next}% + \endgroup +} +\newif\ifversoexplanationssinglepar +\newcommand{\firstversoexplanatory}{\immediate\write\versoexplanations{\versotitletoothernotes} + \ifversoexplanationssinglepar% + \literalversoexplain{\par}% +\fi} +\newif\ifnoversoexplainyet +\newcommand{\versoexplanatory}[2][0]{\versotitleinnotescheck% +\ifexplanon + \setlemmarange{#1}% + \ifnoversoexplainyet % first versoexplanation + \firstversoexplanatory + \fi %noversoexplainyet + \global\noversoexplainyetfalse +\immediate\write\versoexplanations{\checknoteheaders}% + \literalversoexplain{#2}% + \ifversoexplanationssinglepar% + \literalversoexplain{\par}% + \fi% + \fi % ifexplanon +\resetlemmacounters +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\makerectoexplanatorynotes} +% And the recto explanatory notes: +% \begin{macrocode} +% Tokens to change names of these notes +\newtoks{\rectoexplanationsname} +\rectoexplanationsname={EXPLANATORY NOTES} +\newcommand{\changerectoexplanationsname}[1]{\rectoexplanationsname={#1}} +\newtoks{\rectoexplanationsheadername} +\rectoexplanationsheadername={Explanatory Notes to} +\newcommand{\changerectoexplanationsheader}[1]{\rectoexplanationsheadername={#1}} +\newtoks{\rectoexplanationscontentsname} +\rectoexplanationscontentsname={Explanatory Notes} +\newcommand{\changerectoexplanationscontentsname}[1]{% +\rectoexplanationscontentsname={#1}} +% Two column notes +\newif\ifrectoexplanationstwocol +\rectoexplanationstwocolfalse +% rectoexplanatory notes setup +\newcommand{\makerectoexplanatorynotes}{\global\explanontrue + \global\verselinenumberstrue + \newwrite\rectoexplanations + \immediate\openout\rectoexplanations=\jobname.rex + \literalrectoexplain{\flushbottom{\par\clearpage + {\pagestyle{volumetitlestyle}\cleardoublepage} +\thispagestyle{volumetitlestyle}} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\rectoexplanationsheadername~\mymarks}}} +\fancyhead[CE]{{\small{\em \the\rectoexplanationsheadername~\mymarks}}} +\fancyfoot{} +\mark{3} +\setendnotessectiontitle{\the\rectoexplanationsname}{rectoexplanatorynotes} +\tolerance=500\language=0 +\normalfont \backmattertextfont +\ifrectoexplanationstwocol +\begin{multicols}{2} +\fi +\setlength{\parindent}{-10pt} +} +} +% \begin{macro}{\rectoexplanatory} +% Again, |\firstrectoexplanatory| is internal, called by |\rectoexplanatory|. +% \begin{macrocode} +\newcommand{\literalrectoexplain}[1]{ + \begingroup + \def\next{#1}% + \newlinechar='40 + \immediate\write\rectoexplanations{\expandafter\strip\meaning\next}% + \endgroup +} +\newif\ifrectoexplanationssinglepar +\newcommand{\firstrectoexplanatory}{\immediate\write\rectoexplanations{\rectotitletoothernotes} + \ifrectoexplanationssinglepar% + \literalrectoexplain{\par}% + \fi% +} +\newif\ifnorectoexplainyet +\newcommand{\rectoexplanatory}[2][0]{\rectotitleinnotescheck% +\ifexplanon + \setlemmarange{#1}% + \ifnorectoexplainyet % first rectoexplanation + \firstrectoexplanatory + \fi %norectoexplainyet + \global\norectoexplainyetfalse +\immediate\write\rectoexplanations{\checknoteheaders}% + \literalrectoexplain{#2}% + \ifrectoexplanationssinglepar% + \literalrectoexplain{\par}% + \fi% + \fi % ifexplanon +\resetlemmacounters +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\versoprosetextnote} +% \begin{macrocode} +\newcommand{\versoprosetextnote}[3][0]{% +\iftextnoteson% +\versotitleinnotescheck +\unskip\proselinelabel{#2}% +\setproselemmarange{#2}{#1}% + \ifnoversotextnoteyet % firstversotextnote + \firstversotextnote + \fi %noversotextnoteyet + \global\noversotextnoteyetfalse +\immediate\write\versotextnotes{\checkprosenoteheaders}% +\literalversotextnote{#3}% +\ifversotextnotessinglepar% +\literalversotextnote{\par}% +\fi% +\resetlemmacounters% +\fi\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\versoproseemendation} +% Notice that it calls |\firstemendation| as usual. +% \begin{macrocode} +\newcommand{\versoproseemendation}[3][0]{% +\ifemendationson% +\versotitleinnotescheck +\unskip\proselinelabel{#2}% +\setproselemmarange{#2}{#1}% + \ifredundantemendations + \iftextnoteson + \ifrangelemma + \versoprosetextnote[#1]{#2}{#3}% + \else + \versoprosetextnote{#2}{#3}% + \fi % ifrangelemma} + \fi %iftextnoteson +\ifversotextnotessinglepar% +\literalversotextnote{\par}% +\fi% iftextnotessinglepar + \fi % ifredundantemendations + \ifnoversoemendationyet % firstemendation + \firstversoemendation + \fi%noemendyet + \global\noversoemendationyetfalse +\immediate\write\versoemendations{\checkprosenoteheaders}% + \literalversoemendation{#3}% +\ifversoemendationssinglepar% +\literalversoemendation{\par}% +\fi% ifemendationssinglep + \resetlemmacounters% +\fi\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\versoproseexplanatory} +% \begin{macrocode} +\newcommand{\versoproseexplanatory}[3][0]{% +\ifexplanon% +\versotitleinnotescheck +\unskip\proselinelabel{#2}% +\setproselemmarange{#2}{#1}% + \ifnoversoexplainyet% firstexplanation + \firstversoexplanatory% + \fi%noexplainyet + \global\noversoexplainyetfalse% +\immediate\write\versoexplanations{\checkprosenoteheaders}% + \literalversoexplain{#3}% +\ifversoexplanationssinglepar% + \literalversoexplain{\par}% + \fi% ifexplanationssinglepar + \resetlemmacounters% +\fi\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\rectoprosetextnote} +% \begin{macrocode} +\newcommand{\rectoprosetextnote}[3][0]{% +\iftextnoteson% +\rectotitleinnotescheck +\unskip\proselinelabel{#2}% +\setproselemmarange{#2}{#1}% + \ifnorectotextnoteyet % firstrectotextnote + \firstrectotextnote + \fi %norectotextnoteyet + \global\norectotextnoteyetfalse +\immediate\write\rectotextnotes{\checkprosenoteheaders}% +\literalrectotextnote{#3}% +\ifrectotextnotessinglepar% +\literalrectotextnote{\par}% +\fi% +\resetlemmacounters% +\fi\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\rectoproseemendation} +% Notice that it calls |\firstemendation| as usual. +% \begin{macrocode} +\newcommand{\rectoproseemendation}[3][0]{% +\ifemendationson% +\rectotitleinnotescheck +\unskip\proselinelabel{#2}% +\setproselemmarange{#2}{#1}% + \ifredundantemendations + \iftextnoteson + \ifrangelemma + \rectoprosetextnote[#1]{#2}{#3}% + \else + \rectoprosetextnote{#2}{#3}% + \fi % ifrangelemma} + \fi %iftextnoteson +\ifrectotextnotessinglepar% +\literalrectotextnote{\par}% +\fi% iftextnotessinglepar + \fi % ifredundantemendations + \ifnorectoemendationyet % firstemendation + \firstrectoemendation + \fi%noemendyet + \global\norectoemendationyetfalse +\immediate\write\rectoemendations{\checkprosenoteheaders}% + \literalrectoemendation{#3}% +\ifrectoemendationssinglepar% +\literalrectoemendation{\par}% +\fi% ifemendationssinglep + \resetlemmacounters% +\fi\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\rectoproseexplanatory} +% \begin{macrocode} +\newcommand{\rectoproseexplanatory}[3][0]{% +\ifexplanon% +\rectotitleinnotescheck +\unskip\proselinelabel{#2}% +\setproselemmarange{#2}{#1}% + \ifnorectoexplainyet% firstexplanation + \firstrectoexplanatory% + \fi%noexplainyet + \global\norectoexplainyetfalse% +\immediate\write\rectoexplanations{\checkprosenoteheaders}% + \literalrectoexplain{#3}% +\ifrectoexplanationssinglepar% + \literalrectoexplain{\par}% + \fi% ifexplanationssinglepar + \resetlemmacounters% +\fi\unskip% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmclresetsettitleinnotes} +% \begin{macrocode} +\newcommand{\pmclresetsettitleinnotes}{% +\noversoemendationyettrue% +\noversoexplainyettrue% +\noversotextnoteyettrue% +\norectoemendationyettrue% +\norectoexplainyettrue% +\norectotextnoteyettrue% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmclversoresetsettitleinnotes} +% \begin{macrocode} +\newcommand{\pmclversoresetsettitleinnotes}{% +\noversoemendationyettrue% +\noversoexplainyettrue% +\noversotextnoteyettrue% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\pmclrectoresetsettitleinnotes} +% \begin{macrocode} +\newcommand{\pmclrectoresetsettitleinnotes}{% +\norectoemendationyettrue% +\norectoexplainyettrue% +\norectotextnoteyettrue% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\literalexplain} +% \begin{macrocode} +\let\literalexplanatory=\literalexplain +\let\literalversoexplanatory=\literalversoexplain +\let\literalrectoexplanatory=\literalrectoexplain +% \end{macrocode} +% \end{macro} +% \begin{macro}{\putversotextnotes} Does the same for textual notes. +% +% \begin{macrocode} +\newcommand{\putversotextnotes}{ +\iftextnoteson +\ifversotextnotestwocol +\literalversotextnote{\end{multicols}} +\fi %\iftextnotetwocol + \newpage + \hyphenationforsmall + \immediate\closeout\versotextnotes + \input \jobname.vtn +\contentsendnotestitle{\the\versotextnotescontentsname}{versotextnotes} +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\putrectotextnotes} Does the same for recto textual notes. +% +% \begin{macrocode} +\newcommand{\putrectotextnotes}{ +\iftextnoteson +\ifrectotextnotestwocol +\literalrectotextnote{\end{multicols}} +\fi %\iftextnotetwocol + \newpage + \hyphenationforsmall + \immediate\closeout\rectotextnotes + \input \jobname.rtn +\contentsendnotestitle{\the\rectotextnotescontentsname}{rectotextnotes} +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\putversoemendations} This macro closes external file +% for verso emendations, +% reads it in, and puts an entry for the emendations into the table of contents +% file. The macro tests to see whether there is an .aux file from a previous run +% before doing this, and complains in the .log file if the .aux file does not +% exist. +% +% \begin{macrocode} +\newcommand{\putversoemendations}{ +\ifemendationson +\ifversoemendationstwocol +\literalversoemendation{\end{multicols}} +\fi %\iftextnotetwocol + \newpage + \hyphenationforsmall + \immediate\closeout\versoemendations + \input \jobname.vem +\contentsendnotestitle{\the\versoemendationscontentsname}{versoemendations} +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\putrectoemendations} This macro closes external file +% for recto emendations, +% reads it in, and puts an entry for the emendations into the table of contents +% file. The macro tests to see whether there is an .aux file from a previous run +% before doing this, and complains in the .log file if the .aux file does not +% exist. +% +% \begin{macrocode} +\newcommand{\putrectoemendations}{ +\ifemendationson +\ifrectoemendationstwocol +\literalrectoemendation{\end{multicols}} +\fi %\iftextnotetwocol + \newpage + \hyphenationforsmall + \immediate\closeout\rectoemendations + \input \jobname.rem +\contentsendnotestitle{\the\rectoemendationscontentsname}{rectoemendations} +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\putversoexplanatorynotes} Does the same for verso explanatory notes. +% \begin{macrocode} +\newcommand{\putversoexplanatorynotes}{ +\ifexplanon +\ifversoexplanationstwocol +\literalversoexplain{\end{multicols}} +\fi %\iftextnotetwocol + \newpage + \hyphenationforsmall + \immediate\closeout\versoexplanations + \input \jobname.vex +\ifpoemcontentson + \ifexplanon +\contentsendnotestitle{\the\versoexplanationscontentsname}{versoexplanatorynotes} + \fi +\fi +\else + \relax +\fi}% \end{macrocode} +% \end{macro} +% \begin{macro}{\putrectoexplanatorynotes} Does the same for recto explanatory notes. +% \begin{macrocode} +\newcommand{\putrectoexplanatorynotes}{ +\ifexplanon +\ifrectoexplanationstwocol +\literalrectoexplain{\end{multicols}} +\fi %\iftextnotetwocol + \newpage + \hyphenationforsmall + \immediate\closeout\rectoexplanations + \input \jobname.rex +\ifpoemcontentson + \ifexplanon +\contentsendnotestitle{\the\rectoexplanationscontentsname}{rectoexplanatorynotes} + \fi +\fi +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \subsection{~Parallel Texts in Prose} +% First, some booleans. +% \begin{macro}{\ifversopassagestillopen} +% \begin{macrocode} +\newif\ifversopassagestillopen +\versopassagestillopenfalse +\newif\ifrectopassagestillopen +\rectopassagestillopenfalse +% \end{macrocode} +% \end{macro} +% When the last recto page ended, was the last paragraph finished? +% True means the next recto should continue the paragraph from the last recto +% \begin{macro}{\ifinpara} +% \begin{macrocode} +\newif\ifinpara +\inparafalse +\newif\ifrectoparapending +\rectoparapendingfalse +\newif\ifrectoparaopen +\rectoparaopenfalse +\newif\ifversoparapending +\versoparapendingfalse +\newif\ifversoparaopen +\versoparaopenfalse +% \end{macrocode} +% \end{macro} +% Counters: prosepage versoproselinecounter, etc., and commands to set them. +% \begin{macro}{\makeprosepagelabel} +% \begin{macrocode} +\newcounter{prosepage} +\setcounter{prosepage}{1} +\newcommand{\makeprosepagelabel}{\proselinelabel{prosepageno\theprosepage}} +\newcounter{versoproselinecounter} +\newcommand{\saveversoproseline}{% +\refstepcounter{prosepage}% +\makeprosepagelabel +\setcounterfromref{versoproselinecounter}{prosepageno\theprosepage} +} +\newcommand{\restoreversoproseline}{\setcounter{linenumber}{\value{versoproselinecounter}}}% +\newcounter{rectoproselinecounter} +\newcommand{\saverectoproseline}{% +\refstepcounter{prosepage}% +\makeprosepagelabel +\setcounterfromref{rectoproselinecounter}{prosepageno\theprosepage} +} +\newcommand{\restorerectoproseline}{\setcounter{linenumber}% + {\value{rectoproselinecounter}}}% +% \end{macrocode} +% \end{macro} +% The |\parastart| and |\paraend| macros, to mark the beginning and end +% of paragraphs +% \begin{macro}{\parastart} +% \begin{macrocode} +\newcommand{\parastart}{\inparatrue} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\paraend} +% \begin{macrocode} +\newcommand{\paraend}{\inparafalse} +% \end{macrocode} +% \end{macro} +% |\startparalleltextsprose| and |\finishparalleltextsprose| +% \begin{macro}{\startparalleltextsprose} +% \begin{macrocode} +\newcommand{\startparalleltextsprose}{% +\leavevmode +\cleartoverso +\paralleltextstrue +\inparafalse +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\finishparalleltextsprose} +% \begin{macrocode} +\newcommand{\finishparalleltextsprose}{% +\paralleltextsfalse} +% \end{macrocode} +% \end{macro} +% \begin{macro}{parallelprose} +% \begin{macrocode} +\newenvironment{parallelprose}{\startparalleltextprose} {\finishparalleltextsprose} +% \end{macrocode} +% \end{macro} +% |\startversoprosepage| +% \begin{macro}{\startversoprosepage} +% \begin{macrocode} +\newcommand{\startversoprosepage}{% +\let\titletoothernotes=\versotitletoothernotes +\restoreversoproseline% +\ifversoparapending{\inparatrue}\else{\inparafalse}\fi% +\ifinpara{\noindent}\else{\relax}\fi% +} +% \end{macrocode} +% \end{macro} +% |\finishversoprosepage| +% \begin{macro}{\finishversoprosepage} +% \begin{macrocode} +\newcommand{\finishversoprosepage}{% +\ifinpara{\versoparapendingtrue}\else{\versoparapendingfalse}\fi% +\saveversoproseline% +} +% \end{macrocode} +% \end{macro} +% |\startrectoprosepage| +% \begin{macro}{\startrectoprosepage} +% \begin{macrocode} +\newcommand{\startrectoprosepage}{% +\let\titletoothernotes=\rectotitletoothernotes +\restorerectoproseline% +\ifrectoparapending{\inparatrue}\else{\inparafalse}\fi% +\ifinpara{\noindent}\else{\relax}\fi% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\finishrectoprosepage} +% \begin{macrocode} +\newcommand{\finishrectoprosepage}{% +\ifinpara{\rectoparapendingtrue}\else{\rectoparapendingfalse}\fi% +\saverectoproseline +} +% \end{macrocode} +% \end{macro} +% \subsection{~Finishing up} +% \begin{macro}{\finish} +% The |\finish| macro reads in the notes, +% the index (previously created from your .aux file by MakeIndex), and +% the contents sections and sets them. The notes sections send page +% information to the contents file as they are set. Then the page +% information for the index is sent to the contents file. Finally the +% contents file is closed and read in. If you have an editor's +% introduction or a list of abbreviations, copy this macro, uncomment out the commented out lines, +% and issue it all as a |\renewcommand| for |\finish|. Be sure to +% have the command |\label{editorsintroduction}| on the first page of +% your introduction. + +% It usually takes three +% passes to get the table of contents and the index files correct. +% +% The consequence of doing using |\finish| is that the table of +% contents comes last. There are ways around this that are described +% earlier. The notes sections are all typeset in the |\small| size. +% +% \begin{macrocode} +\newcommand{\finish}{ +\small\bf \hyphenchar\font=45 +\small\it \hyphenchar\font=45 +\small\rm \hyphenchar\font=45 + +\ifemendationson + \newpage + \immediate\closeout\emendations + \input \jobname.emd +\fi +\iftextnoteson + \newpage + \immediate\closeout\textnotes + \input \jobname.ent + \newpage + \fi + \ifexplanon + \immediate\closeout\explanations + \input \jobname.enx + \newpage + \fi + \ifindexingon + \printindex + \fi + \ifpoemcontentson +% \immediate\write\poemcontents{\string\vspace{10pt}\string\par} +% \immediate\write +% \poemcontents{\string\contentspoemtitlefont\ Introduction to the Notes} +% \immediate\write +% \poemcontents{\string~ / \string~\ \string\pageref{editorsintroduction} \string\par} +% \immediate\write\poemcontents{\string\par \string\smallskip} +% \immediate\write\poemcontents{\string\contentspoemtitlefont\ Abbreviations} +% \immediate\write +% \poemcontents{\string~ / \string~\ \string\pageref{abbreviations} \string\par} +% \immediate\write\poemcontents{\string\par \string\smallskip} + \ifemendationson + \immediate\write\poemcontents{\string\contentspoemtitlefont\ + \the\emendationscontentsname} + \immediate\write +\poemcontents{\string~ / \string~\ \string\pageref{emendationnotes} \string\par} + \immediate\write\poemcontents{\string\par \string\smallskip} + \fi + \iftextnoteson + \immediate\write\poemcontents{\string\contentspoemtitlefont\ + \the\textnotescontentsname} + \immediate\write +\poemcontents{\string~ / \string~\ \string\pageref{textualnotes} \string\par} + \immediate\write\poemcontents{\string\par \string\smallskip} + \fi + \ifexplanon + \immediate\write +\poemcontents{\string\contentspoemtitlefont\ \the\explanationscontentsname} + \immediate\write +\poemcontents{\string~ / \string~\ \string\pageref{explanatorynotes}} + \fi + \ifindexingon + \immediate\write\poemcontents{\string\par \string\smallskip} + \immediate\write +\poemcontents{\string\contentspoemtitlefont\ \the\poemindexcontentsname} + \immediate\write +\poemcontents{\string~ / \string~\ \string\pageref{indexpage}\string\par} + \fi + \immediate\closeout\poemcontents + \input \jobname.ctn + \fi + \clearpage +\thispagestyle{volumetitlestyle} +\vspace{106pt} +\begin{center} +{\poemtitlefont Note} +\end{center} + +\noindent The symbol \stanzaatbottomvalue\ is used to indicate +a space between sections of a poem +wherever such spaces are lost in pagination. +\cleardoublepage +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\testforauxonfirstrun} Put this in the preamble. It suppresses +% |\finish|, |\puttextnotes|, |\putemendations|, and |\putexplanatory| unless +% there is an .aux file from a previous run, this avoiding some error messages. +% +% \begin{macrocode} +\newcommand{\testforauxonfirstrun}{\IfFileExists{\jobname.aux}{\relax} +{\let\finish=\relax +\let\puttextnotes=\relax +\let\putexplanatory=\relax +\let\putemendations=\relax +\typeout{Run again to read in endnotes files}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\putpoemcontents} +% You may wish to do the tasks done by |\finish| separately. This will give you +% more flexibility. |\putpoemcontents| inserts the table of contents file from a +% prior run. Be sure to issue it \emph{before} you issue |\makepoemcontents.| + +% \begin{macrocode} +\newcommand{\putpoemcontents}{ +\IfFileExists{\jobname.ctn}{\input \jobname.ctn +\clearpage \resetpagestyle\normalsize} +{\typeout{Run again to input contents file here}} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\hyphenationforsmall} This command restores hyphenation for the +% backmatter sections of the book. Hyphenation is turned off in the main body of +% the book, because verse should not be hyphenated. This macro turns hyphenation +% on, but only for small roman, italic, and bold fonts. Backmatter sections are +% all set in |\small|. |\putemendations|, |\puttextnotes|, and +% |\putexplanatory| all call |\hyphenationforsmall|. +% +% \begin{macrocode} +\newcommand{\hyphenationforsmall}{\small\bf \hyphenchar\font=45 +\small\it \hyphenchar\font=45 +\small\rm \hyphenchar\font=45 +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\putemendations} This macro closes external file for emendations, +% reads it in, and puts an entry for the emendations into the table of contents +% file. The macro tests to see whether there is an .aux file from a previous run +% before doing this, and complains in the .log file if the .aux file does not +% exist. +% +% \begin{macrocode} +\newcommand{\putemendations}{ +\ifemendationson +\ifemendationstwocol +\literalemend{\end{multicols}} +\fi %\iftextnotetwocol + \newpage + \hyphenationforsmall + \immediate\closeout\emendations + \input \jobname.emd +\contentsendnotestitle{\the\emendationscontentsname}{emendationnotes} +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\putexplanatory} Does the same for explanatory notes. +% +% \begin{macrocode} +\newcommand{\putexplanatory}{ +\ifexplanon +\ifexplanationstwocol +\literalexplain{\end{multicols}} +\fi %\iftextnotetwocol + \newpage + \hyphenationforsmall + \immediate\closeout\explanations + \input \jobname.enx +\ifpoemcontentson + \ifexplanon +\contentsendnotestitle{\the\explanationscontentsname}{explanatorynotes} + \fi +\fi +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\puttextnotes} Does the same for textual notes. +% +% \begin{macrocode} +\newcommand{\puttextnotes}{ +\iftextnoteson +\iftextnotestwocol +\literaltextnote{\end{multicols}} +\fi %\iftextnotetwocol + \newpage + \hyphenationforsmall + \immediate\closeout\textnotes + \input \jobname.ent +\contentsendnotestitle{\the\textnotescontentsname}{textualnotes} +\else + \relax +\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\putpoemindex} Reads in the index of titles and first lines +% and adds an entry for the index +% into the table of contents. +% +% \begin{macrocode} +\newtoks{\poemindexname} +\poemindexname={Index of Titles and First Lines} +\newcommand{\changepoemindexname}[1]{\poemindexname={#1}} +\newtoks{\poemindexheadername} +\poemindexheadername={Index of Titles and First Lines} +\newcommand{\changepoemindexheader}[1]{\poemindexheadername={#1}} +\newtoks{\poemindexcontentsname} +\poemindexcontentsname={Index of Titles and First Lines} +\newcommand{\changepoemindexcontentsname}[1]{\poemindexcontentsname={#1}} +\newcommand{\putpoemindex}{\ifindexingon + \printindex + \fi + \ifpoemcontentson\ifindexingon + \immediate\write\poemcontents{\string\par \string\smallskip} + \immediate\write +\poemcontents{\string\contentspoemtitlefont\ \the\poemindexcontentsname} + \immediate\write +\poemcontents{\string~\string\contentsleaders \string~\ \string\pageref{indexpage}\string\par} + \fi\fi} +\newcommand{\putmultiplepoemindex}[4]{% +\ifindexingon +\poemindexname={#2} +\poemindexheadername={#3} +\poemindexcontentsname={#4} +\poemindexlabelname={#4} +\printindex[#1][#2] +\fi +\ifpoemcontentson\ifindexingon + \immediate\write\poemcontents{\string\par \string\smallskip} + \immediate\write +\poemcontents{\string\contentspoemtitlefont\ \the\poemindexcontentsname} + \immediate\write +\poemcontents{\string~ \string\contentsleaders \string~\ +\string\pageref{\the\poemindexlabelname}\string\par} + \fi\fi +} +\newcommand{\noteaboutstanzamarkpage}{\begin{volumetitlepage} +%\thispagestyle{volumetitlestyle} +\vspace{106pt} +\begin{center} +{\poemtitlefont Note} +\end{center} + +\noindent The symbol \stanzaatbottomvalue\ is used to indicate +a space between sections of a poem +wherever such spaces are lost in pagination. +\end{volumetitlepage}} +% \end{macrocode} +% \end{macro} +% \subsection{~Visual formatting} The ideal in \LaTeX\ is to separate +% content markup and formatting as completely as possible. In the text +% itself you simply mark the logical units (a poem, a title, a stanza, +% a textual note), and a header program like this interprets the +% meaning of those terms typographically. However, one still winds up +% having to do some visual formatting. Sometimes you have to enlarge or +% shrink a page by one line in order to avoid an intractable widow or +% club line, and when one does so one must be careful to do the same to +% the other member of the two-page spread of which that page is a part. +% These commands enable one to wiggle pagelength enough to handle these +% problems. +% \begin{macrocode} +\newcommand{\longpage}{\enlargethispage{\baselineskip}} +\newcommand{\shortpage}{\enlargethispage{-\baselineskip}} +% \end{macrocode} +% + +% \subsection{~Special environments: cjquotation and theindex} +% An environment for special prose quotations within verse +% as in ``Chief Joseph of the Nez Perce'' +% +% \goodbreak +% +% \begin{macro}{cjquotation} +% \begin{macrocode} +\newenvironment{cjquotation} + {\tolerance=2000% + \vspace{-\bigskipamount} + \restoreverselinenumber + \language=255 + \noindent\relax + \list{}{\listparindent 0em% + \itemindent 0em% + \rightmargin 2em% + \leftmargin 2em% + \topsep 0em% + \parskip 0em% + \itemindent \listparindent + \rightmargin \leftmargin + \parsep \z@ \@plus\p@}% + \item[] + } + {\endlist} +% \end{macrocode} +% \end{macro} +% \begin{macro}{theindex} +% And the environment for the index: +% \begin{macrocode} +\newtoks{\poemindexlabelname} +\poemindexlabelname={indexpage} +\newcommand{\changepoemindexlabelname}[1]{\poemindexlabelname={#1}} +\renewenvironment{theindex} + {{\par\clearpage{\pagestyle{volumetitlestyle}\cleardoublepage} + \thispagestyle{volumetitlestyle}} + \makeatletter + \def\pmclidxitem{\par\hangindent 1em} +\fancyhead[RO,LE]{{\small\textrm{\thepage}}} +\fancyhead[CO]{{\small{\em \the\poemindexheadername}}} +\fancyhead[CE]{{\small{\em \the\poemindexheadername}}} +\fancyfoot{} + \label{\the\poemindexlabelname} + \lefthyphenmin=2\tolerance=500\language=0 + \normalfont \backmattertextfont + \raggedright + \begin{multicols} +{2}[\backmattersink\begin{center}{\normalfont +\backmatterheaderfont \the\poemindexname}\end{center} +\backmatterafterheadersink]% + \let\item\pmclidxitem} + {\end{multicols}\clearpage} +\makeatother +% \end{macrocode} +% \end{macro} +% Finally, some other miscellaneous environments. +% \begin{macrocode} +\newlength{\epigraphquoteleftmargin} +\newlength{\epigraphquoterightmargin} +\setlength{\epigraphquoteleftmargin}{1.5em} +\setlength{\epigraphquoterightmargin}{1.5em} +\newif\ifleftalignepigraphs +\leftalignepigraphsfalse +\makeatletter +\newenvironment{epigraphquote}{\list{}{% +\ifleftalignepigraphs\left@ligntitleblock% +\rightmargin 1sp\leftmargin \lefttitlemargin% +\else +\rightmargin\epigraphquoterightmargin% +\leftmargin\epigraphquoteleftmargin% +\fi + \topsep 0pt% + \partopsep 0pt% + \listparindent 0pt% + }% + \item\relax} + {\endlist}\makeatother +\newenvironment{volumetitlepagequote}{\list{}{\rightmargin \voladditionalamount% + \leftmargin \voladditionalamount% + \topsep 0pt% + \partopsep 0pt% + \listparindent 0pt + }% + \item\relax} + {\endlist} +% \end{macrocode} +% \clearpage +% \Finale +\endinput +--------------060108090809060900030409-- |