diff options
author | Karl Berry <karl@freefriends.org> | 2006-05-23 20:48:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-05-23 20:48:49 +0000 |
commit | a0656ca84ce9566ca07f791707f6f26d7e6942c8 (patch) | |
tree | 250cc8ca9a1ece9a2098d932be59d8d9988293f6 /Master/texmf-dist/tex/latex/poemscol | |
parent | 48c9a8207e08e743610a9b7eefb304de26b1cf57 (diff) |
poemscol update
git-svn-id: svn://tug.org/texlive/trunk@1584 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/poemscol')
-rw-r--r-- | Master/texmf-dist/tex/latex/poemscol/poemscol.sty | 324 |
1 files changed, 213 insertions, 111 deletions
diff --git a/Master/texmf-dist/tex/latex/poemscol/poemscol.sty b/Master/texmf-dist/tex/latex/poemscol/poemscol.sty index 791dd0e0375..9f3c6111f71 100644 --- a/Master/texmf-dist/tex/latex/poemscol/poemscol.sty +++ b/Master/texmf-dist/tex/latex/poemscol/poemscol.sty @@ -22,9 +22,7 @@ %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e}[1997/12/01] \ProvidesPackage{poemscol} - [2005/10/05 v2.391 poemscol file] - - + [2006/04/25 v2.49 poemscol file] @@ -336,15 +334,15 @@ }{\newpage\thispagestyle{volumetitlestyle}\cleardoublepage} \newenvironment{booksectionpage} {\par\newpage\thispagestyle{volumetitlestyle}}{\newpage} - \setlength{\marginparsep}{-18pt} + \setlength{\marginparsep}{18pt} \setlength{\marginparwidth}{10pt} \newif\ifnumbersswitch \numbersswitchfalse \newif\ifnumbersright \numbersrighttrue -\providecommand{\sidepar}{\@dblarg{\@sidepar}} -\long\def\@sidepar[#1]#2{\@bsphack\leavevmode\vadjust{% % - \checkoddpage - \ifsideparswitch - \ifreversesidepar +\newcommand{\pmclsidepar}{\@dblarg{\@pmclsidepar}} +\long\def\@pmclsidepar[#1]#2{\@bsphack\strut\vadjust{% added +\checkoddpage + \ifpmclsideparswitch + \ifpmclreversesidepar \ifoddpage \oddpagefalse \else @@ -353,7 +351,7 @@ \fi \else \oddpagetrue - \ifreversesidepar + \ifpmclreversesidepar \oddpagefalse \fi \fi @@ -371,12 +369,13 @@ \kern -\marginparsep \kern -\marginparwidth % at left \fi \fi - \vbox to 0pt{% - \kern \sideparvshift% % vertical shift to align top text lines - \begin{minipage}{\marginparwidth}% - \ifoddpage #2\else #1\fi% + \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 \gdef\thepmemc@@page{\the\c@page} @@ -413,49 +412,54 @@ \ifodd\c@page\oddpagetrue\fi \fi} -\newif\ifreversesidepar - \reversesidepartrue -\newif\ifsideparswitch - \sideparswitchfalse -\if@twoside \sideparswitchtrue \fi +\newif\ifpmclreversesidepar + \pmclreversesidepartrue +\newif\ifpmclsideparswitch + \pmclsideparswitchfalse +\if@twoside \pmclsideparswitchtrue \fi \newif\ifoddpage \newif\ifstrictpagecheck \strictpagecheckfalse \newcounter{cp@cntr} \newcommand{\cplabel}{^_} -\newlength{\sideparvshift} -\setlength{\sideparvshift}{-2.58ex} +\newlength{\pmclsideparvshift} +\setlength{\pmclsideparvshift}{0ex} \newcommand{\verselinenumberstoleft}{% \setlength{\marginparsep}{18pt}% \setlength{\marginparwidth}{10pt}% \numbersswitchfalse\numbersrightfalse} \newcommand{\verselinenumberstoright}{% - \setlength{\marginparsep}{-18pt}% + % \setlength{\marginparsep}{-18pt}% + \setlength{\marginparsep}{18pt}% \setlength{\marginparwidth}{10pt}% \numbersswitchfalse\numbersrighttrue} \newcommand{\verselinenumbersswitch}{% \strictpagechecktrue% \setlength{\marginparsep}{18pt}% \setlength{\marginparwidth}{10pt}% - \numbersswitchtrue\numbersrightfalse} -\newif\ifnumbersgutter \numbersgutterfalse + \numbersswitchtrue\numbersrightfalse\pmclsideparswitchtrue} +\newif\ifnumbersgutter \numbersgutterfalse% \newcommand{\verselinenumbersgutter}{\verselinenumbersswitch% -\reversesideparfalse\numbersguttertrue} +\pmclreversesideparfalse% +\numbersguttertrue% +} \newcommand{\verselinenumbersouter}{\verselinenumbersswitch% -\reversesidepartrue\numbersgutterfalse} +\pmclreversesidepartrue% +\numbersgutterfalse} \newcommand{\putverselinenumber}{\nolinebreak\begin{marginenvironment}% - \nolinebreak - \ifnumbersswitch\sidepar{\hfil\textrm{\scriptsize\theverselinenumber}}% - \else - \ifnumbersright\rightsidepar{\hfil\textrm{\scriptsize\theverselinenumber}}% - \else - \leftsidepar{\textrm{\scriptsize\theverselinenumber}\hfil}% - \fi - \fi - \nolinebreak + \nolinebreak% + \ifnumbersswitch\pmclsidepar{\hfil\textrm{\scriptsize\theverselinenumber}}% + \else% + \ifnumbersright\pmclrightsidepar{\hfil\textrm{\scriptsize\theverselinenumber}}% + \else% + \pmclleftsidepar +{\textrm{\scriptsize\theverselinenumber}\hfil}% + \fi% + \fi% + \nolinebreak% \end{marginenvironment}% - \nolinebreak + \nolinebreak% } \newif\ifspeciallinelock \speciallinelockfalse @@ -885,6 +889,14 @@ EXPLANATORY NOTES}\end{center} } \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}% @@ -1159,7 +1171,52 @@ EXPLANATORY NOTES}\end{center} \newcommand{\interjectiontitlemiddleline}[1]{ \sequencefirstsubsectionmiddleline{#1} } - +\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}% +} +\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@}} +\newcommand{\JHpoemtitle}[2]{% +\setmargpoemtitle{#1}{\JHlabel{#2}}% +} +\newcommand{\JHlabel}[1]{% +\marginpar{{\scriptsize{\dag~p.~\pageref{#1}}}}} +\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}% +} +\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}% +} +\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}% +} \newcommand{\epigraph}[1]{\nopagebreak\afterpoemtitleskip\begin{epigraphquote} \emph{#1}\end{epigraphquote}\afterpoemtitleskip\nopagebreak} \newcommand{\headnote}[1]{\epigraph{#1}} @@ -1390,18 +1447,48 @@ EXPLANATORY NOTES}\end{center} \normalfont \backmattertextfont} \expandafter\newcommand\csname first#1\endcsname{ \immediate\write\expandafter\csname#1s\endcsname{\titletoothernotes}} -\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{\checknoteheaders} -\csname literal#1\endcsname{##2} -\resetlemmacounters} +\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{\checknoteheaders}% +\csname literal#1\endcsname{##2}% +\resetlemmacounters% +} +\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}% +\resetlemmacounters\unskip% +} +\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}% +\pmresetlemmacounters\unskip% +} \makeatletter \appendtomacro{\poem}{\global\expandafter\csname no#1yettrue\endcsname} \makeatother +\makeatletter +\appendtomacro{\prosesection}{\global\expandafter\csname no#1yettrue\endcsname} +\makeatother +\makeatletter +\appendtomacro{\pmsection}{\global\expandafter\csname no#1yettrue\endcsname} +\makeatother + \expandafter\newcommand\csname put#1s\endcsname{ \newpage\hyphenationforsmall \immediate\expandafter\closeout\csname #1s\endcsname @@ -1431,7 +1518,10 @@ EXPLANATORY NOTES}\end{center} \else\ifnumbersswitch\rightlinenumbers*\setlength{\linenumbersep}{-\marginparsep}% \else\leftlinenumbers*\setlength{\linenumbersep}{\marginparsep}% \addtolength{\linenumbersep}{5pt}% seems about right -\fi\fi} +\fi\fi +\noemendyettrue% +\noexplainyettrue% +} {\end{linenumbers}} \newenvironment{prosesectionnoreset} {\begin{linenumbers}% @@ -1585,27 +1675,35 @@ r@#2\endcsname{}{}\@nil \newcounter{pmindexcount}\setcounter{pmindexcount}{0} \newcommand{\setprosebysentence}{\prosebysentencetrue% } +\newenvironment{pmsection}{ +\noemendyettrue% +\noexplainyettrue% +}{} \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}{\numbersswitchfalse\numbersrightfalse% +\newcommand{\pmnumberstoleft}{%\catcode`\@=11% +\numbersswitchfalse\numbersrightfalse% \setlength{\marginparsep}{18pt}% } -\newcommand{\pmnumberstoright}{\numbersswitchfalse\numbersrighttrue% +\newcommand{\pmnumberstoright}{%\catcode`\@=11% +\numbersswitchfalse\numbersrighttrue% \setlength{\marginparsep}{-18pt} } \newcommand{\pmnumbersswitch}{\strictpagechecktrue\numbersswitchtrue\numbersrightfalse% \setlength{\marginparsep}{18pt}% } -\newcommand{\pmnumbersgutter}{\pmnumbersswitch% -\reversesideparfalse\numbersguttertrue% +\newcommand{\pmnumbersgutter}{%\catcode`\@=11% +\pmnumbersswitch% +\pmclreversesideparfalse\numbersguttertrue% \setlength{\marginparsep}{18pt}% } -\newcommand{\pmnumbersouter}{\pmnumbersswitch% -\reversesidepartrue\numbersgutterfalse% +\newcommand{\pmnumbersouter}{%\catcode`\@=11% +\pmnumbersswitch% +\pmclreversesidepartrue\numbersgutterfalse% \setlength{\marginparsep}{18pt}% } \newcommand{\putpmsentencenumber}{% @@ -1613,55 +1711,59 @@ r@#2\endcsname{}{}\@nil {\marginsentencenumberformat}} \newcommand{\putpmmarginnumber}[2]{% \nolinebreak\begin{marginenvironment}% - \nolinebreak - \ifnumbersswitch\sidepar{\hfil #2{#1}}% - \else - \ifnumbersright\rightsidepar{\hfil #2{#1}}% - \else \leftsidepar{#2{#1}\hfil}% - \fi - \fi - \nolinebreak - \end{marginenvironment}\nolinebreak + \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% } \newcommand{\pmsentence}{% \addtocounter{pmsentencenumber}{1}% -\ifrunningsentencenumbers % add running number +\ifrunningsentencenumbers% add running number \runningsentencenumberformat{\thepmsentencenumber}% \fi% -\ifmarginsentencenumbers % add marginal number +\ifmarginsentencenumbers% add marginal number \addtocounter{pmindexcount}{1}% \leavevmode% - \ifnum\thepmindexcount>\thepmmodulo% - \putpmsentencenumber\nobreak% +\ifthenelse{\value{pmindexcount}>\value{pmmodulo}}% +{ \putpmsentencenumber\nobreak% \setcounter{pmindexcount}{0}% - \fi% +}{\relax}% \fi% \ifpmparas% \global\edef\noteheaderconcat{\thepmparagraph:\thepmsentencenumber}% \pmnoteheader=\expandafter{\noteheaderconcat}% \else% -\global\edef\noteheaderconcat{\thepmsentencenumber:}% +\global\edef\noteheaderconcat{\thepmsentencenumber} \pmnoteheader=\expandafter{\noteheaderconcat}% \fi% } \newcommand{\pmsentencetwo}{% \addtocounter{pmsentencenumber}{1}% -\ifrunningsentencenumbers % add running number +\ifrunningsentencenumbers% add running number \runningsentencenumberformat{\thepmsentencenumber}% \fi% -\ifmarginsentencenumbers % add marginal number +\ifmarginsentencenumbers% add marginal number \addtocounter{pmindexcount}{1}% \leavevmode% - \ifnum\thepmindexcount>\thepmmodulo% - \putpmsentencenumbertwo\nobreak% +\ifthenelse{\value{pmindexcount}>\value{pmmodulo}}% +{ \putpmsentencenumbertwo\nobreak% \setcounter{pmindexcount}{0}% - \fi% +}{\relax}% \fi% \ifpmparas% \global\edef\noteheaderconcat{\thepmparagraph:\thepmsentencenumber}% \pmnoteheader=\expandafter{\noteheaderconcat}% \else% -\global\edef\noteheaderconcat{\thepmsentencenumber:}% +\global\edef\noteheaderconcat{\thepmsentencenumber}% \pmnoteheader=\expandafter{\noteheaderconcat}% \fi% } @@ -1669,24 +1771,24 @@ r@#2\endcsname{}{}\@nil \newcommand{\putpmsentencenumbertwo}{% \putpmmarginnumber{\rlap{\phantom{1},~\thepmsentencenumber}}% {\marginsentencenumberformat}} -\newcommand{\pmsentencethree}{ +\newcommand{\pmsentencethree}{% \addtocounter{pmsentencenumber}{1}% -\ifrunningsentencenumbers % add running number +\ifrunningsentencenumbers% add running number \runningsentencenumberformat{\thepmsentencenumber}% \fi% -\ifmarginsentencenumbers % add marginal number +\ifmarginsentencenumbers% add marginal number \addtocounter{pmindexcount}{1}% \leavevmode% - \ifnum\thepmindexcount>\thepmmodulo% - \putpmsentencenumberthree\nobreak% +\ifthenelse{\value{pmindexcount}>\value{pmmodulo}}% +{ \putpmsentencenumberthree\nobreak% \setcounter{pmindexcount}{0}% - \fi% +}{\relax}% \fi% \ifpmparas% \global\edef\noteheaderconcat{\thepmparagraph:\thepmsentencenumber}% \pmnoteheader=\expandafter{\noteheaderconcat}% \else% -\global\edef\noteheaderconcat{\thepmsentencenumber:}% +\global\edef\noteheaderconcat{\thepmsentencenumber}% \pmnoteheader=\expandafter{\noteheaderconcat}% \fi% } @@ -1694,24 +1796,24 @@ r@#2\endcsname{}{}\@nil \newcommand{\putpmsentencenumberthree}{% \putpmmarginnumber{\rlap{\phantom{1,~2},~\thepmsentencenumber}}% {\marginsentencenumberformat}} -\newcommand{\pmsentencefour}{ +\newcommand{\pmsentencefour}{% \addtocounter{pmsentencenumber}{1}% -\ifrunningsentencenumbers % add running number +\ifrunningsentencenumbers% add running number \runningsentencenumberformat{\thepmsentencenumber}% \fi% -\ifmarginsentencenumbers % add marginal number +\ifmarginsentencenumbers% add marginal number \addtocounter{pmindexcount}{1}% \leavevmode% - \ifnum\thepmindexcount>\thepmmodulo% - \putpmsentencenumberfour\nobreak% +\ifthenelse{\value{pmindexcount}>\value{pmmodulo}}% +{ \putpmsentencenumberfour\nobreak% \setcounter{pmindexcount}{0}% - \fi% +}{\relax}% \fi% \ifpmparas% \global\edef\noteheaderconcat{\thepmparagraph:\thepmsentencenumber}% \pmnoteheader=\expandafter{\noteheaderconcat}% \else% -\global\edef\noteheaderconcat{\thepmsentencenumber:}% +\global\edef\noteheaderconcat{\thepmsentencenumber}% \pmnoteheader=\expandafter{\noteheaderconcat}% \fi% } @@ -1944,30 +2046,30 @@ r@#2\endcsname{}{}\@nil \ignorespaces \fi \fi} -\newlength{\pmclsideparvshift} -\setlength{\pmclsideparvshift}{-2.58ex}% -\newcommand{\leftsidepar}[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}% +\newcommand{\pmclleftsidepar}[1]{% +\pmclbsphack\strut\vadjust{% changed +\rlap{\kern-\parindent% +\kern -\marginparsep \kern -\marginparwidth% at left +\setbox0=\vtop to 0pt{% added +\begin{minipage}[t]{\marginparwidth}% added #1% \end{minipage}% - \vss}}}\pmclesphack% -} -\newcommand{\rightsidepar}[1]{% -\pmclbsphack\leavevmode\vadjust{% % - \rlap{\kern-\parindent% - \kern \textwidth \kern -\marginparsep % at right - \vbox to 0pt{% - \kern \pmclsideparvshift% % vertical shift to align top text lines - \begin{minipage}{\marginparwidth}% +\vss}% changed +\vtop to 0pt{\kern\pmclsideparvshift % default should be 0pt +\kern-\dp\strutbox \kern-\ht0 \box0 \vss}}}\pmclesphack}% changed + +\newcommand{\pmclrightsidepar}[1]{% +\pmclbsphack\strut\vadjust{% +\rlap{\kern-\parindent% +\kern\textwidth\kern\marginparsep% at right +\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 + \newif\ifparalleltexts \paralleltextsfalse @@ -2057,7 +2159,7 @@ r@#2\endcsname{}{}\@nil } \renewcommand{\putverselinenumber}{\nolinebreak\begin{marginenvironment}% \nolinebreak - \leftsidepar{\textrm{\scriptsize\theverselinenumber}}% + \pmclleftsidepar{\textrm{\scriptsize\theverselinenumber}}% \nolinebreak \end{marginenvironment}% \nolinebreak @@ -2081,7 +2183,7 @@ r@#2\endcsname{}{}\@nil \newcommand{\synchrolabel}[1]{\poemlinelabel{#1}} \newcommand{\hfilll}{\hskip 0pt plus 1 filll} \newcommand{\synchroref}[1]{% -\rightsidepar{{\textrm{\scriptsize[\the\synchroflag\ref{#1}]}}}% +\pmclrightsidepar{{\textrm{\scriptsize[\the\synchroflag\ref{#1}]}}}% } \newcommand{\startversopage}{ \ifrectostanzastillopen |