summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/reledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-19 21:58:25 +0000
committerKarl Berry <karl@freefriends.org>2018-01-19 21:58:25 +0000
commit36ec4fc27c45112231d3d8be99b25185b8936bfb (patch)
treeca57ae4407632919d86e9fd1972de4cf63d22531 /Master/texmf-dist/source/latex/reledmac
parent2b9d7a5ed4879107431c98e60c2709facd832efc (diff)
reledmac (19jan18)
git-svn-id: svn://tug.org/texlive/trunk@46387 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx43
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledpar.dtx34
2 files changed, 52 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index 7c169afce87..e5a26550096 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -499,6 +499,7 @@
% \changes{v2.26.2}{2017/12/22}{Fix bug with \protect\cs{Xgroupbyline} and \protect\cs{Xparafootsep}.}
% \changes{v2.26.2}{2017/11/22}{Fix bug with \protect\cs{linenumberannotation} in parallel typesetting}
% \changes{v2.26.3}{2018/01/06}{Fix bug added by v2.26.0 with notes in parallel typesetting}
+% \changes{v2.26.4}{2018/01/18}{Fix bug when using \protect\cs{numberpstarttrue} and alterning between manual \protect\cs{pstart} and automatic produced by \protect\cs{autopar}}
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
%
@@ -897,12 +898,10 @@
% \subsubsection{Automatically producing \protect\cs{pstart} \ldots{} \protect\cs{pend}}
% \DescribeMacro{\autopar}\label{autopar}
% You can use \protect\cs{autopar} to avoid the nuisance of this paragraph markup
-% and still have every paragraph automatically numbered. The scope of the
-% \protect\cs{autopar} command needs to be limited by keeping it within a group, as
-% follows:
+% and still have every paragraph automatically numbered. The
+% \protect\cs{autopar} command needs to be called inside a \cs{beginnumbering}\ldots\cs{endnumbering} structure, as follows:
% \egstart
% \begin{verbatim}
-% \begingroup
% \beginnumbering
% \autopar
%
@@ -912,7 +911,6 @@
% text.
%
% \endnumbering
-% \endgroup
% \end{verbatim}
% \egend
%
@@ -4179,7 +4177,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2018/01/06 v2.26.3 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2018/01/18 v2.26.4 typesetting critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -8458,21 +8456,27 @@
\global\@afterindenttrue%
\fi%
\fi%
- \ifautopar\else%
- \ifnumberpstart%
- \ifinstanza\else%
- \ifsidepstartnum\else%
- \thepstart%
+ \ifboolexpr{%
+ bool{autopar}%
+ and bool{by@autopar}%
+ }%
+ {}%
+ {%
+ \ifnumberpstart%
+ \ifinstanza\else%
+ \ifsidepstartnum\else%
+ \thepstart%
+ \fi%
\fi%
- \fi%
\fi%
- \fi%
+ }%
\numberedpar@true%
\iflabelpstart%
\protected@edef\@currentlabel{\p@pstart\thepstart}%
\fi%
\l@dzeropenalties%
\@at@start@every@pstart%
+ \global\by@autoparfalse%
\ignorespaces%because not automatically ignored if an optional argument is used (classical TeX behavior for space after commands)
}
% \end{macrocode}
@@ -8656,9 +8660,12 @@
% that has been added for this paragraph. Then we start again with
% \protect\cs{pstart}, restoring the indentation that we saved, and
% locally change \protect\cs{par} so that it will do our \protect\cs{pend} for us.
+%
+% The boolean \cs{ifautopar} is set to TRUE while \cs{autopar} is enabled, and the \cs{ifby@autopar} is set to TRUE at each \cs{pstart} automatically called by \cs{autopar} feature. A manually \cs{pstart} will have a \cs{ifby@autopar} set to false.
+%
% \begin{macrocode}
\newif\ifautopar
-\autoparfalse
+\newif\ifby@autopar%
\newcommand*{\autopar}{
\ifledRcol
\ifnumberingR \else
@@ -8674,7 +8681,13 @@
\autopartrue
\everypar{\setbox0=\lastbox
\endgraf \vskip-\parskip
- \pstart \noindent \kern\wd0 \ifnumberpstart\ifinstanza\else\thepstart\fi\fi
+ \global\by@autopartrue%
+ \pstart \noindent \kern\wd0%
+ \ifnumberpstart%
+ \ifinstanza\else%
+ \thepstart%
+ \fi%
+ \fi%
\let\par=\pend}%
\ignorespaces}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
index 0984d5eff88..6d764788fc0 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledpar.dtx
@@ -325,6 +325,7 @@
% \changes{v2.21.0}{2017/11/11}{Add compatibility with new features of \protect\reledmac 2.26.0}
% \changes{v2.21.1}{2017/11/22}{Fix bug with \protect\cs{linenumberannotation}}
% \changes{v2.21.2}{2018/01/08}{Fix bug with \protect\cs{Xpstart} and \protect\cs{edtextlater}}
+% \changes{v2.21.3}{2018/01/18}{Fix bug when using \protect\cs{numberpstarttrue} and alterning between manual \protect\cs{pstart} and automatic produced by \protect\cs{autopar}}
% ^^A PW added following as the definitions are at some unknown elsewhere
%
% \newcommand{\egstart}{%
@@ -1370,7 +1371,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2018/01/08 v2.21.2 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2018/01/18 v2.21.3 reledmac extension for parallel texts]%
% \end{macrocode}
% \subsection{Package's requirement}
@@ -3586,14 +3587,19 @@
% that you set when the group for the \protect\cs{vbox} ends.
% \begin{macrocode}
\l@dzeropenalties%
- \ifautopar\else%
+ \ifboolexpr{%
+ bool{autopar}%
+ and bool{by@autopar}%
+ }%
+ {}%
+ {%
\ifnumberpstart%
\ifsidepstartnum%
\else%
- \thepstartL%
- \fi%
- \fi%
+ \thepstartL%
\fi%
+ \fi%
+ }%m
\@at@start@every@pstart%
\hsize=\Lcolwidth%
\numberedpar@true%
@@ -3629,11 +3635,13 @@
}%
\at@every@pstart@call%
% \end{macrocode}
-% Gobble following space (automatically done if there is no optional argument)
+% Let \cs{by@autopar} to FALSE.
% \begin{macrocode}
- \ignorespaces%
+ \global\by@autoparfalse%
% \end{macrocode}
+% Gobble following space (automatically done if there is no optional argument)
% \begin{macrocode}
+ \ignorespaces%
}
% \end{macrocode}
% The same for right side.
@@ -3672,13 +3680,18 @@
\fi%
\global\setnamebox{l@dRcolrawbox\the\l@dnumpstartsR}=\vbox\bgroup%
\l@dzeropenalties%
- \ifautopar\else%
+ \ifboolexpr{%
+ bool{autopar}%
+ and bool{by@autopar}%
+ }%
+ {}%
+ {%
\ifnumberpstart%
\ifsidepstartnum\else%
\thepstartR%
- \fi%
\fi%
- \fi%
+ \fi%
+ }%
\@at@start@every@pstart%
\hsize=\Rcolwidth%
\numberedpar@true%
@@ -3710,6 +3723,7 @@
}%
}%
\at@every@pstart@call%
+ \global\by@autoparfalse%
\ignorespaces%
}
% \end{macrocode}