diff options
author | Karl Berry <karl@freefriends.org> | 2016-07-22 22:32:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-07-22 22:32:04 +0000 |
commit | 75ca10ec49608a0519fbd68b855294f03e7237fa (patch) | |
tree | 034dec53046c8db80b8e88035e71c26d2b7a6780 /Master/texmf-dist/tex | |
parent | 8acf4b59bf01d80c547c7116f1517fbbf5c3f2c9 (diff) |
reledmac (22jul16)
git-svn-id: svn://tug.org/texlive/trunk@41751 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/reledmac/reledmac.sty | 246 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/reledmac/reledpar.sty | 12 |
2 files changed, 211 insertions, 47 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty index f49a4182d45..bd29b232378 100644 --- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty +++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty @@ -31,11 +31,10 @@ - %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2016/07/14 v2.14.1a typeset critical editions]% +\ProvidesPackage{reledmac}[2016/07/22 v2.15.0 typeset critical editions]% \RequirePackage{xkeyval} \newif\ifparledgroup \DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}} @@ -1758,7 +1757,9 @@ \global\@firstlineofpagefalse% \fi% \insert@msdata% - \add@inserts\affixside@note% + \add@inserts% + \add@Xgroupbyline% + \affixside@note% \l@dlsn@te {\ledllfill\hb@xt@ \wd\one@line{\new@line% \ifluatex% @@ -1777,7 +1778,9 @@ \global\@firstlineofpagefalse% \fi% \insert@msdata% - \add@inserts\affixside@note% + \add@inserts% + \add@Xgroupbyline% + \affixside@note% \numdef{\temp@}{\l@dnumpstartsL-1}% \xifinlist{\temp@}{\eled@sections@@}{\@nobreaktrue}{\@nobreakfalse}% \@eled@sectioningtrue% @@ -2086,6 +2089,47 @@ \fi \add@inserts@next} +\newcommand{\add@Xgroupbyline}{% + \unless\ifnocritical@% + \def\do##1{%Looping on the series + \def\do####1{%Looping on the ##1@forinserting command + \ifcsdef{##1@forinserting@####1}{% + \X@beforeinsertion{##1}% + \if@ledgroup% + \global\setbox\@nameuse{mp##1footins}=\vbox% + \else% + \insert\csname ##1footins\endcsname% + \fi% + {% + \ifcsdef{Xhsize\csuse{series@display##1}@##1}% + {\hsize \csuse{Xhsize\csuse{series@display##1}@##1}}% + {}% + \if@ledgroup% + \unvbox\@nameuse{mp##1footins}% + \fi% + \X@atbegininsertion{##1}% + \ifcsstring{series@display##1}% + {% + \Xledsetnormalparstuff{##1}% + \rule\z@\splittopskip% + }% + {}% + \csuse{##1@forinserting@####1}% + \strut\par% + }% + \global\csundef{##1@forinserting@####1}% + }% + {}% + }% + \ifcsdef{##1@forinserting}{% + \dolistcsloop{##1@forinserting}% + }{}% + \global\csundef{##1@forinserting}% + }% + \dolistloop{\@series}% + \fi% +}% + \newcommand*{\add@penalties}{\@l@dtempcnta=\ballast@count \ifnum\num@lines>\@ne \global\advance\par@line \@ne @@ -2248,40 +2292,68 @@ } \notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnote}[2]{% - \insert@Xtxtbeforenotes{#1}% - \csuse{Xbeforeinserting@#1}% - \insert\csname #1footins\endcsname\bgroup - \hsize=\expandafter\dimexpr\csuse{Xwidth@#1}\relax% - \noindent\csuse{Xbhooknote@#1}% + \iftoggle{Xgroupbyline@#1}{%In the case we use \Xgroupbyline, the insertion is done later, in \add@Xgroupbyline. + \prepare@Xgroupbyline{#1}{#2}{\normalvfootnote@inserted}% + }{%In the case we don't use \Xgroupbyline, the insertion is made directly + \X@beforeinsertion{#1}% + \insert\csname #1footins\endcsname{% + \X@atbegininsertion{#1}% + \normalvfootnote@inserted{#1}{#2}% + }% + }% +}% +\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnote@inserted}[2]{% + \nottoggle{Xgroupbyline@#1}{\noindent}{}\csuse{Xbhooknote@#1}% \csuse{Xnotefontsize@#1}% \footsplitskips \ifl@dpairing\ifl@dpaging\else% \setXnoteswidthliketwocolumns@{#1}% \fi\fi% \setXnotespositionliketwocolumns@{#1}% - \spaceskip=\z@skip \xspaceskip=\z@skip - \csname #1footfmt\endcsname #2{#1}\egroup} -\notbool{parapparatus@}{\newcommand*}{\newcommand}{\mpnormalvfootnote}[2]{% - \global\setbox\@nameuse{mp#1footins}\vbox{% + \spaceskip=\z@skip \xspaceskip=\z@skip% + \csname #1footfmt\endcsname #2{#1}% +}% +\newcommand{\X@beforeinsertion}[1]{% + \if@ledgroup\else% \insert@Xtxtbeforenotes{#1}% - \unvbox\@nameuse{mp#1footins} + \fi% + \csuse{Xbeforeinserting@#1}% +}% +\newcommand{\X@atbegininsertion}[1]{% + \hsize=\expandafter\dimexpr\csuse{Xwidth@#1}\relax% +}% +\notbool{parapparatus@}{\newcommand*}{\newcommand}{\mpnormalvfootnote}[2]{% + \iftoggle{Xgroupbyline@#1}{% + \prepare@Xgroupbyline{#1}{#2}{\mpnormalvfootnote@inserted}% + }% + {% + \global\setbox\@nameuse{mp#1footins}% + \vbox{% + \unvbox\@nameuse{mp#1footins}% + \mpnormalvfootnote@inserted{#1}{#2}% + }% + }% +}% + +\newcommand{\mpnormalvfootnote@inserted}[2]{% \noindent\csuse{Xbhooknote@#1}% \csuse{Xnotefontsize@#1}% - \hsize\columnwidth - \@parboxrestore - \color@begingroup - \csname #1footfmt\endcsname #2{#1}\color@endgroup}} - + \hsize\columnwidth% + \@parboxrestore% + \color@begingroup% + \csname #1footfmt\endcsname #2{#1}\color@endgroup% +}% \notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalfootfmt}[4]{% - \Xledsetnormalparstuff{#4}% + \nottoggle{Xgroupbyline@#4}{\Xledsetnormalparstuff{#4}}{}% \hangindent=\csuse{Xhangindent@#4}% \everypar{\hangindent=\csuse{Xhangindent@#4}}% - \rule\z@\splittopskip% + \nottoggle{Xgroupbyline@#4}{\rule\z@\splittopskip}{}% {\printlinefootnote{#1}{#4}}% \print@lemma{#1}{#2}{#4}% \csuse{Xwrapcontent@#4}{#3}% - \strut\par} + \nottoggle{Xgroupbyline@#4}{\strut\par}{}% +}% \newcommand*{\normalfootstart}[1]{% \ifdimequal{0pt}{\Xprenotes@}{}% {% @@ -2425,7 +2497,7 @@ \unskip % remove \rightskip, \unskip % remove \parfillskip, \unpenalty % remove \penalty of 10000, - \hskip\csuse{Xafternote@#2}\relax}% but add the glue to go between the notes + \hskip\csuse{Xafternote@#2}\relax}% add the glue to go between the notes \newcommand*{\parafootfmt}[4]{% \Xinsertparafootsep{#4}% @@ -2564,16 +2636,28 @@ \multiply\dimen\csname mp#1footins\endcsname \thr@@} \notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolvfootnote}[2]{% - \csuse{Xbeforeinserting@#1}% - \insert\csname #1footins\endcsname\bgroup% + \iftoggle{Xgroupbyline@#1}{% + \prepare@Xgroupbyline{#1}{#2}{\threecolvfootnote@inserted}% + }% + {% + \X@beforeinsertion{#1}% + \insert\csname #1footins\endcsname{% + \threecolvfootnote@inserted{#1}{#2}% + }% + }% +}% +\notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolvfootnote@inserted}[2]{% \hsize=\expandafter\dimexpr\csuse{Xwidth@#1}\relax% \noindent\csuse{Xbhooknote@#1}% \csuse{Xnotefontsize@#1}% \footsplitskips% - \csname #1footfmt\endcsname #2{#1}\egroup} + \csname #1footfmt\endcsname #2{#1}% +}% \notbool{parapparatus@}{\newcommand*}{\newcommand}{\threecolfootfmt}[4]{% \normal@pars% - \hsize \csuse{Xhsizethreecol@#4}% + \nottoggle{Xgroupbyline@#4}% + {\hsize \csuse{Xhsizethreecol@#4}}% + {}% \nottoggle{Xparindent@#4}{\parindent=\z@}{}% \tolerance=5000% \hangindent=\csuse{Xhangindent@#4}% @@ -2581,13 +2665,15 @@ \@tempdima=\parindent% \csuse{Xcolalign@#4}% \parindent=\@tempdima% - \strut{% + \strut% \hspace{\parindent}% \printlinefootnote{#1}{#4}% - }% \print@lemma{#1}{#2}{#4}% \csuse{Xwrapcontent@#4}{#3}% - \strut\par\allowbreak} + \nottoggle{Xgroupbyline@#4}% + {\strut\par\allowbreak}% + {}% +}% \newcommand*{\threecolfootgroup}[1]{% \csuse{Xbhookgroup@#1}\par% \splittopskip=\ht\strutbox @@ -2641,12 +2727,17 @@ \multiply\dimen\csname #1footins\endcsname \tw@} \notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolvfootnote}[2]{% \csuse{Xbeforeinserting@#1}% - \insert\csname #1footins\endcsname\bgroup% + \insert\csname #1footins\endcsname{% + \twocolvfootnote@inserted{#1}{#2}% + }% +}% +\notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolvfootnote@inserted}[2]{% \hsize=\expandafter\dimexpr\csuse{Xwidth@#1}\relax% \noindent\csuse{Xbhooknote@#1}% \csuse{Xnotefontsize@#1}% \footsplitskips% - \csname #1footfmt\endcsname #2{#1}\egroup} + \csname #1footfmt\endcsname #2{#1}% +}% \notbool{parapparatus@}{\newcommand*}{\newcommand}{\twocolfootfmt}[4]{% 4th arg is optional, for backward compatibility \normal@pars% \hsize \csuse{Xhsizetwocol@#4}% @@ -2654,16 +2745,18 @@ \tolerance=5000% \hangindent=\csuse{Xhangindent@#4}% \everypar{\hangindent=\csuse{Xhangindent@#4}}% - \@tempdima=\parindent% + \@tempdima=\parindent% \csuse{Xcolalign@#4}% - \parindent=\@tempdima% - \strut{% - \hspace{\parindent}% - \printlinefootnote{#1}{#4}% - }% - \print@lemma{#1}{#2}{#4}% - \csuse{Xwrapcontent@#4}{#3}% - \strut\par\allowbreak} + \parindent=\@tempdima% + \strut% + \hspace{\parindent}% + \printlinefootnote{#1}{#4}% + \print@lemma{#1}{#2}{#4}% + \csuse{Xwrapcontent@#4}{#3}% + \nottoggle{Xgroupbyline@#4}% + {\strut\par\allowbreak}% + {}% +}% \newcommand*{\twocolfootgroup}[1]{% \csuse{Xbhookgroup@#1}\par% \splittopskip=\ht\strutbox @@ -2858,6 +2951,7 @@ \newif\ifl@d@dash \newif\ifl@d@Xtwolines% \newif\ifl@d@Xmorethantwolines% +\newcommand*{\l@dparsefootspec}[3]{\l@dp@rsefootspec#1|} \def\l@dp@rsefootspec#1|#2|#3|#4|#5|#6|#7|{% \gdef\l@dparsedstartpage{#1}% \gdef\l@dparsedstartline{#2}% @@ -3016,6 +3110,53 @@ \egroup% \endgroup% }% +\newcommand{\prepare@Xgroupbyline}[3]{% + \iftoggle{Xgroupbylineseparetwolines@#1}{% + \l@dparsefootspec#2% + \ifcsdef{#1@forinserting@\l@dparsedendpage-\l@dparsedendline-\l@dparsedendsub}% + {% + \csgappto% + {#1@forinserting@\l@dparsedendpage-\l@dparsedendline-\l@dparsedendsub}% + {% + \ifcsempty{Xsymlinenum@#1}% + {\csuse{Xparafootsep@#1}}% + {}% + #3{#1}{#2}% + \hskip\csuse{Xafternote@#1}\relax% + }% + }% + {% + \csdef% + {#1@forinserting@\l@dparsedendpage-\l@dparsedendline-\l@dparsedendsub}% + {% + #3{#1}{#2}% + \hskip\csuse{Xafternote@#1}\relax% + }% + }% + \listcsxadd{#1@forinserting}{\l@dparsedendpage-\l@dparsedendline-\l@dparsedendsub}% + }{% + \ifcsdef{#1@forinserting@all}{% + \csgappto% + {#1@forinserting@all}% + {% + \ifcsempty{Xsymlinenum@#1}% + {\csuse{Xparafootsep@#1}}% + {}% + #3{#1}{#2}% + \hskip\csuse{Xafternote@#1}\relax% + }% + }% + {% + \csdef% + {#1@forinserting@all}% + {% + #3{#1}{#2}% + \hskip\csuse{Xafternote@#1}\relax% + }% + }% + \listcsgadd{#1@forinserting}{all}% + }% +}% \providecommand*{\multiplefootnotemarker}{3sp} \providecommand*{\multfootsep}{\textsuperscript{\normalfont,}} @@ -3983,7 +4124,7 @@ \newcommandx{\toendnotes}[2][1,usedefault]{% \ifboolexpr{bool{numbering} or bool{numberingR}}{% \def\do##1{% - \reledmac@warning{toto}\expandafter\immediate\expandafter\write\csname l@d@##1end\endcsname% + \expandafter\immediate\expandafter\write\csname l@d@##1end\endcsname% {\unexpanded{#2}\@percentchar}% }% \ifstrempty{#1}% @@ -3994,7 +4135,7 @@ \WithSuffix\newcommandx\toendnotes*[2][1,usedefault]{% \ifboolexpr{bool{numbering} or bool{numberingR}}{% \def\do##1{% - \reledmac@warning{toto}\expandafter\immediate\expandafter\write\csname l@d@##1end\endcsname% + \expandafter\immediate\expandafter\write\csname l@d@##1end\endcsname% {#2\@percentchar}% }% \ifstrempty{#1}% @@ -4185,6 +4326,8 @@ \csgdef{Xboxsymlinenum@#1}{0pt}% \newtoggle{Xnumberonlyfirstinline@#1}% + \newtoggle{Xgroupbyline@#1}% + \newtoggle{Xgroupbylineseparetwolines@#1}% \newtoggle{Xnumberonlyfirstintwolines@#1}% \csgdef{Xtwolines@#1}{}% \csgdef{Xmorethantwolines@#1}{}% @@ -4630,6 +4773,8 @@ \newhookcommand@series@reload{Xafterrule}{critical} \newhooktoggle@series{Xnumberonlyfirstinline} \newhooktoggle@series{Xnumberonlyfirstintwolines} + \newhooktoggle@series{Xgroupbyline}% + \newhooktoggle@series{Xgroupbylineseparetwolines}% \newhooktoggle@series{Xnonumber} \newhooktoggle@series{Xpstart} \newhooktoggle@series{Xpstarteverytime}% @@ -5662,7 +5807,9 @@ }% \newcommand*{\l@dedbeginmini}{% \unless\ifnocritical@% - \def\do##1{\csletcs{v##1footnote}{mpv##1footnote}}% + \def\do##1{% + \csletcs{v##1footnote}{mpv##1footnote}% + }% \dolistloop{\@series}% \fi% } @@ -5684,6 +5831,17 @@ \dimgdef{\parledgroup@beforenotesL}{\parledgroup@beforenotesL+\skip\@nameuse{mp##1footins}}% \fi% \fi\fi% + \ifcsstring{series@display##1}{paragraph}{}{% + \setbox\@nameuse{mp##1footins}=\vbox{% + \csuse{Xnotefontsize@##1}% + \ifcsdef{Xhsize\csuse{series@display##1}@##1}{% + \hsize\csuse{Xhsize\csuse{series@display##1}@##1}% + }{}% + \noindent\csuse{Xtxtbeforenotes@##1}% + \unvbox\@nameuse{mp##1footins}% + \@parboxrestore% + }% + }% \csuse{mp##1footgroup}{##1}% \fi}% \dolistloop{\@series}% diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty index 2776d151060..20cc516de57 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}[2016/07/01 v2.12.0 reledmac extension for parallel texts]% +\ProvidesPackage{reledpar}[2016/07/22 v2.13.0 reledmac extension for parallel texts]% \RequirePackage{xspace}% \RequirePackage{xkeyval} @@ -1032,6 +1032,7 @@ \fi% \insert@msdata% \add@inserts% + \add@Xgroupbyline% \affixside@note% }% {\print@lineL}% @@ -1065,7 +1066,9 @@ \global\@firstlineofpagefalse% \fi% \insert@msdata% - \add@inserts\affixside@note% + \add@inserts% + \add@Xgroupbyline% + \affixside@note% \l@dlsn@te% \hb@xt@ \Lcolwidth{\ledllfill\hb@xt@ \wd\one@line{% \do@insidelineLhook% @@ -1155,6 +1158,7 @@ \fi% \insert@msdata% \add@insertsR% + \add@Xgroupbyline% \affixside@noteR% }% {\print@lineR}% @@ -1191,7 +1195,9 @@ \global\@firstlineofpageRfalse% \fi% \insert@msdata% - \add@insertsR\affixside@noteR% + \add@insertsR% + \add@Xgroupbyline% + \affixside@noteR% \l@dlsn@te% \hb@xt@ \Rcolwidth{\ledllfill\hb@xt@ \wd\one@lineR{% \do@insidelineRhook% |