summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/reledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-09-14 20:56:03 +0000
committerKarl Berry <karl@freefriends.org>2018-09-14 20:56:03 +0000
commitccd1b1b3d130d56c728e4f9e8a411a7d5c6c202c (patch)
treeccda02f266f3c222900f120ea30ff3763ca07a54 /Master/texmf-dist/source/latex/reledmac
parentadcb6d9ce890e651a9643950e377f045d7803e26 (diff)
reledmac (14sep18)
git-svn-id: svn://tug.org/texlive/trunk@48666 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx70
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledpar.dtx10
2 files changed, 68 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index c831474cc9c..ba5f27a5f23 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -514,6 +514,7 @@
% \changes{v2.26.10}{2018/05/05}{Add error message when insertion a \protect\cs{pstart} or \protect\cs{pend} inside \protect\cs{edtext} arguments}
% \changes{v2.26.11}{2018/05/21}{Allow to use \protect\cs{edtext} inside \protect\cs{sameword}}
% \changes{v2.26.12}{2018/07/19}{Precise minimal version of xparse package required.}
+% \changes{v2.27.0}{2018/09/13}{Add \protect\cs{doinsidethislinehook}.}
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
%
@@ -748,7 +749,7 @@
% \url{https://www.zotero.org/groups/209265/critical_editions_typeset_with_edmac_ledmac_eledmac_and_reledmac/}.
% Please add your own edition made with (r)(e)ledmac.
%
-% If you write book or article about (r)(e)ledmac, please add it on the collaborative bibliography on \url{https://www.zotero.org/groups/1024519/}.
+% If you write a book or an article about (r)(e)ledmac, please add it on the collaborative bibliography on \url{https://www.zotero.org/groups/1024519/}.
% \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
@@ -1250,6 +1251,29 @@
% The file \href{examples/2-line_numbers_in_header.tex}{examples/2-line\_numbers\_in\_header.tex} provides
% an example for printing the first and last line numbers of a page in the header.
%
+% \section{Execution code at a specific line}
+% Sometime, you want to execute a code at a precise point in the flow of your text.
+% For example, if the current header of the page corresponds to the position inside the text, you may want to use \cs{markboth} (or similar) command.
+% The main problem is that you need to execute \cs{markboth} when \macpackage\ typesets the text, and not when it reads it, because that could create damage with vertical spacing.
+%
+% \DescribeMacro{\doinsidethislinehook}
+% The \cs{doinsidethislinehook}\marg{code} macro allows \meta{code} to be executed when the text is typeset. The \meta{code} will be executed in the line equivalent to the position of \cs{doinsidethislinehook} in the flow of the text.
+%
+% For example, with the following code:
+% \begin{verbatim}
+% \beginnumbering
+% \pstart
+% …
+% 1.\doinsidelinehook{\markboth{1}{1}} a
+% \pend
+% \end{verbatim}
+% \verb+\markboth{1}{1}+ will be executed at the line the \verb+1.+ will be typeset.
+% The \meta{code} of \cs{doinsidethislinehook} will be executed only at the second run of \LaTeX.
+%
+% See the file
+% \href{examples/2-subdivision-number-in-header.tex}{examples/2-subdivision-number-in-header.tex} for an example.
+% Especially, the use of this command with \LaTeX\ counters is quite complex, but the example show you how to deal with this problem.
+%
% \section{Apparatus commands}
%
% \subsection{Terminology}
@@ -1356,9 +1380,9 @@
% \DescribeMacro{\Cfootnote}
% \DescribeMacro{\Dfootnote}
% \DescribeMacro{\Efootnote}
-% Five separate series of the footnotes are maintained; each macro
+% Five separate series of footnotes are maintained; each macro
% takes one argument like \protect\cs{Afootnote}\marg{text}.
-% When all of the six
+% When all of the five
% are used, the \texttt{A} notes appear in a layer just below the main
% text, followed by the rest in turn, down to the \texttt{E} notes at
% the bottom.
@@ -1373,8 +1397,8 @@
% \label{fulllines}The available options are:
% \begin{itemize}
% \item \verb|fulllines| to disable \protect\cs{Xtwolines} and \protect\cs{Xmorethantwolines} features for this note (cf. \reff{Xtwolines}).
-% \item \verb|nonum| disables line numbering for this note. A horizontal blank space is added instead. You can use \cs{Xinplaceoflemmaseparator} to set it (\reff{Xinplaceoflemmaseparator}).
-% \item \verb|nosep| to disable the lemma separator for this note.
+% \item \verb|nonum| disables line numbering for this note. A horizontal blank space is added instead. You can use \cs{Xinplaceofnunber} to set it (\reff{Xinplaceofnumber}).
+% \item \verb|nosep| to disable the lemma separator for this note. A horizontal blank space is added instead. You can use \cs{Xinplaceoflemmaseparator} to set it (\reff{Xinplaceoflemmaseparator}).
% \item \verb|linerangesep=|\meta{c} to change to \meta{c} the separator between start line and end line for this particular note.
% \end{itemize}
%
@@ -2274,7 +2298,7 @@
% \cs{Xendbeforesymlinenum} and \cs{Xendaftersymlinenum} are the equivalents of \cs{Xbeforesymlinenum} and \cs{Xaftersymlinenum} for the endnotes.
%
% \subsubsection{Space in place of number}
-% \DescribeMacro{\Xinplaceofnumber}
+% \DescribeMacro{\Xinplaceofnumber}\label{Xinplaceofnumber}
% If no number or symbolic line number is printed, you can add a space, with \cs{Xinplaceofnumber}\oarg{s}\marg{l}. The default value is 1~em.
%
% \DescribeMacro{\Xendinplaceofnumber} \cs{Xendinplaceofnumber}\oarg{s}\marg{l} is the same, for critical endnotes.
@@ -2907,7 +2931,6 @@
% \item \DescribeMacro{\AtEveryStopStanza} Use \cs{AtEveryStopStanza} to automatically add content after the end of stanzas (not in the same paragraph).
%
% Note that a \cs{noindent} will be inserted before the argument, and, consequently, a \cs{parskip}. You can use the starred version of \protect\cs{AtEveryStopStanza} to avoid this \cs{noindent}.
-% \item \DescribeMacro{\AtStartEveryStanza} Use \cs{AtStartEveryStanza} to automatically add content at the end of stanza (in the same paragraph).
% \end{itemize}
%
%
@@ -4192,7 +4215,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2018/07/19 v2.26.12 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2018/09/13 v2.27.0 typesetting critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -8905,9 +8928,11 @@
% \begin{macrocode}
\hb@xt@ \linewidth{%
% \end{macrocode}
-% User hook.
+% User hooks.
% \begin{macrocode}
\do@insidelinehook%
+ \csuse{insidethis@\the\absline@num @\the\section@num}%
+ \global\csundef{insidethis@\the\absline@num @\the\section@num}%
% \end{macrocode}
% Left line number
% \begin{macrocode}
@@ -9045,6 +9070,33 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \begin{macro}{\doinsidethislinehook}
+% \begin{macro}{\@insidethisline}
+% The \cs{doinsidethislinehook} can be called directly in the main flood of a text.
+% It will define a hook executed at a specific line, determined by the position of the command in the flood of the text.
+% \begin{macrocode}
+\newcommand{\doinsidethislinehook}[1]{%
+ \leavevmode%In case it begins with a \pstart, ensure the \@insidethisline is written after \@nl
+ \ifledRcol%
+ \write\linenum@outR{\string\@insidethisline[\unexpanded{#1}]}%
+ \else%
+ \write\linenum@out{\string\@insidethisline[\unexpanded{#1}]}%
+ \fi%
+}%
+% \end{macrocode}
+% The auxiliary files command just store the information to be executed
+% when typesseting the specific line.
+% \begin{macrocode}
+\newcommand{\@insidethisline}[1]{%
+ \ifledRcol%
+ \csgappto{insidethisR@\the\absline@numR @\the\section@numR}{#1}%
+ \else%
+ \csgappto{insidethis@\the\absline@num @\the\section@num}{#1}%
+ \fi%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \subsubsection{Sidenotes and marginal line number initialization}
% \begin{macro}{\l@demptyd@ta}
% \begin{macro}{\l@dld@ta}
diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
index 18c80baaeae..51dc236a986 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
@@ -334,6 +334,7 @@
% \changes{v2.21.8}{2018/05/02}{Fix bug with marginal line number in parallel typesetting when alternating between \protect\cs{numberlinefalse} and \protect\cs{numberlinetrue}.}
% \changes{v2.21.8}{2018/05/02}{Workaround with a bug of \protect\LaTeX 2018/04/01 patch level 3 to generate the .sty file from a .ins file}
% \changes{v2.21.9}{2018/07/19}{Fix (little) bug when using \protect\package{calc} package.}
+% \changes{v2.22.0}{2018/09/13}{Compatibility with \protect\cs{doinsidethislinehook} macro.}
% ^^A PW added following as the definitions are at some unknown elsewhere
%
% \newcommand{\egstart}{%
@@ -649,8 +650,8 @@
%
% You must use \cs{endnumbering} in a right column in the following cases:
% \begin{itemize}
-% \item there is also a \cs{endnumbering} in the left column, because the line numbering ends with a two columns mode (for ex. at the end of a document);
-% \item there will be a \cs{endnumbering} in a text after the columns, in a single column mode, because the ligne numbering finish with single column mode text.
+% \item there is also a \cs{endnumbering} in the left column, because the line numbering ends with a two columns mode (e.g. at the end of a document);
+% \item there will be a \cs{endnumbering} in a text after the columns, in a single column mode, because the ligne numbering finishes with single column mode text.
% \end{itemize}
% Without this, you will
% get wrong numbering when a right column reappears next time.
@@ -1382,7 +1383,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2018/07/19 v2.21.9 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2018/09/13 v2.22.0 reledmac extension for parallel texts]%
% \end{macrocode}
% \subsection{Package's requirement}
@@ -4033,6 +4034,8 @@
\add@apparatusL%
\l@dlsn@te%
\do@insidelineLhook%
+ \csuse{insidethis@\the\absline@num @\the\section@num}%
+ \global\csundef{insidethis@\the\absline@num @\the\section@num}%
\hb@xt@ \Lcolwidth{\ledllfill\hb@xt@ \wd\one@line{%
\ifluatex%
\textdir\l@luatextextdir@L%
@@ -4226,6 +4229,7 @@
\add@apparatusR%
\l@dlsn@te%
\do@insidelineRhook%
+ \global\csundef{insidethisR@\the\absline@numR @\the\section@numR}%
\hb@xt@ \Rcolwidth{\ledllfill\hb@xt@ \wd\one@lineR{%
\new@lineR%
\inserthangingsymbolR%