summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-06-01 21:09:02 +0000
committerKarl Berry <karl@freefriends.org>2020-06-01 21:09:02 +0000
commitdca3307db3555753d51f0394abad0343b007e087 (patch)
tree59be5bb6d1ea8c01ebb13af111c7e1194892c950 /Master/texmf-dist/tex
parentdb8e86866f5ce0e485dc22e402eeaa54bd4da6d0 (diff)
reledmac (1jun20)
git-svn-id: svn://tug.org/texlive/trunk@55377 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty123
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledpar.sty27
2 files changed, 106 insertions, 44 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index 981bd7d23ba..898780c6ad0 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
@@ -35,7 +35,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2020/05/24 v2.32.8 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2020/05/31 v2.33.0 typesetting critical editions]%
\RequirePackage{xkeyval}
\newif\ifparledgroup
\newif\ifsameparallelpagenumber%
@@ -117,6 +117,10 @@
\DeclareOptionX{noresetlinenumannotation}{%
\noresetlinenumannotation@true%
}%
+\newif\ifantilabe@%
+\DeclareOptionX{antilabe}{%
+ \antilabe@true%
+}%
\ProcessOptionsX*\relax
\RequirePackage{xargs}
@@ -257,6 +261,9 @@
}
\newcommand*{\led@warn@NoMarginpars}{%
\reledmac@warning{You can't use \string\marginpar\space in numbered text}}
+\newcommand{\led@warn@BadHookSeries}[2]{%
+ \reledmac@warning{Bad series #1 for #2 hook. Skipped.}%
+}%
\newcommand*{\led@warn@BadSidenotemargin}{%
\reledmac@warning{Bad \string\sidenotemmargin\space argument}}
\newcommand*{\led@warn@NoIndexFile}[1]{%
@@ -378,7 +385,10 @@
\newif\ifXnote@%
\providebool{indtl@innote}%
\providebool{indtl@notenumber}%
-
+ \newif\ifinstanzaL%
+ \newif\ifinstanzaR%
+ \newif\ifinastanzaL%
+ \newif\ifinastanzaR%
\newcount\section@num
\section@num=0
\let\extensionchars=\empty
@@ -1968,6 +1978,7 @@
\@at@end@every@pend%
\endgraf\global\num@lines=\prevgraf\egroup%
\global\par@line=0%
+ \get@firsthalf@antilabe@wd%
\loop\ifvbox\raw@text%
\do@line%
\repeat%
@@ -3448,6 +3459,7 @@
}%
}%
\newcommand{\printlinefootnote}[2]{%
+ \xdef\@currentseries{#2}%
\iftoggle{nonum@}{%Try if the line number must printed for this specific not (by default, yes)
\hspace{\csuse{Xinplaceofnumber@#2}}%
}%
@@ -3517,7 +3529,6 @@
}%
}%
\newcommand{\printlinefootnotenumbers}[2]{%
- \xdef\@currentseries{#2}%
\ifboolexpr{%
(togl{Xpstart@#2} and bool{numberpstart})%
or togl{Xpstarteverytime@#2}}%
@@ -4095,6 +4106,7 @@
\xright@appenditem{%
\noexpand\led@set@index@fornote{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
+ \unexpanded{\gdef\@currentnotetype{familiar}}%
\unexpanded{\def\this@footnoteX@reading}{\the\csname footnote#1@reading\endcsname}%
\noexpand\vbfnoteX{#1}{#2}{\thisc@footnote}{#3}%
\noexpand\led@reinit@index@fornote%
@@ -4112,6 +4124,7 @@
\xright@appenditem{%
\noexpand\led@set@index@fornote{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
+ \unexpanded{\gdef\@currentnotetype{familiar}}%
\unexpanded{\def\this@footnoteX@reading}{\the\csname footnote#1@reading\endcsname}%
\noexpand\vbfnoteX{#1}{#2}{\thisc@footnote}{#3}%
\noexpand\led@reinit@index@fornote%
@@ -5245,6 +5258,7 @@
\csgdef{Xwidth@#1}{\hsize}%
\csgdef{Xwraplinenumannotation@#1}{\textsuperscript}%
\csgdef{Xlinenumannotationposition@#1}{after}%
+ \expandafter\csgdef{Xinnotemark@#1}##1{\ledinnotemark{##1}}%
\newtoggle{Xnoidenticallinenumannotation@#1}%
\expandafter\newinsert\csname #1footins\endcsname%
\unless\ifnoledgroup@%
@@ -5276,6 +5290,7 @@
{\unexpanded{\let\index\nindex}}%There is no note number... so
{}%
\noexpand\Xnote@true%
+ \unexpanded{\gdef\@currentnotetype{critical}}%
\noexpand\prepare@Xprenotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
\unexpanded{\def\sw@list@inedtext}{\expandafter\unexpanded\expandafter{\sw@inthisedtext}}%The value of the \sw@inthisedtext of current \edtext will be pushed to \sw@list@inedtext when the notes are expanded.
@@ -5313,6 +5328,7 @@
{\unexpanded{\let\index\nindex}}%There is no note number... so
{}%
\noexpand\Xnote@true%
+ \unexpanded{\gdef\@currentnotetype{critical}}%
\noexpand\prepare@Xprenotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
\unexpanded{\def\sw@list@inedtext}{\expandafter\unexpanded\expandafter{\sw@inthisedtext}}%The value of the \sw@inthisedtext of current edtext will be pushed to \sw@list@inedtext when the notes are expanded.
@@ -5372,6 +5388,7 @@
\csgdef{parafootsepX@#1}{}%
\csgdef{afternoteX@#1}{1em plus.4em minus.4em}
\csgdef{widthX@#1}{\hsize}%
+ \expandafter\csgdef{innotemarkX@#1}##1{\ledinnotemark{##1}}%
\csgdef{txtbeforenotesX@#1}{}%
\newtoggle{txtbeforesnotesX@#1@typeset}%Not directly used by user, but internal
\newtoggle{txtbeforenotesonlyonceX@#1}%
@@ -5600,13 +5617,17 @@
}%
\newcommandx{\settoggle@series}[5][4,5,usedefault]{%
\def\do##1{%
- \global\settoggle{#2@##1}{#3}%
+ \ifcsdef{etb@tgl@#2@##1}{%
+ \global\settoggle{#2@##1}{#3}%
+ }{%
+ \led@warn@BadHookSeries{##1}{#2}%
+ }%
\ifstrequal{#4}{critical}{
\csuse{Xarrangement@\csuse{series@display##1}}{##1}%
}{}
- \ifstrequal{#4}{familiar}{
+ \ifstrequal{#4}{familiar}{%
\csuse{arrangementX@\csuse{series@displayX##1}}{##1}%
- }{}
+ }{}%
}%
\ifstrempty{#1}{%
\dolistloop{\@series}%
@@ -5618,9 +5639,13 @@
\docsvlist{#1}%
}%
}
-\newcommandx{\setcommand@series}[5][4,5,usedefault]{%
+\newcommandx{\setcommand@series}[6][4,5,6=0,usedefault]{%
\def\do##1{
- \csgdef{#2@##1}{#3}
+ \ifcsdef{#2@##1}{%
+ \expandafter\global\expandafter\renewcommand\csname#2@##1\endcsname[#6]{#3}%
+ }{%
+ \led@warn@BadHookSeries{##1}{#2}%
+ }%
\ifstrequal{#4}{critical}{%
\csuse{Xarrangement@\csuse{series@display##1}}{##1}%
}{}
@@ -5638,9 +5663,9 @@
\docsvlist{#1}%
}%
}%
-\newcommandx{\newhookcommand@series}[2][2,usedefault]{%
+\newcommandx{\newhookcommand@series}[3][2,3=0,usedefault]{%
\global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
- \setcommand@series{##1}{#1}{##2}[][#2]%
+ \setcommand@series{##1}{#1}{##2}[][#2][#3]%
}%
\ifstrempty{#2}{}{%
\def\do##1{%
@@ -5735,6 +5760,8 @@
\newhookcommand@series{Xparafootsep}
\newhookcommand@series@reload{Xwidth}{critical}%
+ \newhookcommand@series{Xinnotemark}[][1]%
+
\ifundef{\Xhsize}%
{%
\newcommandx{\Xhsize}[2][1,usedefault]{%
@@ -5777,6 +5804,8 @@
\newhookcommand@series{txtbeforenotesX}%
\newhooktoggle@series{txtbeforenotesonlyonceX}%
\newhookcommand@series@reload{widthX}{familiar}%
+ \newhookcommand@series{innotemarkX}[][1]%
+
\ifundef{\hsizeX}%
{%
\newcommandx{\hsizeX}[2][1,usedefault]{%
@@ -7236,7 +7265,7 @@
(define-attributes ("ledinnote\thelabidx"))^^J
\space\space(markup-locref^^J
\eledmacmarkuplocrefdepth^^J
- :open "\string\ledinnote[\edindexlab\thelabidx]{\@index@command}{"^^J
+ :open "\string\ledinnote[\edindexlab\thelabidx]{\@index@command}{\@currentseries}{\@currentnotetype}{"^^J
:close "}"^^J
:attr "ledinnote\thelabidx"^^J
)
@@ -7246,7 +7275,7 @@
(define-attributes ("ledinnote\thelabidx"))^^J
\space\space(markup-locref^^J
\eledmacmarkuplocrefdepth^^J
- :open "\string\ledinnote{\@index@command}{"^^J
+ :open "\string\ledinnote{\@index@command}{\@currentseries}{\@currentnotetype}{"^^J
:close "}"^^J
:attr "ledinnote\thelabidx"^^J
)
@@ -7254,7 +7283,7 @@
\fi%
\else%
\gdef\@ledinnote@command{%
- ledinnote[\edindexlab\thelabidx]{\@index@command}%
+ ledinnote[\edindexlab\thelabidx]{\@index@command}{\@currentseries}{\@currentnotetype}%
}%
\fi%
}
@@ -7273,20 +7302,24 @@
\xdef\@index@parenthesis{)}%
}{}%
}
-\newcommandx{\ledinnote}[3][1,usedefault]{%
+\newcommandx{\ledinnote}[5][1,usedefault]{%
+ \IfStrEq{#4}{critical}{%
+ \def\tmp{Xinnotemark}%
+ }{%
+ \def\tmp{innotemarkX}%
+ }%
\ifboolexpr{%
test{\ifdefequal{\iftrue}{\ifHy@hyperindex}}%
or%
bool {xindyhyperref@}%
}%
{%
- \csuse{#2}{\hyperlink{#1}{\ledinnotemark{#3}}}%
+ \csuse{#2}{\hyperlink{#1}{\csuse{\tmp @#3}{#5}}}%
}%
{%
- \csuse{#2}{\ledinnotemark{#3}}%
+ \csuse{#2}{\csuse{\tmp @#3}{#5}}%
}%
}%
-\newcommand{\ledinnotehyperpage}[2]{\csuse{#1}{\ledinnotemark{\hyperpage{#2}}}}%
\newcommand{\ledinnotemark}[1]{#1\emph{n}}%
\newcommandx{\@wredindex}[2][1=\expandonce\jobname,usedefault]{%#1 = the index name, #2 = the text
\begingroup%
@@ -7615,6 +7648,8 @@
\newcommand*{\setstanzaindents}[1]{\setstanzavalues{sza}{#1}}
\newcommand*{\setstanzapenalties}[1]{\setstanzavalues{szp}{#1}}
\newcounter{stanzaindentsrepetition}
+\newcounter{startstanzaindentsrepetition}%
+\setcounter{startstanzaindentsrepetition}{1}%
\newcount\stanza@modulo
\newcommand*{\managestanza@modulo}[0]{%
@@ -7683,23 +7718,35 @@
}
\newcommandx{\stanza@line}[2][1,2,usedefault]{%
- \ifnum\value{stanzaindentsrepetition}=0
+ \stanza@indent%
+ \pstart[#1][#2]\stanza@hang\ignorespaces%
+}%
+\newcommand{\stanza@indent}{%
+ \ifboolexpr{%
+ test {\ifnumequal{\value{stanzaindentsrepetition}}{0}}%
+ or%
+ test {\ifnumless{\number\stanza@count}{\value{startstanzaindentsrepetition}}}%
+ }{%
\ifcsdef{sza@\number\stanza@count @}%
{%
\parindent=\csname sza@\number\stanza@count @\endcsname\stanzaindentbase%
}{%
\led@err@StanzaIndentNotDefined%
}%
- \else
+ }{%
\ifcsdef{sza@\number\stanza@modulo @}{%
- \parindent=\csname sza@\number\stanza@modulo @\endcsname\stanzaindentbase%
+ \count0=\numexpr%
+ \stanza@modulo%
+ - 1%
+ + \value{startstanzaindentsrepetition}%
+ \relax%
+ \parindent=\csname sza@\number\count0 @\endcsname\stanzaindentbase%
\managestanza@modulo%
}%
{%
\led@err@StanzaIndentNotDefined%
}%
- \fi
- \pstart[#1][#2]\stanza@hang\ignorespaces%
+ }%
}%
\xdef\stanza@hang{\noexpand\leavevmode\noexpand\startlock
\hangindent\expandafter
@@ -7807,6 +7854,38 @@
\catcode`\@=\body
\setstanzavalues{szp}{0}
+\ifantilabe@%
+ \newdimen\firsthalf@antilabe@wd%
+ \newcommand\get@firsthalf@antilabe@wd{%
+ \ifboolexpr{bool {instanza} or bool {inastanzaL} or bool {inastanzaR}}{%
+ \vbadness=10000%
+ \splittopskip=\z@%
+ \ifl@dpairing%
+ \ifledRcol%
+ \setbox0=\copy\csname l@dRcolrawbox\the\l@dnumpstartsR\endcsname%
+ \else%
+ \setbox0=\copy\csname l@dLcolrawbox\the\l@dnumpstartsL\endcsname%
+ \fi%
+ \else%
+ \setbox0=\copy\raw@text%
+ \fi%
+ \dimen0=\dimexpr\ht0+\dp0-\baselineskip\relax%
+ \ifdim\dimen0>0pt%
+ \setbox1=\vsplit0 to \dimen0%
+ \fi%
+ \setbox0=\vbox{\unvbox0\global\setbox1=\lastbox}%
+ \setbox1=\hbox{\noindent\unhbox1}%
+ \global\firsthalf@antilabe@wd=\wd1%
+ }{}%
+ }%
+ \def\beforeantilabe{}%
+ \def\afterantilabe{}%
+ \newcommand{\antilabe}[1]{%
+ \beforeantilabe\hbox to\firsthalf@antilabe@wd{#1}\afterantilabe%
+ }%
+\else%
+ \let\get@firsthalf@antilabe@wd\relax%
+\fi%
\def\msdata@c{}%
\def\msdata@cR{}%
\newcommand{\msdata}[1]{%
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
index a678fd22a7d..586af075dbd 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
@@ -28,7 +28,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2020/04/19 v2.23.1 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2020/05/31 v2.24.0 reledmac extension for parallel texts]%
\RequirePackage{xspace}%
\RequirePackage{xkeyval}
@@ -85,7 +85,7 @@
\newcommand{\led@err@polyglossiaTooOld}{%
\reledpar@error{You use the polyglosia package.%
\MessageBreak However, reledpar requires version 2020/04/08 v1.49 or later of the polyglossia package.%
- \MessageBreak Please update your reledpar version}{\@ehc}%
+ \MessageBreak Please update your polyglossia version}{\@ehc}%
}%
\newcommand*{\led@err@BadLeftRightPstarts}[2]{%
\reledpar@error{The numbers of left (#1) and right (#2)
@@ -909,10 +909,6 @@
\global\Rcolwidth@pages=\Rcolwidth%
}
- \newif\ifinstanzaL
- \newif\ifinstanzaR
- \newif\ifinastanzaL%
- \newif\ifinastanzaR%
\newenvironment{Leftside}{%
\expandafter\ifvoid\csname l@dLcolrawbox1\endcsname\else%
\led@err@Leftside@PreviousNotPrinted%
@@ -1144,6 +1140,7 @@
\@at@end@every@pend%
\endgraf\global\num@lines=\prevgraf\egroup%
\global\par@line=0%
+ \get@firsthalf@antilabe@wd%
\endgroup%
\ignorespaces%
\@oldnobreak%
@@ -1190,6 +1187,7 @@
\@at@end@every@pend%
\endgraf\global\num@linesR=\prevgraf\egroup%
\global\par@lineR=0%
+ \get@firsthalf@antilabe@wd%
\endgroup%
\ignorespaces%
\@oldnobreak%
@@ -2189,22 +2187,7 @@
{\before@every@stop@stanza\pend[#1][#2]}%
}%
\newcommand*{\@astanza@line}{%
- \ifnum\value{stanzaindentsrepetition}=0
- \ifcsdef{sza@\number\stanza@count @}%
- {%
- \parindent=\csname sza@\number\stanza@count @\endcsname\stanzaindentbase%
- }{%
- \led@err@StanzaIndentNotDefined%
- }%
- \else
- \ifcsdef{sza@\number\stanza@modulo @}{%
- \parindent=\csname sza@\number\stanza@modulo @\endcsname\stanzaindentbase%
- \managestanza@modulo%
- }%
- {%
- \led@err@StanzaIndentNotDefined%
- }%
- \fi
+ \stanza@indent%
\endgraf
\stanza@hang%
\ignorespaces}