summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ledmac/ledmac.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/ledmac/ledmac.dtx')
-rw-r--r--Master/texmf-dist/source/latex/ledmac/ledmac.dtx276
1 files changed, 208 insertions, 68 deletions
diff --git a/Master/texmf-dist/source/latex/ledmac/ledmac.dtx b/Master/texmf-dist/source/latex/ledmac/ledmac.dtx
index 229f1f57553..14e385e1538 100644
--- a/Master/texmf-dist/source/latex/ledmac/ledmac.dtx
+++ b/Master/texmf-dist/source/latex/ledmac/ledmac.dtx
@@ -3,7 +3,7 @@
% ledmac.dtx
% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
% Maintainer:Maïeul Rouquette maieul at maieul dot net
-% Copyright 2003 -- 2005 Peter R. Wilson
+% Copyright 2003 -- 2005 Peter R. Wilson / 2011-.. Maïeul Rouquette
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -50,7 +50,7 @@
%
% \fi
%
-% \CheckSum{9200}
+% \CheckSum{9324}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -138,6 +138,8 @@
% \def\fileversion{v0.13} \def\filedate{2011/11/08}
% \def\fileversion{v0.13.1} \def\filedate{2011/11/18}
% \def\fileversion{v0.14} \def\filedate{2012/04/04}
+% \def\fileversion{v0.15} \def\filedate{2012/06/11}
+% \def\fileversion{v0.16} \def\filedate{2012/06/21}
% \changes{v0.1}{2003/03/25}{First public release}
% \changes{v0.2}{2003/08/16}{Added tabmac code, and extended indexing}
% \changes{v0.2.1}{2003/09/13}{Bug fixes and match with mempatch v1.8}
@@ -169,7 +171,7 @@
% \changes{v0.12.1}{2011/10/02}{The numbering of \cs{pstarts} restarts on each \cs{beginnumbering}.}
% \changes{v0.12.1}{2011/10/02}{Don't number \cs{pstarts} of stanza.}
%\changes{v0.13}{2011/11/08}{New stanzaindentsrepetition counter to repeat stanza indents every \emph{n} verses.}
-% \changes{v0.13.1}{2011/11/18}{\cs{thepstartL} and \cs{thepstartR} use now \cs{bfseries} and not \cs{bf}, which is deprecated and make conflicts with memoir class.}
+% \changes{v0.13.1}{2011/11/18}{\cs{thepstartL} and \cs{thepstartR} use now \cs{bfseries} and not \cs{bf}, which is deprecated and makes conflicts with memoir class.}
% \changes{v0.14}{2012/04/04}{Tweaked \cs{edlabel} to get correct line number if the command is first element of a paragraph.}
% \hyphenation{man-u-script man-u-scripts}
%
@@ -796,17 +798,20 @@
%
%\changes{v0.12}{2011/10/01}{Possibilty to number \cs{pstart}.}
% It's possible to insert a number at every \cs{pstart} command. You must use the \DescribeMacro{\numberpstarttrue}\cs{numberpstarttrue} command to have it. You can stop the numbering with \DescribeMacro{\numberpstartfalse}\cs{numberpstartfalse}. You can redefine the command \DescribeMacro{\thepstart}\cs{thepstart} to change style. On each \cs{beginnumbering} the numbering restarts.
+% \changes{v0.15}{2012/06/11}{Possibilty to print \cs{pstart} number in side.}
+% With the \cs{sidepstartnumtrue} command, the number of \cs{pstart} will be printed in side. In this case, the line number will be not printed.
% \subsection{Lineation commands}
-%
+% \DescribeMacro{\numberlinefalse} \DescribeMacro{\numberlinetrue}
+% Line numbering can be disabled with \cs{numberlinefalse}. It can be enabled again with \cs{numberlinetrue}.
% \DescribeMacro{\lineation}
-% Lines can be numbered either by page or by section; you specify
+% Lines can be numbered either by page, by pstart or by section; you specify
% this using the \cs{lineation}\marg{arg}
% macro, where \meta{arg} is either
-% \texttt{page} or \texttt{section}. You may only use this command at places
+% \texttt{page}, \texttt{pstart} or \texttt{section}. You may only use this command at places
% where numbering is not in effect; you can't change the lineation system
% within a section. You can change it between sections: they don't all
% have to use the same lineation system.
-% The package's standard setting is \verb"\lineation{section}".
+% The package's standard setting is \verb"\lineation{section}". If the lineation is by pstart, the pstart number will be printed before the line number in the notes.
%
% \DescribeMacro{\linenummargin}
% The command \cs{linenummargin}\meta{location} specifies the margin
@@ -1576,7 +1581,7 @@
% \end{verbatim}
% \end{PW}
%\begin{PW}
-%It's possible to insert a symbol on each line of verse's hanging, as in French typography for `]'. To insert in ledmac, redefine macro \DescribeMacro{\hangingsymbol}\cmd{\hangingsymbol} with this code :
+%It's possible to insert a symbol on each line of verse's hanging, as in French typography for `['. To insert in ledmac, redefine macro \DescribeMacro{\hangingsymbol}\cmd{\hangingsymbol} with this code :
%\begin{verbatim}
%\renewcommand{\hangingsymbol}{[\,}
%\end{verbatim}
@@ -2974,7 +2979,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ledmac}[2012/04/04 v0.14 LaTeX port of EDMAC]
+\ProvidesPackage{ledmac}[2012/06/21 v0.16 LaTeX port of EDMAC]
% \end{macrocode}
%
@@ -3413,6 +3418,7 @@
\line@list@stuff{\jobname.\extensionchars\the\section@num}%
\l@dend@stuff
\setcounter{pstart}{1}
+ \firstpstarttrue
}
\newcommand*{\initnumbering@reg}{%
\global\pst@rtedLfalse
@@ -3502,9 +3508,9 @@
% \label{lineation}\relax
%
% \subsection{Choosing the system of lineation}
-%
+% \changes{v0.15}{2012/06/11}{Line numbering can be reset at each pstart.}
% Sometimes you want line numbers that start at $1$ at the top of each
-% page; other times you want line numbers that start at $1$ at the start
+% page; sometimes you want line numbers that start at $1$ at each \cs{pstart}; other times you want line numbers that start at $1$ at the start
% of each section and increase regardless of page breaks.
% \Ledmac{} can do it either way, and you can switch from one to the
% other within one work.
@@ -3512,23 +3518,33 @@
% line references within each section. Here we will define
% internal codes for these systems and the macros you use to select them.
%
+% \begin{macro}{\ifbypstart@}
+% \begin{macro}{\bypstart@true}
+% \begin{macro}{\bypstart@false}
% \begin{macro}{\ifbypage@}
% \begin{macro}{\bypage@true}
% \begin{macro}{\bypage@false}
-% The \cs{ifbypage@} flag specifies the current lineation
-% system: \verb"false" for line-of-section, \verb"true" for line-of-page.
+% The \cs{ifbypage@} and \cs{ifbypstart@} flag specifie the current lineation
+% system: \begin{itemize}
+% \item line-of-page : \verb|bypstart@ = false| and \verb|bypage@ = true|.
+% \item line-of-pstart : \verb|bypstart@ = true| and \verb|bypage@ = false|.
+% \end{itemize}
% \Ledmac{} will use the line-of-section system unless instructed otherwise.
% \begin{macrocode}
\newif\ifbypage@
+\newif\ifbypstart@
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\lineation}
% \cs{lineation}\marg{word} is the macro you use to select the
% lineation system.
-% Its argument is a string: either \texttt{page} or \texttt{section}.
+% Its argument is a string: either \texttt{page} or \texttt{section} or \texttt{pstart}.
% \begin{macrocode}
\newcommand*{\lineation}[1]{{%
\ifnumbering
@@ -3537,16 +3553,23 @@
\def\@tempa{#1}\def\@tempb{page}%
\ifx\@tempa\@tempb
\global\bypage@true
+ \global\bypstart@false
\else
- \def\@tempb{section}%
+ \def\@tempb{pstart}%
\ifx\@tempa\@tempb
\global\bypage@false
+ \global\bypstart@true
\else
- \led@warn@BadLineation
+ \def@tempb{section}
+ \ifx\@tempa\@tempb
+ \global\bypage@false
+ \global\bypstart@false
+ \else
+ \led@warn@BadLineation
+ \fi
\fi
\fi
\fi}}
-
% \end{macrocode}
% \end{macro}
%
@@ -5405,6 +5428,13 @@
%
% \end{PW}
%
+% \begin{macro}{\ifnumberline}
+% The \cs{ifnumberline} option can be set to FALSE to disable line numbering.
+% \begin{macrocode}
+\newif\ifnumberline
+\numberlinetrue
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\set@line}
% The \cs{set@line} macro
% is called by \cs{critext} to put the line-reference field and
@@ -5568,6 +5598,7 @@
% \begin{macro}{numberpstarttrue}
% \begin{macro}{numberpstartfalse}
% \begin{macro}{thepstart}
+% \begin{macro}{\firstpstart}
% \cs{pstart} starts the paragraph by
% clearing the \cs{inserts@list} list and other
% relevant variables, and then arranges for the
@@ -5590,9 +5621,16 @@
\newcounter{pstart}
\renewcommand{\thepstart}{{\bfseries\@arabic\c@pstart}. }
\newif\ifnumberpstart
+\newif\iffirstpstart
+\firstpstarttrue
\numberpstartfalse
\newcommand*{\pstart}{
-\managehangingsymbol
+\ifbypstart@\iffirstpstart
+ \firstpstartfalse
+ \else
+ \setline{0}
+ \fi
+\fi
\if@nobreak
\let\@oldnobreak\@nobreaktrue
\else
@@ -5610,13 +5648,14 @@
\list@clear{\inserts@list}%
\global\let\next@insert=\empty
\begingroup\normal@pars
- \global\setbox\raw@text=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifinstanza\else\thepstart\fi\fi\fi
+ \global\setbox\raw@text=\vbox\bgroup\ifautopar\else\ifnumberpstart\ifinstanza\else\ifsidepstartnum\else\thepstart\fi\fi\fi\fi
\numberedpar@true}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
% \begin{macro}{\pend}
% \cs{pend} must be used to end a numbered paragraph.
%
@@ -5627,9 +5666,6 @@
\ifnumberedpar@ \else
\led@err@PendNoPstart
\fi
-\ifnumberpstart
-\addtocounter{pstart}{1}
-\fi
% \end{macrocode}
% We set all the usual interline penalties to zero and then immediately
% call \cs{endgraf} to end the paragraph; this ensures that there'll
@@ -5653,6 +5689,10 @@
\flush@notes
\endgroup
\ignorespaces
+ \ifnumberpstart
+ \addtocounter{pstart}{1}
+ \pstartnumtrue
+ \fi
\@oldnobreak}
% \end{macrocode}
@@ -5757,11 +5797,16 @@
\unvbox\one@line \global\setbox\one@line=\lastbox
\getline@num
\affixline@num
- \hb@xt@ \linewidth{\l@dld@ta\add@inserts\affixside@note
+ \affixpstart@num
+ \hb@xt@ \linewidth{\inserthangingsymbol\l@dld@ta\add@inserts\affixside@note
\l@dlsn@te
{\ledllfill\hb@xt@ \wd\one@line{\new@line\l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta%
\l@drsn@te
- }}
+ }}%
+%\end{macrocode}
+% The \cs{prevline@num} counter is used to check the insertion of hanging symbol.
+%\begin{macrocode}
+ \prevline@num=\line@num%
\add@penalties}
% \end{macrocode}
@@ -5836,9 +5881,12 @@
% send to the vertical list.
% \begin{macrocode}
\newcommand*{\getline@num}{%
- \global\advance\absline@num \@ne
+ \ifnumberline
+ \global\advance\absline@num \@ne
+ \fi
\do@actions
\do@ballast
+ \ifnumberline
\ifsublines@
\ifnum\sub@lock<\tw@
\global\advance\subline@num \@ne
@@ -5848,8 +5896,9 @@
\global\advance\line@num \@ne
\global\subline@num \z@
\fi
- \fi}
-
+ \fi
+ \fi
+ }
% \end{macrocode}
% \end{macro}
%
@@ -6015,7 +6064,6 @@
% \end{macrocode}
% \end{macro}
-%
% \subsection{Line number printing}
%
% \begin{macro}{\affixline@num}
@@ -6062,7 +6110,10 @@
% \end{macrocode}
% No number is attached if \cs{ifl@dskipnumber} is TRUE (and then it
% is set to its normal FALSE value).
+% No number is attached if \cs{ifnumberline} is FALSE (the normal value is TRUE).
+% \changes{v0.15}{2012/06/11}{Line numbering can be disabled.}
% \begin{macrocode}
+\ifnumberline
\ifl@dskipnumber
\global\l@dskipnumberfalse
\else
@@ -6200,7 +6251,9 @@
% $2$; $3$ advances to $0$; other values are unchanged.
% \begin{macrocode}
\f@x@l@cks
-\fi}
+\fi
+\fi
+}
% \end{macrocode}
% \end{macro}
@@ -6290,6 +6343,64 @@
% \end{macro}
% \end{PW}
%
+% \subsection{Pstart number printing in side}
+% In side, the printing of pstart number is running like the printing of line number. There is only some differences :
+% \begin{macro}{\affixpstart@num}
+% \begin{macro}{\pstartnum}
+% \begin{itemize}
+% \item The pstarts counter is upgrade in the \cs{pend} command. Consequently, the \cs{affixpstart@num} command has not to upgrade it, unlike the \cs{affixline@num} which upgrades the lines counter.
+% \item To print the pstart number only at the begining of a pstart, and not in every line, a boolean test is made. The \cs{pstartnum} boolean is set to TRUE at every \cs{pend}. It's tried in the \cs{leftpstartnum} and \cs{rightstartnum} commands. After the try, it is set to FALSE.
+% \end{itemize}
+% \begin{macro}{\leftpstartnum}
+% \begin{macro}{\rightstartnum}
+% \begin{macro}{\ifsidepstartnum}
+% \begin{macrocode}
+
+\newif\ifsidepstartnum
+\newcommand*{\affixpstart@num}{%
+ \ifsidepstartnum
+ \if@twocolumn
+ \if@firstcolumn
+ \gdef\l@dld@ta{\llap{{\leftpstartnum}}}%
+ \else
+ \gdef\l@drd@ta{\rlap{{\rightpstartnum}}}%
+ \fi
+ \else
+ \@l@dtempcntb=\line@margin
+ \ifnum\@l@dtempcntb>\@ne
+ \advance\@l@dtempcntb \page@num
+ \fi
+ \ifodd\@l@dtempcntb
+ \gdef\l@drd@ta{\rlap{{\rightpstartnum}}}%
+ \else
+ \gdef\l@dld@ta{\llap{{\leftpstartnum}}}%
+ \fi
+ \fi
+ \fi
+
+}
+%
+
+\newif\ifpstartnum
+\pstartnumtrue
+\newcommand*{\leftpstartnum}{
+ \ifpstartnum\thepstart
+ \kern\linenumsep\fi
+ \global\pstartnumfalse
+}
+\newcommand*{\rightpstartnum}{
+ \ifpstartnum
+ \kern\linenumsep
+ \thepstart
+ \fi
+ \global\pstartnumfalse
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \subsection{Add insertions to the vertical list}
%
% \begin{macro}{\inserts@list}
@@ -7018,9 +7129,21 @@
% \end{macro}
%
% \begin{macro}{\printlines}
-% Now we're ready to print it all.
+% Now we're ready to print it all. If the lineation is by pstart, we print the pstart.
+% \changes{v0.15}{2012/06/11}{Line numbering can be reset at each pstart.}
% \begin{macrocode}
\def\printlines#1|#2|#3|#4|#5|#6|#7|{\begingroup
+ \ifbypstart@%
+ \ifl@dpairing%
+ \ifledRcol%
+ \thepstartR%
+ \else%
+ \thepstartL%
+ \fi%
+ \else%
+ \thepstart%
+ \fi%
+ \fi%
\setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
% \end{macrocode}
% One subtlety left here is when to print a period between
@@ -7268,7 +7391,11 @@
% \end{macrocode}
% \end{macro}
-%
+% \changes{v0.16}{2012/06/21}{\cs{parafootftmsep} command is printed between each paragraphed footnote}
+% You can redefine the \cs{parafootftmsep} command to print a separator between each paragraphed footnote (on the same page). A usual separator is a double pipe ($\|$). To add double-pipe separators:
+% \begin{verbatim}
+% \renewcommand{\parafootftmsep}{\thinspace$||$\enspace}
+% \end{verbatim}
% \begin{macro}{\footfudgefiddle}
% \begin{PW}
% For paragraphed footnotes \TeX{} has to estimate the amount of space
@@ -7564,6 +7691,7 @@
% text of the footnote.
% \begin{macrocode}
\newcommand*{\parafootfmt}[3]{%
+ \insertparafootftmsep%
\ledsetnormalparstuff
{\notenumfont\printlines#1|}\enspace
{\select@lemmafont#1|#2}\rbracket\enskip
@@ -7572,6 +7700,7 @@
% Note that in the above definition, the penalty of $-10$
% encourages a line break between notes, so that notes have a
% slight tendency to begin on new lines.
+% The \cs{insertparafootftmsep} command is used to insert the \cs{parafootftmsep} between each note in the \emph{same} page.
% \end{macro}
%
% \begin{macro}{\para@footgroup}
@@ -7631,6 +7760,27 @@
% \end{macro}
% \end{macro}
%
+% \subsubsection{Insertion of footnotes separator}
+% \begin{macro}{\parafootftmsep}
+% The \cs{parafootftmsep} macro is inserted between each paragraphed footnote. The default value is empty, but the user can redefine it via \cs{renewcommand}.
+% \begin{macrocode}
+\newcommand{\parafootftmsep}{}
+% \end{macrocode}
+% \end{macro}
+%The command \cs{insertparafootftmsep} must be called at the begining of \cs{parafootftm} (and like commands). \cs{insertparafootftmsep} checks to see if the page number has changed since the previous note. If not, \cs{insertparafootftmsep} calls \cs{parafootftmsep}.
+% \begin{macro}{\prevpage@num}
+% \begin{macro}{\insertparafootftmsep}
+% \begin{macrocode}
+\newcount\prevpage@num
+\newcommand{\insertparafootftmsep}{%
+ \ifnum\prevpage@num=\page@num%
+ \parafootftmsep%
+ \fi%
+ \global\prevpage@num=\page@num%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \subsection{Columnar footnotes}
%
% \begin{macro}{\rigidbalance}
@@ -8474,8 +8624,10 @@
%\begin{macro}{\advancelabel@refs}
%\begin{macro}{\labelrefsparseline}
%\begin{macro}{\labelrefsparsesubline}
-% \begin{macrocode}
-% In case which \cs{edlabel} is the first in a paragraph, we have a problem, because line's number changes only at first horizontal box of the paragraph. And so, we need test in \cs{edlable} if we are at the top of paragraph, with \cs{ifvmode}. If true, we need advance of on unity text that we write in .aux file. We do it with \cs{advancelabel@refs} command.
+% \begin{macrocode}
+%In cases where \cs{edlabel} is the first element in a paragraph, we have a problem with line counts, because line counts change only at the first horizontal box of the paragraph.
+%Hence, we need to test \cs{edlabel} if it occurs at the start of a paragraph. To do so, we use \cs{ifvmode}. If the test is true, we must advance by one unit the amount of text we write into the \verb].aux] file.
+%We do so using \cs[advancelabel@refs} command.
\newcommand{\advancelabel@refs}{%
\newcount\line%
\ledmac@warning{\label@refs}
@@ -9100,9 +9252,9 @@
% user commands for left and right sidenotes. \verb?\ledsidenote?\marg{text}
% is the command for a moveable sidenote.
% \begin{macrocode}
-\newcommand*{\ledleftnote}[1]{\setcounter{hboxmodulo}{-1}\edtext{}{\l@dlsnote{#1}}}
-\newcommand*{\ledrightnote}[1]{\setcounter{hboxmodulo}{-1}\edtext{}{\l@drsnote{#1}}}
-\newcommand*{\ledsidenote}[1]{\setcounter{hboxmodulo}{-1}\edtext{}{\l@dcsnote{#1}}}
+\newcommand*{\ledleftnote}[1]{\edtext{}{\l@dlsnote{#1}}}
+\newcommand*{\ledrightnote}[1]{\edtext{}{\l@drsnote{#1}}}
+\newcommand*{\ledsidenote}[1]{\edtext{}{\l@dcsnote{#1}}}
% \end{macrocode}
@@ -9912,6 +10064,7 @@
% \cs{parafootfmtX}\marg{series}
% \begin{macrocode}
\newcommand*{\parafootfmtX}[2]{%
+ \insertparafootftmsep
\ledsetnormalparstuff
{\notenumfont\@nameuse{footfootmark#1}\strut%\enspace
#2\penalty-10}}
@@ -10042,7 +10195,7 @@
%
% Don't forget to initialise the series.
%
-% \begin{macrocode}
+% \begin{macrocode}
\footnormalX{A}
\footnormalX{B}
\footnormalX{C}
@@ -10678,43 +10831,30 @@
%
% \begin{PW}
% The macro \cmd{\hangingsymbol} is used to insert a symbol on each hanging of verses.
-%For example, in french typographie the symbol is `]'. We obtain it by the next code:
+%For example, in french typographie the symbol is `['. We obtain it by the next code:
%\begin{verbatim}
%\renewcommand{\hangingsymbol}{[\,}
%\end{verbatim}
-% We use the fact that ledmac run with hbox. Every 3 hbox we insert this command. To know the number of hbox, we use the counter `hboxmodulo'
-%\begin{macro}{\hangingsymbol}
-%\begin{macrocode}
+% The \cs{ifinstanza} boolean is used to be sure that we are in a stanza part.
+% \begin{macro}{\hangingsymbol}
+% \begin{macro}{\ifinstanza}
+% \begin{macrocode}
\newcommand*{\hangingsymbol}{}
-\newcounter{hbox}
-\newcounter{hboxmodulo}
-\newif\ifhangingsymbol
-\hangingsymbolfalse
\newif\ifinstanza
\instanzafalse
-\newcommand{\managehangingsymbol}{\ifinstanza%
- \setcounter{hbox}{0}%
- \setcounter{hboxmodulo}{0}%
- \everyhbox{%
-\ifnum \value{hbox}>2%
- \addtocounter{hboxmodulo}{1}%
- \ifnum \value{hboxmodulo}=2
- \ifhangingsymbol%
- \hangingsymbol%
- \hangingsymbolfalse%
- \else%
- \hangingsymboltrue%
- \fi%
- \setcounter{hboxmodulo}{0}%
- \fi%
-\else%
-\addtocounter{hbox}{1}%
-\fi%
-}
-\fi}
-
-%\end{macrocode}
-%\end{macro}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%\changes{v0.15}{2012/06/11}{New management of hangingsymbol insertion, preventing undesirable insertions.}
+% \begin{macro}{\inserthangingymbol}
+% \begin{macro}{\prevline@num}
+% After each insertion of true line, the value of \cs{line@num} counter is put into the \cs{prevline@num} counter. When we change verse, the \cs{line@num} is not equal to the \cs{prevline@num}. But if a verse is in two ore more lines, the second line (and next) has the same number as the first line of the verse. Consequently, the \cs{line@num} is equal to the \cs{prevline@num}. This property is used by the \cs{inserthangingsymbol} command to insert the hanging symbol at each verse's hanging.
+% \begin{macrocode}
+\newcount\prevline@num
+\newcommand{\inserthangingsymbol}{\ifinstanza\ifnum\line@num=\prevline@num\hfill\hangingsymbol\fi\fi}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\ampersand}
% Within a stanza the \verb?\&? macro is going to be usurped. We need an
% alias in case an \& needs to be typeset in a stanza. Define it rather