diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/poemscol/poemscol.pdf | bin | 712470 -> 727493 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/poemscol/poemscol.dtx | 418 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/poemscol/poemscol.sty | 251 |
3 files changed, 618 insertions, 51 deletions
diff --git a/Master/texmf-dist/doc/latex/poemscol/poemscol.pdf b/Master/texmf-dist/doc/latex/poemscol/poemscol.pdf Binary files differindex 8ed00e4557b..8d97ec5b82f 100644 --- a/Master/texmf-dist/doc/latex/poemscol/poemscol.pdf +++ b/Master/texmf-dist/doc/latex/poemscol/poemscol.pdf diff --git a/Master/texmf-dist/source/latex/poemscol/poemscol.dtx b/Master/texmf-dist/source/latex/poemscol/poemscol.dtx index 5794a2d575d..0a360fbd3de 100644 --- a/Master/texmf-dist/source/latex/poemscol/poemscol.dtx +++ b/Master/texmf-dist/source/latex/poemscol/poemscol.dtx @@ -38,7 +38,7 @@ %</driver> % \fi % -% \CheckSum{9964} +% \CheckSum{10539} % % \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 @@ -243,7 +243,7 @@ % attributions, and so on with the left margin of the verse block.} % \changes{v3.01}{2019/08/04}{Corrections to manual} % \changes{v3.04}{2019/08/18}{Appendix sections. New contents entries.} -% \changes{v3.08}{2019/09/03}{Indentations of species of titles in text can be independenttly changed without changing the +% \changes{v3.08}{2019/09/03}{Indentations of species of titles in text can be independently changed without changing the % definition of the title. Appendix and Foreword section titles can be indented differently from notes section titles. } % \changes{v3.081}{2019/09/05}{Fixed centertitles bug for subsections} % \changes{v3.09}{2019/09/06}{New schemes for titles. Titles can be placed @@ -255,7 +255,7 @@ % shortpoemattribution, JHshortepigraph, JHshortdedication. These % commands are controlled by the same booleans that control placement % of titles.} -% \changes{v3.12}{2019/09/05}{Bug fix. Fix command clash with titlesec Manual revision} +% \changes{v3.12}{2019/09/05}{Bug fix. Fix command clash with titlesec. Manual revision} % \changes{v3.13}{2019/09/15}{Fixed subtitles in emendations and explanations, Fixed bug in sequencesectiontitlefirstline, changed sequence hierarchy of indentations, subsubsections of sequences no longer appear in contents} % \changes{v3.14}{2019/09/27}{Bug fix: ifpagenumberinnotesfalse, Manual revision} % \changes{v3.141}{2019/10/27}{Manual revisions. Fixed spacing of sentence and @@ -263,6 +263,9 @@ % sections numbered by paragraph and sentence. You can suppress the appearance of the % first sentence number, whether in the margin or in the running text. You can suppress % the appearance of the first paragraph number, whether in the margin or in the running text.} +% \changes{v3.14159}{2020/05/25}{Changed controlling how to place +% marginal marks in JHpoemtitle and its siblings, and in JHtextnote +% and its siblings. Marginal marks are now set using their own inserts, rather than using marginpar.} % \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\else,\renewcommand,\makeatletter,\makeatother} % \DoNotIndex{\abovedisplayskip,\belowdisplayskip,\abovedisplayshortskip,\belowdisplayshortskip} % \DoNotIndex{\newcommand, \section, \subsection, \subsubsection, @@ -295,15 +298,15 @@ % \textsc, \unskip} % \setcounter{IndexColumns}{2} % \MakeShortVerb{|} -% \def\fileversion{3.141} -% \def\filedate{29 October 2019} -% \def\docdate{29 October 2019} +% \def\fileversion{3.1415} +% \def\filedate{25 May 2020} +% \def\docdate{25 May 2020} % \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{29 October 2019} +% \date{25 May 2020} % \maketitle % \begin{abstract} \textsf{poemscol} provides commands for \LaTeX\ for % setting collections of poetry. It is especially suited for setting @@ -556,15 +559,6 @@ % 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. % % % @@ -632,6 +626,16 @@ % the meaning of |\ifleftaligntitles| ambiguous. So I have changed that boolean to % |\iftitlesatleftmarginofcenteredblock.|\end{sloppypar} % +% Up to version 3.141 the marginal marks associated with poem titles +% set by |\JHpoemtitle| and |\margreftextnote| moved in towards the +% verse block when the verse block is centered on the longest line. +% These marks could be returned to their normal position in the +% margin by setting the boolean |\margrefstomargin| to true. As of +% version 3.141 these marks are set in the margin by default even +% when verse block centering is in effect. The marks can be made to +% move towards the verse block when verse block centering is in +% effect by setting |\margrefstomargin| to false. +% % \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 @@ -2757,15 +2761,18 @@ % 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 +% 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}, +% |\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| @@ -2774,20 +2781,11 @@ % \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. +% want to be issued just after the title is processed. % % \DescribeMacro{\margreftextnote}\label{margreftextnote} % Another feature of Altenberg's Heredia edition is a marginal mark @@ -2803,24 +2801,46 @@ % |\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{sloppy} +% |\margreftextnote| and its siblings use a +% new kind of insert, |\JHmarginpar|, to set the marginal marks. +% This is so that you can control the placement of these marks +% independently of how you place the line numbers (which use +% |\pmclsidepar|) or other marginal marks you may define using +% |\marginpar|. Horizontal placement of the mark is controlled by the +% length |\JHmarginparsep|, which is set by default to 0 pt. Vertical +% placement of the marginal mark, relative to the baseline, is set by +% the length |\JHmarginparvshift|, which is set by default to 0 pt. +% |\JHpoemtitle|, however, uses the same commands to +% control the placement of the mark after the title, and the two +% kinds of mark +% are designed so that they should always align vertically. +% \end{sloppy} +% +% By default these marginal references are placed in the right +% margin. If you wish to set them in the left margin, issue the +% command |\JHmarksleft|. If you wish to place them back into the +% right margin, issue the command |\JHmarksright|. +% If you wish the +% marks to aways be in the outer margin, issue the command +% |\JHmarksouter|. If you wish the marks to always be in the inner +% margin, issue |\JHmarksgutter|. +% +% If you are centering the verse block on the longest line, the verse +% line numbers normally move in towards the verse block. (To center +% the verse block on the longest line, see section +% \ref{centeringtextblock}.) The marginal +% marks for |\margeftextnote| do not do this, since they are designed to +% line up with the marginal mark produced by |\JHpoemtitle|. % % \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} +% with it. So, for example, if you define a new note type called +% |\mynote|, you will automatically also define a ``margref'' command +% called |\margrefmynote| which will place a mark in the margin with +% a label showing where in the end notes sections the text of that +% |\mynote| can be found. \end{sloppypar} % % \DescribeMacro{\setmargrefmarker} Altenberg's edition used a ding % from the pifonts collection in the marginal marks made by @@ -2829,6 +2849,11 @@ % choose another mark using |\setmargrefmarker| (e.g.\ % |\setmargrefmarker{\ding{228}}|). % +% \DescribeMacro{\settitlemargrefmarker} Altenberg's edition also used a +% different marker for marginal marks for the titles of poems from that used +% for marginal marks made by |\margreftextnote|. By default that marker +% is |\dag|, but you can change it by using |\settitlemargrefmarker|, +% % \DescribeMacro{\margrefemendation} |\margrefemendation| is a % version of |\margreftextnote| for emendations. % @@ -7100,6 +7125,256 @@ % |\setmargpoemtitle| with the second argument passed to |\JHlabel|, % which actually makes the marginal mark. % \begin{macrocode} +\newlength{\JHtextwidth} +\setlength{\JHtextwidth}{\textwidth} +\newlength{\JHmarginparsep} +\setlength{\JHmarginparsep}{0pt} +\newlength{\JHmarginparvshift} +\setlength{\JHmarginparvshift}{0pt} +\newif{\ifJHmarkstoleft} +\JHmarkstolefttrue +\newif{\ifJHmarkstoright} +\JHmarkstorightfalse +\newif{\ifJHmarkstoouter} +\JHmarkstoouterfalse +\newif{\ifJHmarkstogutter} +\JHmarkstogutterfalse +\newif{\ifJHmarginparswitch} +\JHmarginparswitchfalse +\newif{\ifJHreversemarginpar} +\JHreversemarginparfalse +\newcommand{\JHmarksleft}{% +\JHmarkstolefttrue% +\JHmarkstorightfalse% +\JHmarkstoouterfalse% +\JHmarkstogutterfalse% +\JHmarginparswitchfalse% +\JHreversemarginparfalse% +\reversemarginpar +} +\newcommand{\JHmarksright}{% +\JHmarkstoleftfalse% +\JHmarkstorighttrue% +\JHmarkstoouterfalse% +\JHmarkstogutterfalse% +\JHmarginparswitchfalse% +\JHreversemarginparfalse% +\normalmarginpar +} +% JHmarksright is the default +\JHmarksright +\newcommand{\JHmarksouter}{% +\JHmarkstoleftfalse% +\JHmarkstorightfalse% +\JHmarkstooutertrue% +\JHmarkstogutterfalse% +\JHmarginparswitchtrue% +\JHreversemarginparfalse% +\@mparswitchtrue +} +\newcommand{\JHmarksgutter}{% +\JHmarkstoleftfalse% +\JHmarkstorightfalse% +\JHmarkstoouterfalse% +\JHmarkstoguttertrue% +\JHmarginparswitchtrue% +\JHreversemarginpartrue% +\@mparswitchtrue +\reversemarginpar +} +% jhrightmarginpar command for notes % right side +\newcommand{\JHrightmarginpar}[1]{% +\pmclbsphack\strut\vadjust{% +\rlap{\kern-\parindent% +\kern\JHtextwidth\kern\JHmarginparsep% at right +\setbox0=\vtop to 0pt{% added +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +\vss}% +\vtop to 0pt{\kern\JHmarginparvshift% default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% +% setmargref command %right side only for now +%\newcommand{\setmargref}{ +%\JHrightmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}} +%} +% jhleftmarginpar command for notes % left side +\newcommand{\JHleftmarginpar}[1]{% +\pmclbsphack\strut\vadjust{% changed +\rlap{\kern-\parindent% +\kern -\JHmarginparsep \kern -\marginparwidth% at left +\setbox0=\vtop to 0pt{ +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +\vss}% changed +\vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% changed +% +%\newcommand{\JHoutermarginpar}{% +%%\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}} +%\checkoddpage% +%\ifoddpage% +%\JHrightmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +%\else% below is for even pages +%\JHleftmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +%\fi% +%} +\newcommand{\JHoutermarginpar}{% +%\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}} +\strictpagechecktrue% +\checkoddpage% +\ifoddpage% +\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\else% below is for even pages +\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\fi% +} +% +%\newcommand{\JHguttermarginpar}{% +%%\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}} +%\checkoddpage% +%\ifoddpage% +% \JHleftmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +%\else% below is for even pages +% \JHrightmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +%\fi% +%} +% +\newcommand{\JHguttermarginpar}{% +\strictpagechecktrue +\checkoddpage% +\ifoddpage% +\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\else% below is for even pages +\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\fi% +} +% +% jhswitchmarginpar command for notes in gutter and outer +% +\newcommand{\JHswitchmarginpar}{\@dblarg{\@JHswitchmarginpar}} +%\long\def\@pmclsidepar[#1]#2{\@bsphack\leavevmode\vadjust{% +\long\def\@JHswitchmarginpar[#1]#2{\@bsphack\strut\vadjust{% added +\checkoddpage + \ifJHmarginparswitch + \ifJHreversemarginpar + \ifoddpage + \oddpagefalse + \else + \oddpagetrue + \fi + \fi + \else + \oddpagetrue + \ifJHreversemarginpar + \oddpagefalse + \fi + \fi + \rlap{\kern-\parindent + \if@twocolumn + \if@firstcolumn % put at left + \kern -\JHmarginparsep \kern -\marginparwidth % at left + \else % put at right + \kern \columnwidth \kern \JHmarginparsep % at right + \fi + \else + \ifoddpage % put at right + \kern \textwidth \kern \JHmarginparsep % at right + \else % put at left + \kern -\JHmarginparsep \kern -\marginparwidth % at left + \fi + \fi +% \vbox to 0pt{% +% \kern \JHmarginparvshift% % 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\JHmarginparvshift % default should be 0pt + \kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\@esphack}% added +% +% commands for placing the marginal marks for titles +% right side +\newcommand{\JHrighttitlemarginpar}[1]{% +\pmclbsphack\strut\vadjust{% +\rlap{\kern-\parindent% +\kern\JHtextwidth\kern\JHmarginparsep% at right +\kern-.5\JHtextwidth\kern\marginparsepmin +\setbox0=\vtop to 0pt{% added +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +\vss}% +\vtop to 0pt{\kern\JHmarginparvshift% default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% +% +% commands for placing the marginal marks for titles +% left side +\newcommand{\JHlefttitlemarginpar}[1]{% +\pmclbsphack\strut\vadjust{% changed +\rlap{\kern-\parindent% +\kern -\JHmarginparsep \kern -\marginparwidth% at left +\kern-.5\JHtextwidth\kern\marginparsepmin +\setbox0=\vtop to 0pt{ +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +\vss}% changed +\vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% changed +% +% command for JHmarks in title in outer margin or in gutter +\newcommand{\JHswitchtitlemarginpar}{\@dblarg{\@JHswitchtitlemarginpar}} +%\long\def\@pmclsidepar[#1]#2{\@bsphack\leavevmode\vadjust{% +\long\def\@JHswitchtitlemarginpar[#1]#2{\@bsphack\strut\vadjust{% added +\checkoddpage + \ifJHmarginparswitch + \ifJHreversemarginpar + \ifoddpage + \oddpagefalse + \else + \oddpagetrue + \fi + \fi + \else + \oddpagetrue + \ifJHreversemarginpar + \oddpagefalse + \fi + \fi + \rlap{\kern-\parindent + \if@twocolumn + \if@firstcolumn % put at left + \kern -\JHmarginparsep \kern -\marginparwidth % at left + \kern-.5\JHtextwidth\kern\marginparsepmin + \else % put at right + \kern \columnwidth \kern \JHmarginparsep % at right + \fi + \else + \ifoddpage % put at right + \kern \textwidth \kern \JHmarginparsep % at right + \kern-.5\JHtextwidth\kern\marginparsepmin + \else % put at left + \kern -\JHmarginparsep \kern -\marginparwidth % at left + \kern-.5\JHtextwidth\kern\marginparsepmin + \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\JHmarginparvshift % default should be 0pt + \kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\@esphack}% added +% \newcommand{\set@margp@emtitle}[7]{\setlength{\titleentryoverrun}{#6}% {#2}% {#3 \begin{titleentryenvironment}% @@ -7144,6 +7419,7 @@ % \newcommand{\JHpoemtitle}[2]{% % \setmargpoemtitle{#1}{\JHlabel{#2}}% % } +\@mparswitchfalse % so the title marker won't switch sides on alternate pages \newcommand{\JHpoemtitle}[2]{% \set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% {\sequencetitleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% @@ -7162,8 +7438,23 @@ \t@xtnotesinfo{#1}% \sources{\label{#2}}% } +%\newcommand{\JHlabel}[1]{% +%\marginpar{{\scriptsize{\the\titlemargrefmarker~p.~\pageref{#1}}}}} \newcommand{\JHlabel}[1]{% -\marginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}}} +\ifJHmarkstoright\JHrighttitlemarginpar +{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}} +\fi +\ifJHmarkstoleft +\JHlefttitlemarginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}} +\fi +\ifJHmarkstoouter +\JHswitchtitlemarginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}} +\fi +\ifJHmarkstogutter +\JHswitchtitlemarginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}} +\fi +} + % \end{macrocode} % \end{macro} % \begin{macro}{\JHsequencetitle} Macros to set marginal page @@ -7265,12 +7556,34 @@ \newtoks{\margrefmarker} \margrefmarker={\dag} \newcommand{\setmargrefmarker}[1]{\margrefmarker={#1}} +\providecommand{\settitlemargrefmarker}[1]{\titlemargrefmarker={#1}} +\newtoks{\titlemargrefmarker} +\titlemargrefmarker={\dag} \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}}} +\margrefstomargintrue +\newcommand{\setmargref}{\nolinebreak\begin{marginenvironment}% +\nolinebreak% +\ifJHmarkstoright% + \JHrightmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\fi% +\ifJHmarkstoleft% + \JHleftmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% + \fi% + \ifJHmarkstoouter% + \JHoutermarginpar% + \fi% + \ifJHmarkstogutter% + \JHguttermarginpar% + \fi% + \end{marginenvironment}% + \nolinebreak% } + +%\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}}} % } @@ -7419,6 +7732,17 @@ \else\setlength{\dateindent}{\leftmargin}% \fi% \bigskip\begin{raggedleft}\hspace{\dateindent}#1\end{raggedleft}\bigskip}% +% +\newlength{\poemattributionindent}% +\setlength{\poemattributionindent}{\leftmargin}% +\newcommand{\variablepoemattributionindent}{% +\setlength{\poemattributionindent}{\linewidth}% +\addtolength{\poemattributionindent}{-\versewidth}% +\addtolength{\poemattributionindent}{-.5\poemattributionindent}}% +\newcommand{\poemattribution}[1]{\iflastpoemcentered\variablepoemattributionindent% +\else\setlength{\poemattributionindent}{\leftmargin}% +\fi% +\bigskip\begin{raggedleft}\hspace{\poemattributionindent}#1\end{raggedleft}\bigskip}% % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/tex/latex/poemscol/poemscol.sty b/Master/texmf-dist/tex/latex/poemscol/poemscol.sty index 89b947b51e8..63730c3b4c0 100644 --- a/Master/texmf-dist/tex/latex/poemscol/poemscol.sty +++ b/Master/texmf-dist/tex/latex/poemscol/poemscol.sty @@ -1823,6 +1823,207 @@ \newcommand{\interjectiontitlemiddleline}[1]{ \sequencefirstsubsectionmiddleline{#1} } +\newlength{\JHtextwidth} +\setlength{\JHtextwidth}{\textwidth} +\newlength{\JHmarginparsep} +\setlength{\JHmarginparsep}{0pt} +\newlength{\JHmarginparvshift} +\setlength{\JHmarginparvshift}{0pt} +\newif{\ifJHmarkstoleft} +\JHmarkstolefttrue +\newif{\ifJHmarkstoright} +\JHmarkstorightfalse +\newif{\ifJHmarkstoouter} +\JHmarkstoouterfalse +\newif{\ifJHmarkstogutter} +\JHmarkstogutterfalse +\newif{\ifJHmarginparswitch} +\JHmarginparswitchfalse +\newif{\ifJHreversemarginpar} +\JHreversemarginparfalse +\newcommand{\JHmarksleft}{% +\JHmarkstolefttrue% +\JHmarkstorightfalse% +\JHmarkstoouterfalse% +\JHmarkstogutterfalse% +\JHmarginparswitchfalse% +\JHreversemarginparfalse% +\reversemarginpar +} +\newcommand{\JHmarksright}{% +\JHmarkstoleftfalse% +\JHmarkstorighttrue% +\JHmarkstoouterfalse% +\JHmarkstogutterfalse% +\JHmarginparswitchfalse% +\JHreversemarginparfalse% +\normalmarginpar +} +\JHmarksright +\newcommand{\JHmarksouter}{% +\JHmarkstoleftfalse% +\JHmarkstorightfalse% +\JHmarkstooutertrue% +\JHmarkstogutterfalse% +\JHmarginparswitchtrue% +\JHreversemarginparfalse% +\@mparswitchtrue +} +\newcommand{\JHmarksgutter}{% +\JHmarkstoleftfalse% +\JHmarkstorightfalse% +\JHmarkstoouterfalse% +\JHmarkstoguttertrue% +\JHmarginparswitchtrue% +\JHreversemarginpartrue% +\@mparswitchtrue +\reversemarginpar +} +\newcommand{\JHrightmarginpar}[1]{% +\pmclbsphack\strut\vadjust{% +\rlap{\kern-\parindent% +\kern\JHtextwidth\kern\JHmarginparsep% at right +\setbox0=\vtop to 0pt{% added +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +\vss}% +\vtop to 0pt{\kern\JHmarginparvshift% default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% +\newcommand{\JHleftmarginpar}[1]{% +\pmclbsphack\strut\vadjust{% changed +\rlap{\kern-\parindent% +\kern -\JHmarginparsep \kern -\marginparwidth% at left +\setbox0=\vtop to 0pt{ +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +\vss}% changed +\vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% changed +%%\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}} +\newcommand{\JHoutermarginpar}{% +\strictpagechecktrue% +\checkoddpage% +\ifoddpage% +\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\else% below is for even pages +\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\fi% +} +%%\marginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}} +\newcommand{\JHguttermarginpar}{% +\strictpagechecktrue +\checkoddpage% +\ifoddpage% +\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\else% below is for even pages +\JHswitchmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\fi% +} +\newcommand{\JHswitchmarginpar}{\@dblarg{\@JHswitchmarginpar}} +\long\def\@JHswitchmarginpar[#1]#2{\@bsphack\strut\vadjust{% added +\checkoddpage + \ifJHmarginparswitch + \ifJHreversemarginpar + \ifoddpage + \oddpagefalse + \else + \oddpagetrue + \fi + \fi + \else + \oddpagetrue + \ifJHreversemarginpar + \oddpagefalse + \fi + \fi + \rlap{\kern-\parindent + \if@twocolumn + \if@firstcolumn % put at left + \kern -\JHmarginparsep \kern -\marginparwidth % at left + \else % put at right + \kern \columnwidth \kern \JHmarginparsep % at right + \fi + \else + \ifoddpage % put at right + \kern \textwidth \kern \JHmarginparsep % at right + \else % put at left + \kern -\JHmarginparsep \kern -\marginparwidth % at left + \fi + \fi + \setbox0=\vtop to 0pt{% added + \begin{minipage}[t]{\marginparwidth}% added + \ifoddpage #2\else #1\fi% + \end{minipage}% +\vss}% added + \vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt + \kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\@esphack}% added +\newcommand{\JHrighttitlemarginpar}[1]{% +\pmclbsphack\strut\vadjust{% +\rlap{\kern-\parindent% +\kern\JHtextwidth\kern\JHmarginparsep% at right +\kern-.5\JHtextwidth\kern\marginparsepmin +\setbox0=\vtop to 0pt{% added +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +\vss}% +\vtop to 0pt{\kern\JHmarginparvshift% default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% +\newcommand{\JHlefttitlemarginpar}[1]{% +\pmclbsphack\strut\vadjust{% changed +\rlap{\kern-\parindent% +\kern -\JHmarginparsep \kern -\marginparwidth% at left +\kern-.5\JHtextwidth\kern\marginparsepmin +\setbox0=\vtop to 0pt{ +\begin{minipage}[t]{\marginparwidth}% added +#1% +\end{minipage}% +\vss}% changed +\vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% changed +\newcommand{\JHswitchtitlemarginpar}{\@dblarg{\@JHswitchtitlemarginpar}} +\long\def\@JHswitchtitlemarginpar[#1]#2{\@bsphack\strut\vadjust{% added +\checkoddpage + \ifJHmarginparswitch + \ifJHreversemarginpar + \ifoddpage + \oddpagefalse + \else + \oddpagetrue + \fi + \fi + \else + \oddpagetrue + \ifJHreversemarginpar + \oddpagefalse + \fi + \fi + \rlap{\kern-\parindent + \if@twocolumn + \if@firstcolumn % put at left + \kern -\JHmarginparsep \kern -\marginparwidth % at left + \kern-.5\JHtextwidth\kern\marginparsepmin + \else % put at right + \kern \columnwidth \kern \JHmarginparsep % at right + \fi + \else + \ifoddpage % put at right + \kern \textwidth \kern \JHmarginparsep % at right + \kern-.5\JHtextwidth\kern\marginparsepmin + \else % put at left + \kern -\JHmarginparsep \kern -\marginparwidth % at left + \kern-.5\JHtextwidth\kern\marginparsepmin + \fi + \fi + \setbox0=\vtop to 0pt{% added + \begin{minipage}[t]{\marginparwidth}% added + \ifoddpage #2\else #1\fi% + \end{minipage}% +\vss}% added + \vtop to 0pt{\kern\JHmarginparvshift % default should be 0pt + \kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\@esphack}% added \newcommand{\set@margp@emtitle}[7]{\setlength{\titleentryoverrun}{#6}% {#2}% {#3 \begin{titleentryenvironment}% @@ -1848,6 +2049,7 @@ \t@xtnotesinfo{#1}% \sources{\label{#2}}% } +\@mparswitchfalse % so the title marker won't switch sides on alternate pages \newcommand{\JHpoemtitle}[2]{% \set@margp@emtitle{#1}{\poemtitlepenalty}{\poemtitlefont}% {\sequencetitleindent}{\nobreak\par\nobreak\afterpoemtitleskip\nobreak}{\z@}% @@ -1867,7 +2069,20 @@ \sources{\label{#2}}% } \newcommand{\JHlabel}[1]{% -\marginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}}} +\ifJHmarkstoright\JHrighttitlemarginpar +{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}} +\fi +\ifJHmarkstoleft +\JHlefttitlemarginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}} +\fi +\ifJHmarkstoouter +\JHswitchtitlemarginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}} +\fi +\ifJHmarkstogutter +\JHswitchtitlemarginpar{{\scriptsize{\the\margrefmarker~p.~\pageref{#1}}}} +\fi +} + \newcommand{\JHsequencetitle}[2]{% \set@margp@emtitle{#1}{\sequencetitlepenalty}{\sequencetitlefont}% {\sequencetitleindent}{\nobreak\par\nobreak\aftersequencetitleskip\nobreak}{\z@}% @@ -1943,12 +2158,30 @@ \newtoks{\margrefmarker} \margrefmarker={\dag} \newcommand{\setmargrefmarker}[1]{\margrefmarker={#1}} +\providecommand{\settitlemargrefmarker}[1]{\titlemargrefmarker={#1}} +\newtoks{\titlemargrefmarker} +\titlemargrefmarker={\dag} \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}}} +\margrefstomargintrue +\newcommand{\setmargref}{\nolinebreak\begin{marginenvironment}% +\nolinebreak% +\ifJHmarkstoright% + \JHrightmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% +\fi% +\ifJHmarkstoleft% + \JHleftmarginpar{\scriptsize {\the\margrefmarker~p.~\pageref{margref\themargrefnumber}}}% + \fi% + \ifJHmarkstoouter% + \JHoutermarginpar% + \fi% + \ifJHmarkstogutter% + \JHguttermarginpar% + \fi% + \end{marginenvironment}% + \nolinebreak% } + \newcommand{\margreftextnote}{% \iftextnoteson\addtocounter{margrefnumber}{1}% \immediate\write\textnotes{\makemargreflabel}% @@ -2045,6 +2278,16 @@ \else\setlength{\dateindent}{\leftmargin}% \fi% \bigskip\begin{raggedleft}\hspace{\dateindent}#1\end{raggedleft}\bigskip}% +\newlength{\poemattributionindent}% +\setlength{\poemattributionindent}{\leftmargin}% +\newcommand{\variablepoemattributionindent}{% +\setlength{\poemattributionindent}{\linewidth}% +\addtolength{\poemattributionindent}{-\versewidth}% +\addtolength{\poemattributionindent}{-.5\poemattributionindent}}% +\newcommand{\poemattribution}[1]{\iflastpoemcentered\variablepoemattributionindent% +\else\setlength{\poemattributionindent}{\leftmargin}% +\fi% +\bigskip\begin{raggedleft}\hspace{\poemattributionindent}#1\end{raggedleft}\bigskip}% \def\strip#1>{} \newcommand{\literaltextnote}[1]{\iftextnotesatend \begingroup |