summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-02-23 22:01:46 +0000
committerKarl Berry <karl@freefriends.org>2017-02-23 22:01:46 +0000
commit9790ad4111397b2458f5c485f4e4e72d4b555e31 (patch)
tree9453b986df7153735b63095f54827030e8073998 /Master/texmf-dist/tex/latex
parent0a85dca32cca799d77c78ea28f03e66694d336d1 (diff)
reledmac (22feb17)
git-svn-id: svn://tug.org/texlive/trunk@43319 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty150
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledpar.sty20
2 files changed, 106 insertions, 64 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index 0f15d28a7e2..3f0354187fb 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}[2017/02/12 v2.17.5 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2017/02/23 v2.18.0a typesetting critical editions]%
\RequirePackage{xkeyval}
\newif\ifparledgroup
\DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}}
@@ -1201,7 +1201,7 @@
\newwrite\linenum@out
\newif\iffirst@linenum@out@
\first@linenum@out@true
-\newcommand{\this@line@list@version}{5}%
+\newcommand{\this@line@list@version}{6}%
\newcommand*{\line@list@stuff}[1]{%
\read@linelist{#1}%
@@ -1281,6 +1281,33 @@
\write\linenum@out{]}%
\fi}%
+\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}%
+ }%
+}%
\newcommand*{\flag@start@later}{%
\ifledRcol%
\write\linenum@outR{\string\@ref@later[}%
@@ -1389,6 +1416,7 @@
\ifnumberedpar@%
\global\advance\@edtext@level by 1%
\stepcounter{edtext}%
+ \csxdef{thisedtext@\the\@edtext@level}{\theedtext}%
\global\@lemmacommand@false%
\begingroup%
\ifledRcol%
@@ -1409,10 +1437,11 @@
\@edtext@secondarg@true%
\ignorespaces #2\relax%
\@edtext@secondarg@false%
- \@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%
\if@lemmacommand@%
\ifledRcol%
\write\linenum@outR{\string\@lemma}%
@@ -1423,7 +1452,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}{}}%
@@ -1436,10 +1464,11 @@
\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%
\global\@noneed@Footnotefalse%
\global\advance\@edtext@level by -1%
\global\@lemmacommand@false%
@@ -2389,8 +2418,8 @@
\color@begingroup%
\csname #1footfmt\endcsname #2{#1}\color@endgroup%
}%
-
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalfootfmt}[4]{%
+ \Xstorelineinfo{#1}{#4}%
\nottoggle{Xgroupbyline@#4}{\Xledsetnormalparstuff{#4}}{}%
\hangindent=\csuse{Xhangindent@#4}%
\everypar{\hangindent=\csuse{Xhangindent@#4}}%
@@ -2546,6 +2575,7 @@
\hskip\csuse{Xafternote@#2}\relax}% add the glue to go between the notes
\newcommand*{\parafootfmt}[4]{%
+ \Xstorelineinfo{#1}{#4}%
\Xinsertparafootsep{#4}%
\ledsetnormalparstuff@common%
\printlinefootnote{#1}{#4}%
@@ -2609,22 +2639,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}}%
}%
{}%
@@ -2902,14 +2932,16 @@
}%
}%
}%
-\newcommand{\printlinefootnote}[2]{%
+\newcommand{\Xstorelineinfo}[2]{%
\l@dp@rsefootspec#1|%
\iftoggle{Xnumberonlyfirstintwolines@#2}{%
- \edef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub - \l@dparsedendline - \l@dparsedendsub}%
+ \xdef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub - \l@dparsedendline - \l@dparsedendsub}%
}%
{%
- \edef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub}%
+ \xdef\lineinfo@{\l@dparsedstartline - \l@dparsedstartsub}%
}%
+}%
+\newcommand{\printlinefootnote}[2]{%
\iftoggle{nonum@}{%Try if the line number must printed for this specific not (by default, yes)
\hspace{\csuse{Xinplaceofnumber@#2}}%
}%
@@ -4129,10 +4161,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@}%
@@ -5255,7 +5287,7 @@
}
\list@create{\labelref@list}
-\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
\newcommand*{\edlabel}[1]{%
\ifl@dpairing\ifautopar%
@@ -5265,7 +5297,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}{}}}%
{}%
@@ -5289,13 +5321,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}{}}}%
{}%
@@ -5329,41 +5361,47 @@
\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}%
\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}
\AtBeginDocument{%
- \def\l@dmake@labels#1|#2|#3|#4|#5{}%
+ \def\l@dmake@labels#1|#2|#3|#4|#5|#6{}%
}
\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}
\newcommand*{\applabel}[1]{%
@@ -5378,29 +5416,29 @@
\@bsphack%
\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%
\@esphack%
@@ -5449,10 +5487,11 @@
}%
\newcommand*{\xsublineref}[1]{\l@dgetref@num{3}{#1}}
-\newcommand*{\pstartref}[1]{\l@dref@undefined{#1}\wrap@edcrossref{#1}{\l@dgetref@num{4}{#1}}}
-\newcommand*{\xpstartref}[1]{\l@dgetref@num{4}{#1}}
+\newcommand*{\xabslineref}[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}}%
-\newcommand*{\xflagref}[1]{\l@dgetref@num{5}{#1}}
+\newcommand*{\xflagref}[1]{\l@dgetref@num{6}{#1}}%
\newcommand*{\l@dref@undefined}[1]{%
\expandafter\ifx\csname the@label#1\endcsname\relax
\led@warn@RefUndefined{#1}%
@@ -5468,13 +5507,14 @@
\fi}
\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}
\newcommand*{\xxref}[2]{%
{%
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
index 994c9338753..725d2385f60 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
@@ -29,7 +29,7 @@
\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]%
\RequirePackage{xspace}%
\RequirePackage{xkeyval}
@@ -1791,16 +1791,18 @@
}%
\list@create{\labelref@listR}
-\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{}%
}
\WithSuffix\newcommand\sidenotemargin*[1]{%