diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/reledmac/reledmac.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/reledmac/reledmac.sty | 180 |
1 files changed, 135 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty index d2d99743656..851465c5b0b 100644 --- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty +++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty @@ -27,10 +27,12 @@ + + %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2015/09/05 v2.1.3 typeset critical edition]% +\ProvidesPackage{reledmac}[2015/09/29 v2.2.0 typeset critical edition]% \RequirePackage{xkeyval} \newif\ifparledgroup \DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}} @@ -1025,7 +1027,7 @@ \newwrite\linenum@out \newif\iffirst@linenum@out@ \first@linenum@out@true -\newcommand{\this@line@list@version}{2}% +\newcommand{\this@line@list@version}{3}% \newcommand*{\line@list@stuff}[1]{% \read@linelist{#1}% \iffirst@linenum@out@ @@ -1033,6 +1035,9 @@ \global\first@linenum@out@false% \immediate\openout\linenum@out=#1\relax% \immediate\write\linenum@out{\string\line@list@version{\this@line@list@version}}% + \ifl@dpaging% + \immediate\write\linenum@out{\string\@par@sync@option{\@par@this@sync@option}}% + \fi% \else \if@minipage% \leavevmode% @@ -2338,10 +2343,10 @@ }}% #3\strut\par\allowbreak} \newcommand*{\threecolfootgroup}[1]{{\csuse{Xnotefontsize@#1}% - \noindent\csuse{Xtxtbeforenotes@#1}\par% + \noindent\csuse{Xtxtbeforenotes@#1}}\par% \splittopskip=\ht\strutbox \expandafter - \rigidbalance\csname #1footins\endcsname \thr@@ \splittopskip}} + \rigidbalance\csname #1footins\endcsname \thr@@ \splittopskip} \newcommand*{\mpthreecolfootgroup}[1]{{% \vskip\skip\@nameuse{mp#1footins} \ifl@dpairing\ifparledgroup% @@ -2411,10 +2416,10 @@ }}% #3\strut\par\allowbreak} \newcommand*{\twocolfootgroup}[1]{{\csuse{Xnotefontsize@#1} - \noindent\csuse{Xtxtbeforenotes@#1}\par% + \noindent\csuse{Xtxtbeforenotes@#1}}\par% \splittopskip=\ht\strutbox \expandafter - \rigidbalance\csname #1footins\endcsname \tw@ \splittopskip}} + \rigidbalance\csname #1footins\endcsname \tw@ \splittopskip} \newcommand*{\mptwocolfootsetup}[1]{% \count\csname mp#1footins\endcsname 500 @@ -2498,11 +2503,7 @@ {% \hspace{\csuse{Xinplaceofnumber@#2}}% }% - {\hspace{\csuse{Xbeforesymlinenum@#2}}\csuse{Xnotenumfont@#2}% - \ifdimequal{\csuse{Xboxsymlinenum@#2}}{0pt}% - {\csuse{Xsymlinenum@#2}}% - {\hbox to \csuse{Xboxsymlinenum@#2}{\csuse{Xsymlinenum@#2}\hfill}}% - \hspace{\csuse{Xaftersymlinenum@#2}}}% + {\printsymlinefootnotearea{#2}}% }% {% \printlinefootnotearea{#1}{#2}% @@ -2521,6 +2522,16 @@ }% }% } +\newcommand{\printsymlinefootnotearea}[1]{% + \hspace{\csuse{Xbeforesymlinenum@#1}}% + \csuse{Xnotenumfont@#1}% + \ifdimequal{\csuse{Xboxsymlinenum@#1}}{\z@}% + {\csuse{Xsymlinenum@#1}}% + {\hbox to \csuse{Xboxsymlinenum@#1}% + {\csuse{Xsymlinenum@#1}\hfill}% + }% + \hspace{\csuse{Xaftersymlinenum@#1}}% +}% \newcommand{\printlinefootnotearea}[2]{% \printXbeforenumber{#2}% \csuse{Xnotenumfont@#2}% @@ -2667,7 +2678,8 @@ \def\printlines#1|#2|#3|#4|#5|#6|#7|{% \begingroup% \ifluatex% - \textdir TLT% + \edef\@tmp{\the\textdir}% + \ifdefstring{\@tmp}{TLT}{}{\textdir TLT}%Test in order to prevent spurious space (bug #397) \fi% \setprintlines{#1}{#2}{#3}{#4}{#5}{#6}% \ifdimequal{\csuse{Xboxstartlinenum@\@currentseries}}{0pt}% @@ -3390,6 +3402,7 @@ }% \global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4#5{{% + \hangindent=\csuse{Xendhangindent@#4}% \ifXendinsertsep@% \hskip\csuse{Xendafternote@#4}% \csuse{Xendsep@#4}% @@ -3405,15 +3418,10 @@ \notblank{#5}{\docsvlist{#5}}{}% \csuse{Xendbhooknote@#4}% \csuse{Xendnotefontsize@#4}% - \ifboolexpr{% - togl {nonum@}% - or togl {Xendnonumber@#4}% - }% - {\hspace{\csuse{Xendinplaceofnumber@#4}}}% - {\printlineendnotearea{#1}{#4}}% - \nottoggle{Xendlemmadisablefontselection@#4}% - {\select@lemmafont#1|#2}% - {#2}% + \printlineendnote{#1}{#4}% + \nottoggle{Xendlemmadisablefontselection@#4}% + {\select@lemmafont#1|#2}% + {#2}% \ifboolexpr{% togl {nosep@}% or test{\ifcsempty{Xendlemmaseparator@#4}}% @@ -3434,7 +3442,50 @@ \let\l@d@section=\@gobble +\newcommand{\printlineendnote}[2]{% + \l@dp@rsefootspec#1|% + \iftoggle{Xendnumberonlyfirstintwolines@#2}{% + \edef\lineinfo@{\l@dparsedstartpage - \l@dparsedstartline - \l@dparsedstartsub - \l@dparsedendpage - \l@dparsedendline - \l@dparsedendsub}% + }% + {% + \edef\lineinfo@{\l@dparsedstartpage - \l@dparsedstartline - \l@dparsedstartsub}% + }% + \ifboolexpr{% + togl {nonum@}% + or togl {Xendnonumber@#2}% + }% + {\hspace{\csuse{Xendinplaceofnumber@#2}}}% + {% + \iftoggle{Xendnumberonlyfirstinline@#2}% + {\ifcsdef{prevendline#2}% + {\ifcsequal{prevendline#2}{lineinfo@}% + {% + \csuse{Xendbhookinplaceofnumber@#2}% + \ifcsempty{Xendsymlinenum@#2}% + {\hspace{\csuse{Xendinplaceofnumber@#2}}}% + {\printsymlineendnotearea{#2}}% + \csuse{Xendahookinplaceofnumber@2}% + }% + {\printlineendnotearea{#1}{#2}}}% + {\printlineendnotearea{#1}{#2}}% + }% + {\printlineendnotearea{#1}{#2}}%We keep every time line + \csxdef{prevendline#2}{\lineinfo@}% + }% +}% +\newcommand{\printsymlineendnotearea}[1]{% + \hspace{\csuse{Xendbeforesymlinenum@#1}}% + \csuse{Xendnotenumfont@#1}% + \ifdimequal{\csuse{Xendboxsymlinenum@#1}}{\z@}% + {\csuse{Xendsymlinenum@#1}}% + {\hbox to \csuse{Xendboxsymlinenum@#1}% + {\csuse{Xendsymlinenum@#1}\hfill}% + }% + \hspace{\csuse{Xendaftersymlinenum@#1}}% +}% \newcommand{\printlineendnotearea}[2]{% + \csuse{Xendbhooklinenumber@#2}% + \hspace{\csuse{Xendbeforenumber@#2}}% \bgroup% \csuse{Xendnotenumfont@#2}% \ifdimequal{\csuse{Xendboxlinenum@#2}}{0pt}% @@ -3447,7 +3498,8 @@ \IfSubStr{LC}{\csuse{Xendboxlinenumalign@#2}}{\hfill}{}% }}% \egroup% - \enspace% + \hspace{\csuse{Xendafternumber@#2}}% + \csuse{Xendahooklinenumber@#2}% }% \newcommand*{\setprintendlines}[6]{% \l@d@pnumfalse \l@d@dashfalse @@ -3759,6 +3811,9 @@ \csgdef{Xendnotefontsize@#1}{\footnotesize}% \csgdef{Xendbhooknote@#1}{}% + \csgdef{Xendbeforenumber@#1}{0pt} + \csgdef{Xendafternumber@#1}{0.5em} + \csgdef{Xendboxlinenum@#1}{0pt}% \csgdef{Xendboxlinenumalign@#1}{L}% @@ -3776,6 +3831,20 @@ \csgdef{Xendinplaceofnumber@#1}{0pt}% \newtoggle{Xendnonumber@#1}% + + \csgdef{Xendhangindent@#1}{0pt}% + \newtoggle{Xendnumberonlyfirstinline@#1}% + \newtoggle{Xendnumberonlyfirstintwolines@#1}% + + \csgdef{Xendbeforesymlinenum@#1}{\csuse{Xendbeforenumber@#1}}% + \csgdef{Xendaftersymlinenum@#1}{\csuse{Xendafternumber@#1}}% + \csgdef{Xendsymlinenum@#1}{}% + \csgdef{Xendboxsymlinenum@#1}{0pt}% + + \csgdef{Xendbhooklinenumber@#1}{}% + \csgdef{Xendehooklinenumber@#1}{}% + \csgdef{Xendbhookinplaceofnumber@#1}{}% + \csgdef{Xendehookinplaceofnumber@#1}{}% \fi% \listxadd{\@series}{#1} } @@ -3808,13 +3877,13 @@ \newcommandx{\settoggle@series}[5][4,5,usedefault]{% \def\do##1{% \global\settoggle{#2@##1}{#3}% - \ifstrequal{#4}{reload}% - {% - \csuse{Xarrangement@\csuse{series@display##1}}{##1}% - \csuse{arrangementX@\csuse{series@displayX##1}}{##1}% - }% - {}% - }% + \ifstrequal{#4}{critical}{ + \csuse{Xarrangement@\csuse{series@display##1}}{##1}% + }{} + \ifstrequal{#4}{familiar}{ + \csuse{arrangementX@\csuse{series@displayX##1}}{##1}% + }{} + }% \ifstrempty{#1}{% \dolistloop{\@series}% \ifstrempty{#5}{}{% @@ -3828,10 +3897,13 @@ \newcommandx{\setcommand@series}[5][4,5,usedefault]{% \def\do##1{ \csgdef{#2@##1}{#3} - \ifstrequal{#4}{reload}{ - \csuse{Xarrangement@\csuse{series@display##1}}{##1}% - \csuse{arrangementX@\csuse{series@displayX##1}}{##1}% - }{}} + \ifstrequal{#4}{critical}{% + \csuse{Xarrangement@\csuse{series@display##1}}{##1}% + }{} + \ifstrequal{#4}{familiar}{% + \csuse{arrangementX@\csuse{series@displayX##1}}{##1}% + }{}% + }% \ifstrempty{#1}{% \dolistloop{\@series}% \ifstrempty{#5}{}{% @@ -3868,14 +3940,14 @@ \docsvlist{#2}% }% } -\newcommand{\newhooktoggle@series@reload}[1]{% +\newcommand{\newhooktoggle@series@reload}[2]{% \global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{% - \settoggle@series{##1}{#1}{##2}[reload]% + \settoggle@series{##1}{#1}{##2}[#2]% }% }% -\newcommand{\newhookcommand@series@reload}[1]{% +\newcommand{\newhookcommand@series@reload}[2]{% \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{% - \setcommand@series{##1}{#1}{##2}[reload]% + \setcommand@series{##1}{#1}{##2}[#2]% }% } \unless\ifnocritical@ @@ -3903,7 +3975,7 @@ \newhookcommand@series{Xafterlemmaseparator} \newhookcommand@series{Xinplaceoflemmaseparator} \newhookcommand@series{Xtxtbeforenotes} - \newhookcommand@series@reload{Xafterrule} + \newhookcommand@series@reload{Xafterrule}{critical} \newhooktoggle@series{Xnumberonlyfirstinline} \newhooktoggle@series{Xnumberonlyfirstintwolines} \newhooktoggle@series{Xnonumber} @@ -3916,9 +3988,9 @@ \newhooktoggle@series{Xonlypstart} \newhooktoggle@series{Xnonbreakableafternumber} \newhooktoggle@series{Xlemmadisablefontselection} - \newhookcommand@series@reload{Xmaxhnotes} - \newhookcommand@series@reload{Xbeforenotes} - \newhooktoggle@series@reload{Xnoteswidthliketwocolumns}% + \newhookcommand@series@reload{Xmaxhnotes}{critical} + \newhookcommand@series@reload{Xbeforenotes}{critical} + \newhooktoggle@series@reload{Xnoteswidthliketwocolumns}{critical}% \newhookcommand@series{Xnotefontsize} \newhookcommand@series{Xboxlinenum}% @@ -3940,10 +4012,10 @@ \newhookcommand@series{colalignX}% \newhookcommand@series{notenumfontX} \newhookcommand@series{bhooknoteX} - \newhookcommand@series@reload{beforenotesX} - \newhookcommand@series@reload{maxhnotesX} - \newhooktoggle@series@reload{noteswidthliketwocolumnsX}% - \newhookcommand@series@reload{afterruleX} + \newhookcommand@series@reload{beforenotesX}{familiar} + \newhookcommand@series@reload{maxhnotesX}{familiar} + \newhooktoggle@series@reload{noteswidthliketwocolumnsX}{familiar}% + \newhookcommand@series@reload{afterruleX}{familiar} \newhookcommand@series{notefontsizeX} \newhookcommand@series{afternoteX} \newhookcommand@series{parafootsepX} @@ -3969,12 +4041,30 @@ \newhookcommand@series{Xendafterlemmaseparator} \newhookcommand@series{Xendinplaceoflemmaseparator} + \newhookcommand@series{Xendbeforenumber}% + \newhookcommand@series{Xendafternumber}% + \newhooktoggle@series{Xendparagraph} \newhookcommand@series{Xendafternote} \newhookcommand@series{Xendsep} \newhookcommand@series{Xendinplaceofnumber}% \newhooktoggle@series{Xendnonumber}% + + \newhooktoggle@series{Xendnumberonlyfirstinline}% + \newhooktoggle@series{Xendnumberonlyfirstintwolines}% + + \newhookcommand@series{Xendsymlinenum}% + \newhookcommand@series{Xendbeforesymlinenum}% + \newhookcommand@series{Xendaftersymlinenum}% + \newhookcommand@series{Xendboxsymlinenum}% + + \newhookcommand@series{Xendbhooklinenumber}% + \newhookcommand@series{Xendahooklinenumber}% + \newhookcommand@series{Xendbhookinplaceofnumber}% + \newhookcommand@series{Xendahookinplaceofnumber}% + + \newhookcommand@series{Xendhangindent}% \fi \newtoggle{fulllines@}% \newtoggle{nonum@} |