diff options
author | Karl Berry <karl@freefriends.org> | 2017-02-23 22:01:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-02-23 22:01:46 +0000 |
commit | 9790ad4111397b2458f5c485f4e4e72d4b555e31 (patch) | |
tree | 9453b986df7153735b63095f54827030e8073998 /Master/texmf-dist/source/latex/reledmac | |
parent | 0a85dca32cca799d77c78ea28f03e66694d336d1 (diff) |
reledmac (22feb17)
git-svn-id: svn://tug.org/texlive/trunk@43319 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac')
-rw-r--r-- | Master/texmf-dist/source/latex/reledmac/reledmac.dtx | 277 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/reledmac/reledpar.dtx | 25 |
2 files changed, 193 insertions, 109 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx index c94169cc627..7920718c8da 100644 --- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx +++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx @@ -449,16 +449,18 @@ % \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 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 bug with \protect\cs{numberpstarttrue} when using multiple \protect\cs{beginnumbering}…\protect\cs{endnumbering}} -% \changes{v2.16.7}{2016/12/12}{Fix bug with \protect\cs{msdata} when using multiple \protect\cs{beginnumbering}…\protect\cs{endnumbering}} -% \changes{v2.16.8}{2016/12/16}{Fix bug with \protect\cs{edindex} in footnote in parallel typesetting} +% \changes{v2.16.7}{2016/12/12}{Fix bug with \protect\cs{numberpstarttrue} when using multiple \protect\cs{beginnumbering}…\protect\cs{endnumbering}.} +% \changes{v2.16.7}{2016/12/12}{Fix bug with \protect\cs{msdata} when using multiple \protect\cs{beginnumbering}…\protect\cs{endnumbering}.} +% \changes{v2.16.8}{2016/12/16}{Fix 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.} % \changes{v2.17.1}{2017/01/22}{Fix spurious space in paragraphed footnotes when using \protect\LuaLaTeX without using Right-To-Left text.} -% \changes{v2.17.2}{2017/01/25}{Change log message when numbered files don't still exist, in order to improve compatibility with \protect\emph{latexmk}.} +% \changes{v2.17.2}{2017/01/25}{Change log message when numbered files still don't exist, in order to improve compatibility with \protect\emph{latexmk}.} % \changes{v2.17.3}{2017/01/31}{Fix bug with \protect\cs{doendnotesbysection} and \protect\cs{doendnotes}.} % \changes{v2.17.4}{2017/02/10}{Fix bug with \protect\cs{setSErefonlypageprefixsingle} and \protect\cs{setSErefonlypageprefixmore}.} -% \changes{v2.17.5}{2017/02/12}{Fix bug with \protect\cs{pstartref} when refering to the left side of a parallel typesetting.} +% \changes{v2.17.5}{2017/02/12}{Fix bug with \protect\cs{pstartref} when refering to the left side in parallel typesetting.} +% \changes{v2.18.0}{2017/02/22}{Fix bug when using both \protect\cs{Xnumberonlyfirstintwolines} or \protect\cs{Xnumberonlyfirstinline} and \protect\cs{Xparafootsep} and \protect\cs{Xsymlinenum}.} +% \changes{v2.18.0}{2017/02/22}{Fix bug when using a \protect\cs{edtext} in two lines or more in right-to-left typesetting with \protect\XeLaTeX.} % \title{\Macpackage \\ % Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename) % has version number \fileversion, last revised \filedate.}} @@ -689,17 +691,19 @@ % A new name was selected: \reledmac (extended renewed \eledmac). % To migrate from \eledmac to \reledmac, please read \reff{migratereledmac}. % -% \subsection{List of works edited with (r)(e)ledmac} -% A collaborative list of works edited with (r)(e)ledmac is available at +% \subsection{Bibliography} +% A collaborative list of works edited with (r)(e)(ledmac is available at % \url{https://www.zotero.org/groups/critical_editions_typeset_with_edmac_ledmac_and_eledmac/items}. % Please add your own edition made with (r)(e)ledmac. % -% \section{How the package works}\label{howto} +% If you write book or article about (r)(e)ledmac, please add it on the collaborative bibliography on \url{https://www.zotero.org/groups/articles_and_books_about_reledmac/items}. +% \section{How the package works --- the problem of the number of \LaTeX\ runs}\label{howto} % The \macpackage package is a three-pass package like \LaTeX\ itself. % Although your textual apparatus and line % numbers will be printed on the first run, it takes two more -% passes through \LaTeX\ to be sure that everything is correctly -% placed. If you make any subsequent changes altering the number +% compilations by \LaTeX\ to be sure that everything is correctly +% placed, and one more if you typeset right-to-left text with \XeLaTeX. +% If you make any subsequent changes altering the number % of lines or notes, the input file may similarly % require three passes to get everything to the right place. % \Macpackage will tell you that you need to make more runs when it detects changes, @@ -707,9 +711,10 @@ % problems with a line or two misnumbered at the top of a page, try % running \LaTeX\ once or twice more. % +% \textbf{However, the best way to be sure that one has made the right number of runs +% is to use some of \LaTeX's run scripts like \emph{latexmk}}. +% % \section{Compatibility warning} -% However, the best way to be sure that one has made the right number of runs -% is to use some of \LaTeX's run scripts like \emph{latexmk}. % % If you use other classes than \cs{article} or \cs{book}, or modify the layout with \package{geometry}, some settings should be made to have correct height for the blocks of notes. % @@ -1371,8 +1376,8 @@ % % Remember that the endnotes are temporarily stored in an auxiliary file. That means in general you want to write the \meta{content} in the auxiliary file \emph{without expanding it}, that is without interpreting \TeX\ content. % -% However, in some case, you may want to write -% once-expanded\footnote{The expansion mechanism' of \TeX is a quite complex problem, but fundamental. We have no place to explain it fully here. Read introduction to \TeX to understand well.} +% However, in some cases, you may want to write a +% once-expanded\footnote{The expansion mechanism of \TeX\ is a quite complex problem, but fundamental. We have no place to explain it fully here. Read introduction to \TeX\ to understand well.} % version of the \meta{content}, that is the version where the commands are expanded on the first level. % This can be, for example, to get a counter value. % Use the starred version in this case. @@ -1433,7 +1438,7 @@ % for the lemma. As the argument to \protect\cs{linenum}, you specify % those seven parameters in that order, separated by vertical bars % (the \verb"|" character). I.e.\\ -% .\verb+\linenum{+\meta{start page}\verb+|+\meta{s. line}\verb+|+\meta{s. sub-l.}\verb+|+\meta{end p.}\verb+|+\meta{e. l.}\verb+|+\meta{e. sub-l.}\verb+|+\meta{font}\verb+|+\verb+}+\\ +% \verb+\linenum{+\meta{start page}\verb+|+\meta{s. line}\verb+|+\meta{s. sub-l.}\verb+|+\meta{end p.}\verb+|+\meta{e. l.}\verb+|+\meta{e. sub-l.}\verb+|+\meta{font}\verb+|+\verb+}+\\ % However, you can retain the value % computed by \macpackage for any number by simply omitting it; and % you can omit a sequence of vertical bars at the end of the @@ -1706,10 +1711,10 @@ % You can change it using \cs{setmsdatalabel}\marg{txt}. % % \DescribeMacro{\setmsdataposition} -% If you tel that the manuscript apparatus will be on the same level of critical footnotes than other apparatus, for each line, reledmac will first insert manuscript apparatus, then other footnotes. +% If you want the manuscript apparatus to be on the same level of critical footnotes as the other apparatuses, for each line, reledmac will first insert the manuscript apparatus, then the other footnotes. % You can change it using:\\ % \cs{msdataposition}\arg{regular-msdata}\\ -% And restore the default behavior using +% And restore the default behaviour using % \cs{msdataposition}\arg{msdata-regular} % \subsection{Familiar notes} \label{sec:desc:familiar} % @@ -2834,7 +2839,7 @@ % \subsection{Cross-referencing to a critical note} % If you want to refer to a word which is a lemma word, the \cs{edlabel} command should be in the first argument of \cs{edtext} command. % -% If you want to refer to the content of a a \cs{Xfootnote}, the line and subline number printed will be the start line. +% If you want to refer to the content of a \cs{Xfootnote}, the line and subline number printed will be the start line. % % If you want to refer to starting and ending lines, you should use \cs{appref} and related tools (\reff{appref}). % \subsection{Cross-referencing which return a number in any case} @@ -2970,7 +2975,7 @@ % \setapprefprefixmore{lines~} % \end{verbatim} % -% Note that if you do not use \protect\cs{setapprefprefixmore}, argument of \protect\cs{setapprefprefixsingle} will be used in any case. +% Note that if you do not use \protect\cs{setapprefprefixmore}, the argument of \protect\cs{setapprefprefixsingle} will be used in any case. % % % \DescribeMacro{\setSErefprefixsingle}\DescribeMacro{\setSErefprefixmore} @@ -3143,7 +3148,7 @@ % \protect\cs{edtext}\marg{lemma}\marg{app} command, \protect\cs{edindex} should be defined inside % the first argument, e.g., % \begin{verbatim} -% The \edtext{creature\edlabel{elephant} was quite +% The \edtext{creature\edindex{elephant} was quite % unafraid}{\Afootnote{Of the mouse, that is.}} % \end{verbatim} % @@ -3163,12 +3168,16 @@ % renew |\pagelinesep| to get a different separator. % % |-| is the default -% separator used by the \textsc{MakeIndex} program. +% separator used by the \textsc{MakeIndex} program. +% +% You can reconfigure it, this example defines a colon as separator: +% \begin{verbatim} +% \renewcommand{\pagelinesep}{:} +% \end{verbatim} % -% Consequently, if you want to use an other \protect\cs{pagelinesep}, you have to configure your \verb+.ist+ index style file. For example if you use \verb+:+ as separator\footnote{For further detail, you can read \url{http://tex.stackexchange.com/a/32783/7712}.}. +% However, you also have to configure your \verb+.ist+ index style file. For example if you use \verb+:+ as separator\footnote{For further detail, you can read \url{http://tex.stackexchange.com/a/32783/7712}.}. % \begin{verbatim} % page_compositor ":" -% delim_r ":" % \end{verbatim} % % Read the \textsc{MakeIndex} program's handbook about the \verb+.ist+ file. @@ -3214,8 +3223,8 @@ % % \section{Glossary} % \Macpackage provides mechanism to make glossaries with the \package{glossaries} package, refering not to the page, but to the page and line. -% \subsection{Prealable setting} -% The standard compositor between page and line number in \macpackage is a dash, while \package{glossaries} use, in standard, a dot. +% \subsection{Preamble setting} +% The standard compositor between page and line number in \macpackage is a dash, while \package{glossaries} uses, by default, a dot. % Consequently, you must: % \begin{itemize} % \item Or set . @@ -3768,7 +3777,7 @@ % you must load this package \emph{before} the \macpackage package. % -% \subsubsection{Parallel typesetting}\label{eledpar} +% \subsection{Parallel typesetting}\label{eledpar} % % % Peter Wilson has developed the \ledpar package @@ -3861,7 +3870,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2017/02/12 v2.17.5 typesetting critical editions]% +\ProvidesPackage{reledmac}[2017/02/23 v2.18.0a typesetting critical editions]% % \end{macrocode} % % \subsection{Package options} @@ -6591,7 +6600,7 @@ % It is written in the file list. % If we process a line-list file which used a older version, that means the commands used inside are deprecated, and we can't use them. % \begin{macrocode} -\newcommand{\this@line@list@version}{5}% +\newcommand{\this@line@list@version}{6}% % \end{macrocode} % \end{macro} % \begin{macro}{\line@list@stuff} @@ -6728,6 +6737,49 @@ % \end{macro} % \end{macro} % \end{macro} +% \begin{macro}{\flag@start@RTL} +% \begin{macro}{\flag@end@RTL} +% With \XeLaTeX, there is a problem when using RTL: the writing of a command in the numbered auxiliary files (\verb+.1+, \verb+.2+ etc) is reversed when the first argument of \cs{edtext} is typset in one line, but it is \textbf{not} reversed when this first argument is typset in two lines or more.\footnote{This problem is caused by the way \XeTeX\ manages right-to-left typsetting. David Carlisle explains it on \url{http://tex.stackexchange.com/a/333373/7712} and provides a potential solution, using \cs{vadjust}. However in some cases this adds spurious vertical spaces in reledmac. That is why we are using the solution explained below.} +% +% To solve this problem, we use a crossref mechanism. At the first run, we put a label, but we do not write any \cs{@ref} command. When the value of the label can be tested, that is after three runs, we're doing: +% \begin{itemize} +% \item If the first argument of \cs{edtext} is typeset on only one line, we first call \cs{flag@end}, at the point we normally call \cs{flag@start}, at the beginning of the content of the first argument, and we call \cs{flag@end} at the point we normally call \cs{flag@start}, at the end of the content of the first argument. +% \item If the first argument of \cs{edtext} is typeset on only two lines, we use the normal order. +% \end{itemize} +% This system is a workaround for the problem of order when writing in auxiliary files. +% +% The \cs{flag@start@RTL} and \cs{flag@end@RTL} macro put the label, do the test and call the right commands. +% \begin{macrocode} +\newcommand{\flag@start@RTL}{% + \edlabel{edtext:start:\csuse{thisedtext@\the\@edtext@level}}% + \IfStrEq{\xabslineref{edtext:start:\csuse{thisedtext@\the\@edtext@level}}}% + {000}% + {}% + {% + \ifnumequal% + {\xabslineref{edtext:start:\csuse{thisedtext@\the\@edtext@level}}}% + {\xabslineref{edtext:end:\csuse{thisedtext@\the\@edtext@level}}}% + {\flag@end}% + {\flag@start}% + }% +}% + +\newcommand{\flag@end@RTL}{% + \edlabel{edtext:end:\csuse{thisedtext@\the\@edtext@level}}% + \IfStrEq{\xabslineref{edtext:start:\csuse{thisedtext@\the\@edtext@level}}}% + {000}% + {}% + {% + \ifnumequal% + {\xabslineref{edtext:start:\csuse{thisedtext@\the\@edtext@level}}}% + {\xabslineref{edtext:end:\csuse{thisedtext@\the\@edtext@level}}}% + {\flag@start}% + {\flag@end}% + }% +}% +% \end{macrocode} +% \end{macro} +% \end{macro} % \begin{macro}{\flag@start@later} % \begin{macro}{\flag@end@later} % \protect\cs{flag@start@later} and \protect\cs{flag@end@later}: these send the\cs{@ref@later} to the line-list file @@ -7166,9 +7218,12 @@ % \begin{macrocode} \global\advance\@edtext@level by 1% % \end{macrocode} -% We also increase the \verb+edtext+ \LaTeX\ counter to insert hypertarget if the \package{hyperref} package is loaded. +% We also increase the \verb+edtext+ \LaTeX\ counter to insert a hypertarget if the \package{hyperref} package is loaded, and also works with \cs{edtext} on right-to-left typesetting with \XeLaTeX. +% +% We store the value for the current level in a global macro. So we have one macro by level of \cs{edtext}. That is required, because \cs{edtext} can contain \cs{edtext}. % \begin{macrocode} \stepcounter{edtext}% + \csxdef{thisedtext@\the\@edtext@level}{\theedtext}% % \end{macrocode} % By default, we do not use \protect\cs{lemma} % \begin{macrocode} @@ -7236,12 +7291,13 @@ \ignorespaces #2\relax% \@edtext@secondarg@false% % \end{macrocode} -% With \protect\package{polyglossia}, you must track whether the language reads left to right (English) or right to left (Arabic). +% With \XeLaTeX, you must track whether the language reads left to right (English) or right to left (Arabic). \reledmac defines an \cs{if@RTL} boolean test is not already defined. % \begin{macrocode} - \@ifundefined{xpg@main@language}{%if not polyglossia - \flag@start}% - {\if@RTL\flag@end\else\flag@start\fi% - }% + \if@RTL% + \flag@start@RTL% + \else% + \flag@start% + \fi% % \end{macrocode} % We write in the numbered file wether the current \protect\cs{edtext} has a \protect\cs{lemma} in the the second argument. % \begin{macrocode} @@ -7266,7 +7322,6 @@ \endgroup% \ifdef{\hypertarget}% {% - \csedef{thisedtext@\the\@edtext@level}{\theedtext}%We need one macro by level, as #1 can contain new \edtext \Hy@raisedlink@left{\hypertarget{\csuse{thisedtext@\the\@edtext@level}:start}{}}% \showlemma{#1}% \Hy@raisedlink{\hypertarget{\csuse{thisedtext@\the\@edtext@level}:end}{}}% @@ -7288,16 +7343,17 @@ \x@lemma% \global\let\x@lemma=\relax% \fi% - \@ifundefined{xpg@main@language}{%if not polyglossia - \flag@end}% - {\if@RTL\flag@start\else\flag@end\fi% With polyglossia, you must track whether the language reads left to right (English) or right to left (Arabic). - }% + \if@RTL% + \flag@end@RTL% + \else% + \flag@end% + \fi% % \end{macrocode} % We switch some flags to false. % \begin{itemize} % \item The one that checks having footnotes inside a \protect\cs{edtext}. % \item The one that says we are inside a \protect\cs{edtext}. In fact, it is not a flag, but a counter which is increased to 1 in each leavel of \protect\cs{edtext}. -% \item The one that says we are inside à \protect\cs{@lemma}. +% \item The one that says we are inside a \protect\cs{@lemma}. % \end{itemize} % \begin{macrocode} \global\@noneed@Footnotefalse% @@ -9440,9 +9496,8 @@ % followed by a square bracket, the lemma, and the note text. % % \begin{macrocode} - - \notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalfootfmt}[4]{% + \Xstorelineinfo{#1}{#4}% \nottoggle{Xgroupbyline@#4}{\Xledsetnormalparstuff{#4}}{}% \hangindent=\csuse{Xhangindent@#4}% \everypar{\hangindent=\csuse{Xhangindent@#4}}% @@ -9869,6 +9924,7 @@ % text of the footnote, and the fourth is the series (optional, for backward compatibility). % \begin{macrocode} \newcommand*{\parafootfmt}[4]{% + \Xstorelineinfo{#1}{#4}% \Xinsertparafootsep{#4}% \ledsetnormalparstuff@common% \printlinefootnote{#1}{#4}% @@ -9975,22 +10031,22 @@ \newcommand{\Xinsertparafootsep}[1]{% \ifledRcol@% \ifnumequal{\csuse{#1prevpage@numR}}{\page@numR}% - {\ifcsdef{prevline#1}% Be sur \prevline#1 exists. - {\ifnumequal{\csuse{prevline#1}}{\line@numR}% - {\ifcsempty{Xsymlinenum@#1}{\csuse{Xparafootsep@#1}}{}}% - {\csuse{Xparafootsep@#1}}% - }% - {\csuse{Xparafootsep@#1}}% + {\ifcsdef{prevline#1}% Be sur \prevline#1 exists. + {\ifcsequal{prevline#1}{lineinfo@}% + {\ifcsempty{Xsymlinenum@#1}{\csuse{Xparafootsep@#1}}{}}% + {\csuse{Xparafootsep@#1}}% + }% + {\csuse{Xparafootsep@#1}}% }% {}% \global\csname #1prevpage@numR\endcsname=\page@numR% \else% \ifnumequal{\csuse{#1prevpage@num}}{\page@num}% - {\ifcsdef{prevline#1}% Be sur \prevline#1 exists. - {\ifnumequal{\csuse{prevline#1}}{\line@num}% - {\ifcsempty{Xsymlinenum@#1}{\csuse{Xparafootsep@#1}}{}}% - {\csuse{Xparafootsep@#1}}% - }% + {\ifcsdef{prevline#1}% Be sur \prevline#1 exists. + {\ifcsequal{prevline#1}{lineinfo@}% + {\ifcsempty{Xsymlinenum@#1}{\csuse{Xparafootsep@#1}}{}}% + {\csuse{Xparafootsep@#1}}% + }% {\csuse{Xparafootsep@#1}}% }% {}% @@ -10505,6 +10561,23 @@ % \end{macrocode} % \end{macro} % \subsubsection{Line number printing} +% \begin{macro}{\Xstorelineinfo} +% The \cs{Xstorelineinfo} macro is used to store some data about line number of the current critical footnote, data which will be reused later for the \cs{Xnumberonlyfirstinline} and related setting. +% +% \#1 footnote specification for the current footnote ; +% \#2 footnote series. +% \begin{macrocode} +\newcommand{\Xstorelineinfo}[2]{% + \l@dp@rsefootspec#1|% + \iftoggle{Xnumberonlyfirstintwolines@#2}{% + \xdef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub - \l@dparsedendline - \l@dparsedendsub}% + }% + {% + \xdef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub}% + }% +}% +% \end{macrocode} +% \end{macro} % \begin{macro}{\printlinefootnote} % The \protect\cs{printlinefootnote} macro is called in each \protect\cs{<type>footfmt} command. % It controls whether the line number is printed or not, according to the series options. Its first argument is the information about lines; its second is the series of the footnote. @@ -10513,13 +10586,6 @@ % \changes{v1.18.0}{2015/02/23}{Code refactoring in \protect\cs{printlinefootnote}: the printing of the numbers are factorized in \protect\cs{printlinefootnotearea}} % \begin{macrocode} \newcommand{\printlinefootnote}[2]{% - \l@dp@rsefootspec#1|% - \iftoggle{Xnumberonlyfirstintwolines@#2}{% - \edef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub - \l@dparsedendline - \l@dparsedendsub}% - }% - {% - \edef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub}% - }% \iftoggle{nonum@}{%Try if the line number must printed for this specific not (by default, yes) \hspace{\csuse{Xinplaceofnumber@#2}}% }% @@ -12519,10 +12585,10 @@ \newcommand{\printlineendnote}[2]{% \l@dp@rsefootspec#1|% \iftoggle{Xendnumberonlyfirstintwolines@#2}{% - \edef\lineinfo@{\l@dparsedstartpage - \l@dparsedstartline - \l@dparsedstartsub - \l@dparsedendpage - \l@dparsedendline - \l@dparsedendsub}% + \xdef\lineinfo@{\l@dparsedstartpage - \l@dparsedstartline - \l@dparsedstartsub - \l@dparsedendpage - \l@dparsedendline - \l@dparsedendsub}% }% {% - \edef\lineinfo@{\l@dparsedstartpage - \l@dparsedstartline - \l@dparsedstartsub}% + \xdef\lineinfo@{\l@dparsedstartpage - \l@dparsedstartline - \l@dparsedstartsub}% }% \ifboolexpr{% togl {nonum@}% @@ -12592,12 +12658,12 @@ % \end{macro} % \subsection{User level commands} % \subsubsection{Inserting contents to endnotes} -% The \cs{Xendnotes} commands are defined upper, when defining apparatus commands by series. -% Here, we define. +% The \cs{Xendnotes} commands are defined above, when defining apparatus commands by series. +% Here, we define % only \cs{toendnotes} command not specific to a series, in order to insert arbitrary code. % The regular version writes an unexpanded argument, while the regular version writes a once-expanded argument. % -% \begin{macro}{\toendnotes*} +% \begin{macro}{\toendnotes} % \begin{macro}{\toendnotes*} % \begin{macrocode} \newcommandx{\toendnotes}[2][1,usedefault]{% @@ -13360,7 +13426,7 @@ % \end{macrocode} % \subsubsection{Tools} % The \cs{Xtoendnotes} command inserts any arbitrary content into the endnote file. -% It is an alias of the more generalist \cs{addtoennotes} +% It is an alias of the more generalist \cs{addtoendnotes} % \begin{macrocode} \global\expandafter\newcommand\csname #1toendnotes\endcsname[1]{% @@ -14292,10 +14358,10 @@ % % % \begin{macro}{\zz@@@} -% A convenience macro to zero two labeling counters in one go. +% A convenience macro to zero three labeling counters in one go. % \changes{v0.2.1}{2003/08/26}{Minor change to \protect\cs{zz@@@}} % \begin{macrocode} -\newcommand*{\zz@@@}{000|000} % set two counters to zero in one go +\newcommand*{\zz@@@}{000|000|000}% Set three counters to zero in one go % \end{macrocode} % \end{macro} @@ -14334,7 +14400,7 @@ \ifboolexpr{bool{ledRcol} or bool{ledRcol@}}{% \ifXnote@% \protected@write\@auxout{}% - {\string\l@dmake@labelsR\space\thepage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstartR|{#1}}% + {\string\l@dmake@labelsR\space\thepage|\l@dparsedstartline|\l@dparsedstartsub||\the\c@pstartR|{#1}}% \ifdef{\hypertarget}% {\Hy@raisedlink{\hypertarget{#1}{}}}% {}% @@ -14363,13 +14429,13 @@ \ifXnote@% \ifl@dpairing%pstart or pstartL? \protected@write\@auxout{}% - {\string\l@dmake@labels\space\thepage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstartL|{#1}}% + {\string\l@dmake@labels\space\thepage|\l@dparsedstartline|\l@dparsedstartsub||\the\c@pstartL|{#1}}% \ifdef{\hypertarget}% {\Hy@raisedlink{\hypertarget{#1}{}}}% {}% \else% \protected@write\@auxout{}% - {\string\l@dmake@labels\space\thepage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstart|{#1}}% + {\string\l@dmake@labels\space\thepage|\l@dparsedstartline|\l@dparsedstartsub||\the\c@pstart|{#1}}% \ifdef{\hypertarget}% {\Hy@raisedlink{\hypertarget{#1}{}}}% {}% @@ -14415,19 +14481,23 @@ % \begin{macrocode} \newcounter{line}% \newcounter{subline}% +\newcounter{absline}% \newcommand{\advancelabel@refs}{% \setcounter{line}{\expandafter\labelrefsparseline\label@refs}% \stepcounter{line}% + \setcounter{absline}{\expandafter\labelrefsparseabsline\label@refs}% + \stepcounter{absline}% \ifsublines@% \setcounter{subline}{\expandafter\labelrefsparsesubline\label@refs}% \stepcounter{subline}{1}% - \def\label@refs{\theline|\thesubline}% + \def\label@refs{\theline|\thesubline|\theabsline}% \else% - \def\label@refs{\theline|0}% + \def\label@refs{\theline|0|\theabsline}% \fi% } -\def\labelrefsparseline#1|#2{#1} -\def\labelrefsparsesubline#1|#2{#2} +\def\labelrefsparseline#1|#2|#3{#1}% +\def\labelrefsparsesubline#1|#2|#3{#2}% +\def\labelrefsparseabsline#1|#2|#3{#3}% % \end{macrocode} % \end{macro} % \end{macro} @@ -14442,16 +14512,18 @@ % The initial use of \protect\cs{newcommand} is to catch if \protect\cs{l@dmake@labels} % has been previously defined (by a class or package). % -% \verb+#1+ page number, \verb+#2+ line number, \verb-#3- sub-line number, \verb+#4+ pstart number, \verb+#5+ label. +% \verb+#1+ page number, \verb+#2+ line number, \verb-#3- sub-line number, \verb+#4+ absolute line number, \verb+#5+ pstart number, \verb+#6+ label. % % \begin{macrocode} \newcommand*{\l@dmake@labels}{} -\def\l@dmake@labels#1|#2|#3|#4|#5{% - \expandafter\ifx\csname the@label\csuse{XR@prefix}#5\endcsname \relax\else - \led@warn@DuplicateLabel{\csuse{XR@prefix}#5}% +\def\l@dmake@labels#1|#2|#3|#4|#5|#6{% + \expandafter\ifx\csname the@label\csuse{XR@prefix}#6\endcsname% + \relax% + \else% + \led@warn@DuplicateLabel{\csuse{XR@prefix}#6}% \fi - \global\providetoggle{label@#5@ledRcol}%False is the default value of this toggle, which tell us if a label is linked to a right or a left side - \expandafter\gdef\csname the@label\csuse{XR@prefix}#5\endcsname{#1|#2|#3|#4|\relax}% + \global\providetoggle{label@#6@ledRcol}%False is the default value of this toggle, which tell us if a label is linked to a right or a left side + \expandafter\gdef\csname the@label\csuse{XR@prefix}#6\endcsname{#1|#2|#3|#4|#5|\relax}% \ignorespaces} % \end{macrocode} @@ -14463,15 +14535,16 @@ % % \begin{macrocode} \AtBeginDocument{% - \def\l@dmake@labels#1|#2|#3|#4|#5{}% + \def\l@dmake@labels#1|#2|#3|#4|#5|#6{}% } % \end{macrocode} % % \begin{macro}{\@lab} % The \protect\cs{@lab} command, which appears in the \protect\cs{linenum@out} file, -% appends the current values of page, line and sub-line to the -% \protect\cs{labelref@list}. These values are defined by the earlier +% appends the current value of page, line, sub-line, and absolute line to the +% \protect\cs{labelref@list}. +% These values are defined by the earlier % \protect\cs{@page}, \protect\cs{@nl}, and the \protect\cs{sub@on} and \protect\cs{sub@off} commands % appearing in the \protect\cs{linenum@out} file. % @@ -14489,11 +14562,11 @@ \newcommand*{\@lab}{% \ifledRcol \xright@appenditem{\linenumr@p{\line@numR}|% - \ifsublines@ \sublinenumr@p{\subline@numR}\else 0\fi}% + \ifsublines@ \sublinenumr@p{\subline@numR}\else 0\fi|\the\absline@numR}% \to\labelref@listR \else \xright@appenditem{\linenumr@p{\line@num}|% - \ifsublines@ \sublinenumr@p{\subline@num}\else 0\fi}% + \ifsublines@ \sublinenumr@p{\subline@num}\else 0\fi|\the\absline@num}% \to\labelref@list \fi} % \end{macrocode} @@ -14525,29 +14598,29 @@ % \begin{macrocode} \ifledRcol% \protected@write\@auxout{}% - {\string\l@dmake@labelsR\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstartR|{#1:start}}% + {\string\l@dmake@labelsR\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub||\the\c@pstartR|{#1:start}}% \ifdef{\hypertarget}% {\Hy@raisedlink{\hypertarget{#1:start}{}}}% {}% \protected@write\@auxout{}% - {\string\l@dmake@labelsR\space\l@dparsedendpage|\l@dparsedendline|\l@dparsedendsub|\the\c@pstartR|{#1:end}}% + {\string\l@dmake@labelsR\space\l@dparsedendpage|\l@dparsedendline||\l@dparsedendsub|\the\c@pstartR|{#1:end}}% \else% \ifl@dpairing%pstart or pstartL? \protected@write\@auxout{}% - {\string\l@dmake@labels\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstartL|{#1:start}}% + {\string\l@dmake@labels\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub||\the\c@pstartL|{#1:start}}% \ifdef{\hypertarget}% {\Hy@raisedlink{\hypertarget{#1:start}{}}}% {}% \protected@write\@auxout{}% - {\string\l@dmake@labels\space\l@dparsedendpage|\l@dparsedendline|\l@dparsedendsub|\the\c@pstartL|{#1:end}}% + {\string\l@dmake@labels\space\l@dparsedendpage|\l@dparsedendline|\l@dparsedendsub||\the\c@pstartL|{#1:end}}% \else% \protected@write\@auxout{}% - {\string\l@dmake@labels\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub|\the\c@pstart|{#1:start}}% + {\string\l@dmake@labels\space\l@dparsedstartpage|\l@dparsedstartline|\l@dparsedstartsub||\the\c@pstart|{#1:start}}% \ifdef{\hypertarget}% {\Hy@raisedlink{\hypertarget{#1:start}{}}}% {}% \protected@write\@auxout{}% - {\string\l@dmake@labels\space\l@dparsedendpage|\l@dparsedendline|\l@dparsedendsub|\the\c@pstart|{#1:end}}% + {\string\l@dmake@labels\space\l@dparsedendpage|\l@dparsedendline|\l@dparsedendsub||\the\c@pstart|{#1:end}}% \fi% \fi% % \end{macrocode} @@ -14662,12 +14735,19 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\xabslineref} +% If the specified label exists, \cs{xabslineref} gives its absolute line number. +% That is used usually only by some \reledmac\ internal macros. +% \begin{macrocode} +\newcommand*{\xabslineref}[1]{\l@dgetref@num{4}{#1}}% +% \end{macrocode} +% \end{macro} % \begin{macro}{\pstarteref} % \begin{macro}{\xpstartref} % If the specified label exists, \protect\cs{pstartref} gives its pstart number. % \begin{macrocode} -\newcommand*{\pstartref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{4}{#1}}} -\newcommand*{\xpstartref}[1]{\l@dgetref@num{4}{#1}} +\newcommand*{\pstartref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{5}{#1}}}% +\newcommand*{\xpstartref}[1]{\l@dgetref@num{5}{#1}}% % \end{macrocode} % \end{macro} @@ -14675,7 +14755,7 @@ % \begin{macro}{\xflagref} % \cs{xflagref} finds the side flag of any ref defined with \cs{edlabel}. % \begin{macrocode} -\newcommand*{\xflagref}[1]{\l@dgetref@num{5}{#1}} +\newcommand*{\xflagref}[1]{\l@dgetref@num{6}{#1}}% % \end{macrocode} % \end{macro} % The next three macros are used by the referencing commands above, @@ -14724,18 +14804,19 @@ % which extracts the appropriate number from its first arguments. % The \verb"|"-delimited arguments consist of the expanded label-macro % (three reference numbers), followed by the switch-number (1, -% 2, 3 or 4) which defines which of the earlier fiver numbers to +% 2, 3, 4 or 5) which defines which of the earlier six numbers to % pick out. (It was earlier given as the first argument of % \protect\cs{l@dgetref@num}.) % \begin{macrocode} \newcommand*{\l@dlabel@parse}{} -\def\l@dlabel@parse#1|#2|#3|#4|#5|#6{% - \ifcase #6% +\def\l@dlabel@parse#1|#2|#3|#4|#5|#6|#7{% + \ifcase #7% \or #1% \or #2% \or #3% \or #4% \or #5% + \or #6% \fi} % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx index db08d8e7864..5b678850de1 100644 --- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx +++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx @@ -296,9 +296,10 @@ % \changes{v2.15.0}{2016/12/12}{Fix bug about space before sectioning commands after a pairs environment (bug added in v.~2.14.4).} % \changes{v2.15.0}{2016/12/12}{Fix bug with page break when using \protect\cs{columns} (bug added in v.~2.14.1).} % \changes{v2.16.0}{2016/12/23}{Compatibility with \protect\cs{setmsdataposition}} -% \changes{v2.16.1}{2017/01/03}{Restore sidenotes on left side, deleted by mistake on v2.16.0} -% \changes{v2.16.2}{2017/01/25}{Change log message when numbered files don't still exist, in order to improve compatibility with \protect\emph{latexmk}.} +% \changes{v2.16.1}{2017/01/03}{Restore sidenotes on left side, deleted by mistake in v2.16.0} +% \changes{v2.16.2}{2017/01/25}{Change log message when numbered files still don't exist, in order to improve compatibility with \protect\emph{latexmk}.} % \changes{v2.16.3}{2017/02/10}{Fix bug when setting \protect\cs{aftercolumnseparator}.} +% \changes{v2.17.0}{2017/02/22}{Change code for compatibility with \protect\reledmac 2.18.0} % ^^A PW added following as the definitions are at some unknown elsewhere % % \newcommand{\egstart}{% @@ -1254,7 +1255,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledpar}[2017/02/10 v2.16.3 reledmac extension for parallel texts]% +\ProvidesPackage{reledpar}[2017/02/23 v2.17.0a reledmac extension for parallel texts]% % \end{macrocode} % \subsection{Package's requirement} @@ -4739,16 +4740,18 @@ % \changes{v2.6.0}{2015/11/13}{\protect\cs{@Rlineflag} is not stored directly after the line number, but as a fith argument of \protect\cs{the@labelX}. Can be retrieved by \protect\cs{xflagref}.} % % \begin{macrocode} -\def\l@dmake@labelsR#1|#2|#3|#4|#5{% - \expandafter\ifx\csname the@label\csuse{XR@prefix}#5\endcsname \relax\else - \led@warn@DuplicateLabel{\csuse{XR@prefix}#5}% - \fi - \expandafter\gdef\csname the@label\csuse{XR@prefix}#5\endcsname{#1|#2|#3|#4|\@Rlineflag}% - \global\providetoggle{label@#5@ledRcol}%False is the default value of this toggle, which tell us if a label is linked to a right or a left side - \global\toggletrue{label@#5@ledRcol}% +\def\l@dmake@labelsR#1|#2|#3|#4|#5|#6{% + \expandafter\ifx\csname the@label\csuse{XR@prefix}#6\endcsname% + \relax% + \else% + \led@warn@DuplicateLabel{\csuse{XR@prefix}#6}% + \fi% + \expandafter\gdef\csname the@label\csuse{XR@prefix}#6\endcsname{#1|#2|#3|#4|#5|\@Rlineflag}% + \global\providetoggle{label@#6@ledRcol}%False is the default value of this toggle, which tell us if a label is linked to a right or a left side + \global\toggletrue{label@#6@ledRcol}% \ignorespaces} \AtBeginDocument{% - \def\l@dmake@labelsR#1|#2|#3|#4|#5{}% + \def\l@dmake@labelsR#1|#2|#3|#4|#5|#6{}% } % \end{macrocode} |