diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac/reledmac.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/reledmac/reledmac.dtx | 161 |
1 files changed, 138 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx index d672aada302..57347b09852 100644 --- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx +++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx @@ -295,7 +295,7 @@ % \changes{v1.23.0}{2015/05/18}{Compatibility between nofamiliar/nocriticals option and minipage/ledgroup.} % \changes{v1.23.0}{2015/05/18}{Fix error of \protect\cs{iftrue} not closed.} % \changes{v1.23.0}{2015/05/18}{Allow use of \protect\cs{sameword} with inputenc managing of UTF-8.} -% \changes{v1.23.0}{2015/05/18}{Error message when using \protect\cs{beginnumbering}\ …\ \protect\cs{endnumbering} without \protect\cs{pstart}.} +% \changes{v1.23.0}{2015/05/18}{Error message when using \protect\cs{beginnumbering}\ ...\ \protect\cs{endnumbering} without \protect\cs{pstart}.} % \changes{v1.23.0}{2015/05/18}{New tools to ensure the line-list file uses the right version of commands when upgrading the eledmac version.} % \changes{v1.23.0}{2015/05/18}{Fix a bug with \protect\cs{skipnumbering} called immediately after a \protect\cs{pstart}.} % \changes{v1.23.0}{2015/05/18}{Fix spurious space with \protect\cs{skipnumbering} (bug added on v1.21.0).} @@ -382,7 +382,7 @@ % \changes{v2.7.2}{2015/12/13}{Fix problem of hyphenation when using \protect\package{hyperref} package (added in v2.7.0).} % \changes{v2.8.0}{2016/01/15}{\protect\macpackage cross-referencing can take advantage of \protect\package{xr} package.} % \changes{v2.8.0}{2016/01/15}{No indentation for paragraphed notes in ledgroup. Can be changed with \protect\cs{Xparindent} and \protect\cs{parindentX}.} -% \changes{v2.8.0}{2016/01/15}{More \protect\cs{edgls…} commands.} +% \changes{v2.8.0}{2016/01/15}{More \protect\cs{edgls...} commands.} % \changes{v2.8.1}{2016/02/22}{Warnings for undefined labels are really parsable by latexmk} % \changes{v2.8.2}{2016/02/27}{Fix a bug with \protect\cs{AtEveryPstart} added in version 2.0.0.} % \changes{v2.8.2}{2016/02/27}{Fix a bug with vertical space after the between-sectioning command as optional argument of a \protect\cs{pstart} and \protect\cs{pstart} content} @@ -449,8 +449,8 @@ % \changes{v2.16.5}{2016/10/20}{Fix potential spurious spaces in endnotes.} % \changes{v2.16.6}{2016/11/14}{Take into account \protect\cs{linenumberstyle} when using \protect\cs{edlineref}.} % \changes{v2.16.6}{2016/11/14}{Fix a bug with the line number style in \protect\cs{doennotes} when referring to right side line in parallel typesetting.} -% \changes{v2.16.7}{2016/12/12}{Fix a bug with \protect\cs{numberpstarttrue} when using multiple \protect\cs{beginnumbering}\ …\ \protect\cs{endnumbering}.} -% \changes{v2.16.7}{2016/12/12}{Fix a bug with \protect\cs{msdata} when using multiple \protect\cs{beginnumbering}\ …\ \protect\cs{endnumbering}.} +% \changes{v2.16.7}{2016/12/12}{Fix a bug with \protect\cs{numberpstarttrue} when using multiple \protect\cs{beginnumbering}\ ...\ \protect\cs{endnumbering}.} +% \changes{v2.16.7}{2016/12/12}{Fix a bug with \protect\cs{msdata} when using multiple \protect\cs{beginnumbering}\ ...\ \protect\cs{endnumbering}.} % \changes{v2.16.8}{2016/12/16}{Fix a bug with \protect\cs{edindex} in footnotes in parallel typesetting.} % \changes{v2.17.0}{2016/12/23}{Add \protect\cs{edglsadd} command.} % \changes{v2.17.0}{2016/12/23}{Add \protect\cs{setmsdataposition} setting.} @@ -534,6 +534,7 @@ % \changes{v2.31.1}{2019/03/03}{Fix bug with \protect\cs{Xhangindent} and \protect\cs{hangindentX} for right-to-left texts.} % \changes{v2.31.2}{2019/04/03}{Fix bug with familiar footnote containing not default font (introduced with v.~2.20.0).} % \changes{v2.31.3}{2019/06/19}{Fix bug with paragraphed footnote in RTL context.} +% \changes{v2.32.0}{2019/07/15}{Add \protect\cs{Xlinenumannotationonlyfirst}, \protect\cs{Xlinenumannotationonlyfirstintwo}, \protect\cs{Xsymlinenumannotation}, \protect\cs{Xendlinenumannotationonlyfirst}, \protect\cs{Xendlinenumannotationonlyfirstintwo} and \protect\cs{Xendsymlinenumannotation}.} % Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename) % has version number \fileversion, last revised \filedate.}} % @@ -1307,10 +1308,10 @@ % \begin{verbatim} % \edtext{first lemma} % \linenumannotation{A} -% \edtext{second lemma}{…} +% \edtext{second lemma}{...} % \edtext{third% % \linenumannotation{B} -% lemma}{…} +% lemma}{...} % \edtext{fourth lemma}& % \end{verbatim} % In the critical notes, the line number will be followed @@ -1385,6 +1386,8 @@ % If there an more than one annotation in the same line, there are separated by a comma. % If you want to change the separator, you can use \\ % \cs{setlinenumannotationsep}\marg{sep} +% \subsubsection{Annotations in the apparatus} +% Some others options for the annotation in the apparatus are described on \reff{annotation-inapparatus} % \subsection{Executing code at each line}\label{linehook} % \Macpackage provides an advanced feature for users. % \DescribeMacro{\dolinehook}\DescribeMacro{\doinsidelinehook} @@ -1407,7 +1410,7 @@ % \begin{verbatim} % \beginnumbering % \pstart -% … +% ... % 1.\doinsidelinehook{\markboth{1}{1}} a % \pend % \end{verbatim} @@ -1752,10 +1755,10 @@ % If you use UTF-8 processor, like \XeLaTeX\ or \LuaLaTeX, there should not be any glitches. % However, pay attention to how characters are encoded. Similar-looking characters may be represented differently in unicode numbering. % -% For instance, in Greek, ``ᾳ'' has two possible unicode numbers: +% For instance, in French, ``é'' has two possible unicode numbers: % \begin{itemize} -% \item GREEK SMALL LETTER ALPHA (U+03B1) + COMBINING GREEK YPOGEGRAMMENI (U+0345) -% \item GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI (U+1FB3) +% \item LATIN SMALL LETTER E (U+0065) + COMBINING ACUTE ACCENT (U+0301) +% \item LATIN SMALL LETTER E WITH ACUTE (U+00E9) % \end{itemize} % % Which unicode number you use depends, many times, on your keyboard configuration (the computer-input system). @@ -2018,10 +2021,10 @@ % To keep that space, you have to either append a backslash followed by a space or \verb+{}+ to \cs{stopmsdata}, like so: % \begin{verbatim} % \msdata{ABC}Lorem ipsum dolor -% […] -% amet\stopmsdata{} \msdata{ABCD}sic transit […] +% [...] +% amet\stopmsdata{} \msdata{ABCD}sic transit [...] % \end{verbatim} -% Which means that the part of text containing \enquote{Lorem ipsum dolor […] amet} is witnessed by manuscripts A, B and C, while the part of text starting by \enquote{sic transit} is witnessed by manuscripts A, B, C and D. +% Which means that the part of text containing \enquote{Lorem ipsum dolor [...] amet} is witnessed by manuscripts A, B and C, while the part of text starting by \enquote{sic transit} is witnessed by manuscripts A, B, C and D. % % \cs{stopmsdata} is also automatically inserted by \cs{msdata}. % @@ -2276,6 +2279,32 @@ % For endnotes, \cs{Xendnumberonlyfirstinline}; \cs{Xendnumberonlyfirstintwolines} and \cs{Xendsymlinenum} are the equivalents of % \\ \cs{Xnumberonlyfirstinline}; \cs{Xnumberonlyfirstintwolines} and \cs{Xsymlinenum}. % +% \subsubsection{Print line number annotation only at first time}\label{annotation-inapparatus} +% \DescribeMacro{\Xlinenumannotationonlyfirst} +% By default, the line number annotation (\reff{annotion} is printed in every note. If you want to print it only the first time for a given annotation +% you can use \cs{Xlinenumannotationonlyfirst}\oarg{s}. +% +% Note the two followings points: +% \begin{itemize} +% \item If you use \option{noresetlinenumannotation} option of \macpackage, the \cs{Xlinenumannotationonlyfirst} won't take account of the official line number. +% \item The \cs{Xlinenumannotationonlyfirst} works for consecutive lemma with the same annotation. That is, if you have for example a lemma with \verb+A+ annotation, then a lemma with \verb+B+ annotation, then a lemma with \verb+A+ annotation, all lemma will have its annotation in the apparatus. +% \end{itemize} +% +% \DescribeMacro{\Xlinenumannotationonlyfirstintwo} +% Suppose you have a lemma on annoation~1 and a lemma between annotation~1 and annotation~3. +% With \cs{Xlinenumannotationonlyfirst}, the second lemma is considered to be with the same line annotation as the first lemma. +% But if you use both \cs{Xlinenumannotationonlyfirst}\oarg{s} and \cs{Xlinenumannotationonlyfirstintwo}\oarg{s}, a distinction is made. +% +% +% \DescribeMacro{\Xsymlinenumannotation} +% For setting a particular symbol in place of the line number annotation, you can use \protect\cs{Xsymlinenumannotation}\oarg{s}\marg{symbol} in combination with \protect\cs{Xlinenumannotationonlyfirst}\oarg{s}. From the second lemma with the same line number annotation, the symbol will be used instead of the annotation. Note that any command called in \meta{symbol} must be robust. Use \protect\cs{robustify} to robustify a non-robust command. +% +% \DescribeMacro{\Xendlinenumannotationonlyfirst} +% \DescribeMacro{\Xendlinenumannotationonlyfirstintwo} +% \DescribeMacro{\Xendsymlinenumannotation} +% For endnotes, \cs{Xendlinenumannotationonlyfirst}; \cs{Xendlinenumannotationonlyfirstintwo} and \cs{Xendsymlinenumannotation} are the equivalents of +% \\ \cs{Xlinenumannotationonlyfirst}; \cs{Xlinenumannotationonlyfirstintwo} and \cs{Xsymlinenumannotation}. +% % \subsubsection{Print page number only at first time} % For endnotes, \reledmac\ provides a mechanism for printing the page number only the first time it is seen. % However, when a lemma spans over two pages, the line numbers are normally printed in the following pattern: starting page number - starting line number - ending page number - ending line number. @@ -4285,7 +4314,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2019/06/19 v2.31.3 typesetting critical editions]% +\ProvidesPackage{reledmac}[2019/07/15 v2.32.0 typesetting critical editions]% % \end{macrocode} % % \subsection{Package options} @@ -4560,7 +4589,7 @@ % \begin{macro}{\led@err@PendInEdtext} % \begin{macrocode} \newcommand*{\led@err@edtextoutsidepstart}{% - \reledmac@error{\string\edtext\space outside numbered paragraph (\pstart\space …\space\pend)}{\@ehc}}% + \reledmac@error{\string\edtext\space outside numbered paragraph (\pstart\space ...\space\pend)}{\@ehc}}% \newcommand{\led@err@PstartInEdtext}[1]{% \reledmac@error{\string\pstart\space in \string\edtext\space #1 argument}{\@ehc}% @@ -4668,7 +4697,7 @@ \newcommand*{\led@err@PstartNotNumbered}{% \reledmac@error{\string\pstart\space must be used within a numbered section % - (\string\beginnumbering\space …\space\string\endnumbering)}{\@ehc}}% + (\string\beginnumbering\space ...\space\string\endnumbering)}{\@ehc}}% \newcommand*{\led@err@PstartInPstart}{% \reledmac@error{\string\pstart\space encountered while another \string\pstart\space was in effect}{\@ehc}} @@ -4816,7 +4845,7 @@ % \begin{macro}{\led@err@toendnotes@outsidenumbering} % \begin{macrocode} \newcommand{\led@err@toendnotes@outsidenumbering}{% - \reledmac@error{\string\toendnotes\space and related commands must be called inside a numbered texte (\string\beginnumbering\space …\space\string\endnumbering)}{\@ehc}% + \reledmac@error{\string\toendnotes\space and related commands must be called inside a numbered texte (\string\beginnumbering\space ...\space\string\endnumbering)}{\@ehc}% }% % \end{macrocode} % \end{macro} @@ -4887,7 +4916,7 @@ % \begin{macro}{\led@warn@edinde@outsidenumbering} % \begin{macrocode} \newcommand{\led@warn@edinde@outsidenumbering}{% - \reledmac@warning{\string\edindex\space called outside of \string\beginnumbering\space …\space \string\endnumbering. \MessageBreak Automatically switched to \string\index.}% + \reledmac@warning{\string\edindex\space called outside of \string\beginnumbering\space ...\space \string\endnumbering. \MessageBreak Automatically switched to \string\index.}% }% % \end{macrocode} % \end{macro} @@ -8222,7 +8251,7 @@ % The general mechanism is the following: % \begin{itemize} % \item \textbf{At the first run}, each \protect\cs{sameword} command increments an \protect\package{etoolbox} counter the name of which contains the argument of the \protect\cs{sameword} commands. -% \item Then this counter, associated with the argument of \protect\cs{sameword} is stored with the \protect\cs{@sw} command in the auxiliary file of the current \macpackage\ section (the \verb+.1+, \verb+.2+… file). +% \item Then this counter, associated with the argument of \protect\cs{sameword} is stored with the \protect\cs{@sw} command in the auxiliary file of the current \macpackage\ section (the \verb+.1+, \verb+.2+... file). % \item \textbf{When this auxiliary file is read at the second run}, different operations are achieved: % \begin{enumerate} % \item Get the rank of each \protect\cs{sameword} in a line (relative rank) from the rank of each \protect\cs{sameword} in all the numbered section (absolute rank): @@ -8793,7 +8822,7 @@ }% % \end{macrocode} % Restore standard \enquote{nobreak} and \enquote{autopar} settings. -% Normally, \cs{if@nobreak} is true only immediately after a sectioning command (see latex.ltx file). As a \cs{pstart}\ …\ \cs{pend} structure can't contain any sectioning command, we set \cs{if@nobreak} to false. +% Normally, \cs{if@nobreak} is true only immediately after a sectioning command (see latex.ltx file). As a \cs{pstart}\ ...\ \cs{pend} structure can't contain any sectioning command, we set \cs{if@nobreak} to false. % \begin{macrocode} \@nobreakfalse% \ifautopar% @@ -12126,6 +12155,34 @@ \fi% }{}% % \end{macrocode} +% Finally, we check for \cs{Xlinenumannotationonlyfirst} and \cs{Xlinenumannotationonlyfirstintwo}, and we redefine, if required, \cs{@annot@start@print} and \cs{annot@end@print}. We also store the current line number annotations. +% \begin{macrocode} + \iftoggle{Xlinenumannotationonlyfirst@\@currentseries}{% + \ifboolexpr{% + (% + togl{Xlinenumannotationonlyfirstintwo@\@currentseries}% + and test{\ifcsequal{annot@start}{prevannot@start@\@currentseries}}% + and test{\ifcsequal{annot@end}{prevannot@end@\@currentseries}}% + )% + or% + (% + not togl{Xlinenumannotationonlyfirstintwo@\@currentseries}% + test{\ifcsequal{annot@start}{prevannot@start@\@currentseries}}% + )% + }{% + \def\@annot@start@print{% + \l@wrapcs@ifnotemptybox{Xwraplinenumannotation@\@currentseries}{\csuse{Xsymlinenumannotation@\@currentseries}}% + }% + \let\@annot@end@print\relax% + \ifx\linenumrep\@gobble%Don't print the dash if we're not printing the line number + \l@d@dashfalse% + \fi% + }{}% + \global\cslet{prevannot@start@\@currentseries}{\annot@start}% + \global\cslet{prevannot@end@\@currentseries}{\annot@end}% + }% + {}% +% \end{macrocode} % End of \protect\cs{setprintlines}. % \begin{macrocode} }% @@ -14154,6 +14211,34 @@ \fi% }{}% % \end{macrocode} +% Finally, we check for \cs{Xendlinenumannotationonlyfirst} and \cs{Xendlinenumannotationonlyfirstintwo}, and we redefine, if required, \cs{@annot@start@print} and \cs{annot@end@print}. We also store the current line number annotations. +% \begin{macrocode} + \iftoggle{Xendlinenumannotationonlyfirst@\@currentseries}{% + \ifboolexpr{% + (% + togl{Xendlinenumannotationonlyfirstintwo@\@currentseries}% + and test{\ifcsequal{annot@start}{prevannot@start@\@currentseries}}% + and test{\ifcsequal{annot@end}{prevannot@end@\@currentseries}}% + )% + or% + (% + not togl{Xendlinenumannotationonlyfirstintwo@\@currentseries}% + test{\ifcsequal{annot@start}{prevannot@start@\@currentseries}}% + )% + }{% + \def\@annot@start@print{% + \l@wrapcs@ifnotemptybox{Xendwraplinenumannotation@\@currentseries}{\csuse{Xendsymlinenumannotation@\@currentseries}}% + }% + \let\@annot@end@print\relax% + \ifx\linenumrep\@gobble%Don't print the dash if we're not printing the line number + \l@d@dashfalse% + \fi% + }{}% + \global\cslet{prevannot@start@\@currentseries}{\annot@start}% + \global\cslet{prevannot@end@\@currentseries}{\annot@end}% + }% + {}% +% \end{macrocode} % End of \protect\cs{setprintendlines}. % \begin{macrocode} }% @@ -14415,10 +14500,15 @@ \csgdef{Xboxendlinenum@#1}{0pt}% \csgdef{Xboxsymlinenum@#1}{0pt}% - \newtoggle{Xnumberonlyfirstinline@#1}% \newtoggle{Xgroupbyline@#1}% \newtoggle{Xgroupbylineseparetwolines@#1}% + + \newtoggle{Xnumberonlyfirstinline@#1}% \newtoggle{Xnumberonlyfirstintwolines@#1}% + + \newtoggle{Xlinenumannotationonlyfirst@#1}% + \newtoggle{Xlinenumannotationonlyfirstintwo@#1}% + \csgdef{Xtwolines@#1}{}% \csgdef{Xmorethantwolines@#1}{}% \csgdef{Xsublinesep@#1}{\fullstop}% @@ -14430,7 +14520,10 @@ \newtoggle{Xpstart@#1}% \newtoggle{Xstanza@#1}% \csgdef{Xstanzaseparator@#1}{}% + \csgdef{Xsymlinenum@#1}{}% + \csgdef{Xsymlinenumannotation@#1}{}% + \newtoggle{Xnonumber@#1}% \csgdef{Xbeforenumber@#1}{0pt}% \csgdef{Xtxtbeforenumber@#1}{}% @@ -14499,7 +14592,7 @@ {\unexpanded{\let\index\nindex}}% {}% \ifbool{indtl@notenumber}% - {\unexpanded{\let\index\nindex}}%There is no note number… so + {\unexpanded{\let\index\nindex}}%There is no note number... so {}% \noexpand\Xnote@true% \noexpand\prepare@Xprenotes{#1}% @@ -14536,7 +14629,7 @@ {\unexpanded{\let\index\nindex}}% {}% \ifbool{indtl@notenumber}% - {\unexpanded{\let\index\nindex}}%There is no note number… so + {\unexpanded{\let\index\nindex}}%There is no note number... so {}% \noexpand\Xnote@true% \noexpand\prepare@Xprenotes{#1}% @@ -14860,12 +14953,19 @@ \newtoggle{Xendnonumber@#1}% \csgdef{Xendhangindent@#1}{0pt}% + \newtoggle{Xendnumberonlyfirstinline@#1}% \newtoggle{Xendnumberonlyfirstintwolines@#1}% + \newtoggle{Xendlinenumannotationonlyfirst@#1}% + \newtoggle{Xendlinenumannotationonlyfirstintwo@#1}% + \csgdef{Xendbeforesymlinenum@#1}{\csuse{Xendbeforenumber@#1}}% \csgdef{Xendaftersymlinenum@#1}{\csuse{Xendafternumber@#1}}% + \csgdef{Xendsymlinenum@#1}{}% + \csgdef{Xendsymlinenumannotation@#1}{}% + \csgdef{Xendboxsymlinenum@#1}{0pt}% \csgdef{Xendbhooklinenumber@#1}{}% @@ -15145,6 +15245,7 @@ \newhookcommand@series@reload{Xbhookgroup}{critical} \newhookcommand@series{Xboxsymlinenum}% \newhookcommand@series{Xsymlinenum} + \newhookcommand@series{Xsymlinenumannotation}% \newhookcommand@series{Xbeforenumber} \newhookcommand@series{Xtxtbeforenumber} \newhookcommand@series{Xafternumber} @@ -15160,6 +15261,8 @@ \newhookcommand@series@reload{Xafterrule}{critical} \newhooktoggle@series{Xnumberonlyfirstinline} \newhooktoggle@series{Xnumberonlyfirstintwolines} + \newhooktoggle@series{Xlinenumannotationonlyfirst}% + \newhooktoggle@series{Xlinenumannotationonlyfirstintwo}% \newhooktoggle@series{Xgroupbyline}% \newhooktoggle@series{Xgroupbylineseparetwolines}% \newhooktoggle@series{Xnonumber} @@ -15282,11 +15385,16 @@ \newhooktoggle@series{Xendnumberonlyfirstinline}% \newhooktoggle@series{Xendnumberonlyfirstintwolines}% + \newhooktoggle@series{Xendlinenumannotationonlyfirst}% + \newhooktoggle@series{Xendlinenumannotationonlyfirstintwo}% + \newhookcommand@series{Xendsymlinenum}% \newhookcommand@series{Xendbeforesymlinenum}% \newhookcommand@series{Xendaftersymlinenum}% \newhookcommand@series{Xendboxsymlinenum}% + \newhookcommand@series{Xendsymlinenumannotation}% + \newhookcommand@series{Xendbhooklinenumber}% \newhookcommand@series{Xendahooklinenumber}% \newhookcommand@series{Xendbhookinplaceofnumber}% @@ -16487,6 +16595,9 @@ \newtoggle{Xlineflag@SEref}% \toggletrue{Xlineflag@SEref}%%Here exception +\newtoggle{Xlinenumannotationonlyfirst@SEref}%Never changed, just for the test in \setprintlines +\newtoggle{Xlinenumannotationonlyfirst@appref}%Idem + \def\Xlinenumannotationposition@appref{after}% \def\Xlinenumannotationposition@SEref{after}% @@ -16533,6 +16644,10 @@ \newtoggle{Xendlineflag@SErefwithpage} \toggletrue{Xendlineflag@SErefwithpage}%Here, exception + +\newtoggle{Xendlinenumannotationonlyfirst@SEref}%Never changed, just for the test in \setprintendlines +\newtoggle{Xendlinenumannotationonlyfirst@appref}%Idem + \def\Xendlinenumannotationposition@apprefwithpage{after}% \def\Xendlinenumannotationposition@apprefwithpage@SErefwithpage{after}% |