From 7dda79a619cf02db4cdb8b8882245bd8da077b0c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 22 Mar 2015 21:22:46 +0000 Subject: eledmac (22mar15) git-svn-id: svn://tug.org/texlive/trunk@36596 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/eledmac/eledmac.sty | 207 ++++++++++++++++-------- Master/texmf-dist/tex/latex/eledmac/eledpar.sty | 9 +- 2 files changed, 147 insertions(+), 69 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty index d8669f70833..cb2acbfc52d 100644 --- a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty +++ b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty @@ -24,8 +24,9 @@ + \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledmac}[2015/03/12 v1.19.1 LaTeX port of EDMAC]% +\ProvidesPackage{eledmac}[2015/03/22 v1.20.0 LaTeX port of EDMAC]% \newif\ifledfinal \newif\ifparapparatus@ \newif\ifnoquotation@ @@ -34,15 +35,18 @@ \newif\ifwidthliketwocolumns% \newif\ifledsecnolinenumber \parapparatus@false -\DeclareOption{noquotation}{\noquotation@true} -\DeclareOption{final}{\ledfinaltrue} -\DeclareOption{draft}{\ledfinalfalse} -\DeclareOption{parapparatus}{\parapparatus@true} -\DeclareOption{nopbinverse}{\lednopbinversetrue} -\DeclareOption{ledsecnolinenumber}{\ledsecnolinenumbertrue} -\DeclareOption{widthliketwocolumns}{\widthliketwocolumnstrue}% -\ExecuteOptions{final} -\ProcessOptions*\relax +\RequirePackage{xkeyval} +\DeclareOptionX{series}[A,B,C,D,E,Z]{\xdef\default@series{#1}} +\DeclareOptionX{noquotation}{\noquotation@true} +\DeclareOptionX{final}{\ledfinaltrue} +\DeclareOptionX{draft}{\ledfinalfalse} +\DeclareOptionX{parapparatus}{\parapparatus@true} +\DeclareOptionX{nopbinverse}{\lednopbinversetrue} +\DeclareOptionX{ledsecnolinenumber}{\ledsecnolinenumbertrue} +\DeclareOptionX{widthliketwocolumns}{\widthliketwocolumnstrue}% +\ExecuteOptionsX{series}% +\ExecuteOptionsX{final} +\ProcessOptionsX*\relax \RequirePackage{xargs} \RequirePackage{etoolbox} @@ -197,6 +201,9 @@ \newcommand{\led@err@EdtextWithoutFootnote}{% \eledmac@error{edtext without Xfootnote. Check syntaxis.}{\@ehd}% }% +\newcommand{\led@err@FootnoteWithoutEdtext}{% + \eledmac@error{Xfootnote without edtext. Check syntax.}{\@ehd}% +}% \newcommand{\led@error@ImakeidxAfterEledmac}{% \eledmac@error{Imakeidx must be loaded before eledmac.}{\@ehd}% }% @@ -213,15 +220,10 @@ \let\extensionchars=\empty \newif\ifnumbering \newif\ifl@dpairing - \l@dpairingfalse \newif\ifl@dpaging% - \l@dpagingfalse% \newif\ifl@dprintingpages% - \l@dprintingpagesfalse% \newif\ifl@dprintingcolumns% - \l@dprintingcolumnsfalse% \newif\ifpst@rtedL - \pst@rtedLfalse \newcount\l@dnumpstartsL \newif\ifledRcol \newif\ifledRcol@ @@ -448,12 +450,19 @@ \setlength{\linenumsep}{1pc} \newcommand*{\numlabfont}{\normalfont\scriptsize} \newcommand*{\ledlinenum}{% + \bgroup% + \ifluatex% + \luatextextdir TLT% + \fi% \numlabfont\linenumrep{\line@num}% \ifsublines@ \ifnum\subline@num>0\relax \unskip\fullstop\sublinenumrep{\subline@num}% \fi - \fi} + \fi% + \egroup% +}% + \newcommand*{\leftlinenum}{% \ledlinenum \kern\linenumsep} @@ -838,7 +847,6 @@ \def\endlock{\write\linenum@out{\string\lock@off}} \newif\ifl@dskipnumber - \l@dskipnumberfalse \newcommand*{\skipnumbering}{\skipnumbering@reg} \newcommand*{\skipnumbering@reg}{% \write\linenum@out{\string\n@num}% @@ -1646,15 +1654,12 @@ }% } \newif\ifl@d@pnum - \l@d@pnumfalse \newif\ifl@d@ssub - \l@d@ssubfalse \newif\ifl@d@elin - \l@d@elinfalse \newif\ifl@d@esl - \l@d@eslfalse \newif\ifl@d@dash - \l@d@dashfalse +\newif\ifl@d@twolines% +\newif\ifl@d@morethantwolines% \newcommand*{\l@dparsefootspec}[3]{\l@dp@rsefootspec#1|} \def\l@dp@rsefootspec#1|#2|#3|#4|#5|#6|#7|{% \gdef\l@dparsedstartpage{#1}% @@ -1696,16 +1701,47 @@ \l@d@esltrue \l@d@dashtrue \fi - \fi} + \fi% + \ifl@d@dash% + \iftoggle{fulllines@}% + {}% + {% + \ifcsempty{twolines@\@currentseries}% + {}% + {% + \l@d@dashfalse% + \l@d@twolinestrue% + \l@d@elinfalse% + \l@d@eslfalse% + \ifcsempty{morethantwolines@\@currentseries}% + {}% + {\ifnum\numexpr #5-#2>1\relax% + \l@d@morethantwolinestrue% + \fi% + }% + }% + }% + \fi% +}% \def\printlines#1|#2|#3|#4|#5|#6|#7|{\begingroup + \ifluatex% + \luatextextdir TLT% + \fi% \setprintlines{#1}{#2}{#3}{#4}{#5}{#6}% \ifl@d@pnum #1\fullstop\fi \linenumrep{#2} \ifl@d@ssub \fullstop \sublinenumrep{#3}\fi - \ifl@d@dash \endashchar\fi + \ifl@d@dash \ifl@d@twolines\else\endashchar\fi\fi \ifl@d@pnum #4\fullstop\fi \ifl@d@elin \linenumrep{#5}\fi \ifl@d@esl \ifl@d@elin \fullstop\fi \sublinenumrep{#6}\fi + \ifl@d@twolines% + \ifl@d@morethantwolines% + \csuse{morethantwolines@\@currentseries}% + \else% + \csuse{twolines@\@currentseries}% + \fi% + \fi% \endgroup} \newcommand*{\normalfootstart}[1]{% \ifdimequal{0pt}{\preXnotes@}{}% @@ -2180,6 +2216,11 @@ \@nameuse{footfmt#1}{#1}{#2}\color@endgroup}} \newcommand*{\normalfootfmtX}[2]{% + \ifluatex% + \luatextextdir\footnote@luatextextdir% + \luatexpardir\footnote@luatexpardir% + \par% + \fi% \protected@edef\@currentlabel{% \@nameuse{@thefnmark#1}% }% @@ -2647,8 +2688,22 @@ \fi \immediate\write\l@d@end{\string\l@d@section{\the\section@num}}} -\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4{{\csuse{bhookXendnote@#4}\csuse{Xendnotefontsize@#4}{\csuse{Xendnotenumfont@#4}\printendlines#1|}% - \enspace{\nottoggle{Xendlemmadisablefontselection@#4}{\select@lemmafont#1|#2}{#2}}\enskip#3\par}} +\global\notbool{parapparatus@}{}{\long}\def\endprint#1#2#3#4{{% + \csuse{bhookXendnote@#4}% + \csuse{Xendnotefontsize@#4}% + {% + \csuse{Xendnotenumfont@#4}% + \ifdimequal{\csuse{boxXendlinenum@#4}}{0pt}% + {\printendlines#1|}% + {\leavevmode\hbox to \csuse{boxXendlinenum@#4}{\printendlines#1|\hfill}}% + }% + \enspace{% + \nottoggle{Xendlemmadisablefontselection@#4}% + {\select@lemmafont#1|#2}% + {#2}% + }% + \enskip#3\par% +}}% \let\l@d@section=\@gobble @@ -2728,9 +2783,12 @@ \csgdef{bhookXnote@#1}{}% \csgdef{bhookXendnote@#1}{}% \csgdef{boxlinenum@#1}{0pt}% + \csgdef{boxXendlinenum@#1}{0pt}% \csgdef{boxsymlinenum@#1}{0pt}% \newtoggle{numberonlyfirstinline@#1}% \newtoggle{numberonlyfirstintwolines@#1}% + \csgdef{twolines@#1}{}% + \csgdef{morethantwolines@#1}{}% \newtoggle{onlypstartinfootnote@#1}% \newtoggle{pstartinfootnoteeverytime@#1}% \newtoggle{pstartinfootnote@#1}% @@ -2764,41 +2822,45 @@ \expandafter\newinsert\csname mp#1footins\endcsname% \global\notbool{parapparatus@}{\expandafter\newcommand\expandafter *}{\expandafter\newcommand}\csname #1footnote\endcsname[2][]{% - \begingroup% - \newcommand{\content}{##2}% - \ifnumberedpar@ - \ifledRcol% - \ifluatex% - \footnotelang@lua[R]% - \fi% - \@ifundefined{xpg@main@language}%if polyglossia - {}% - {\footnotelang@poly[R]}% - \footnoteoptions@[R]{##1}{true}% - \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}% -\noexpand\csuse{v#1footnote}{#1}% - {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}}\to\inserts@listR - \footnoteoptions@[R]{##1}{false}% - \global\advance\insert@countR \@ne% - \else% + \if@edtext@% + \begingroup% + \newcommand{\content}{##2}% + \ifnumberedpar@% + \ifledRcol% \ifluatex% - \footnotelang@lua% + \footnotelang@lua[R]% \fi% - \@ifundefined{xpg@main@language}%if polyglossia - {}% - {\footnotelang@poly}% - \footnoteoptions@{##1}{true}% - \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}% -\noexpand\csuse{v#1footnote}{#1}% - {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}}\to\inserts@list - \global\advance\insert@count \@ne% - \footnoteoptions@{##1}{false}% - \fi - \else - \csuse{v#1footnote}{#1}{{0|0|0|0|0|0|0}{}{##1}}% + \@ifundefined{xpg@main@language}%if polyglossia + {}% + {\footnotelang@poly[R]}% + \footnoteoptions@[R]{##1}{true}% + \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}% + \noexpand\csuse{v#1footnote}{#1}% + {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}}\to\inserts@listR + \footnoteoptions@[R]{##1}{false}% + \global\advance\insert@countR \@ne% + \else% + \ifluatex% + \footnotelang@lua% + \fi% + \@ifundefined{xpg@main@language}%if polyglossia + {}% + {\footnotelang@poly}% + \footnoteoptions@{##1}{true}% + \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}% + \noexpand\csuse{v#1footnote}{#1}% + {{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}}\to\inserts@list + \global\advance\insert@count \@ne% + \footnoteoptions@{##1}{false}% + \fi + \else + \csuse{v#1footnote}{#1}{{0|0|0|0|0|0|0}{}{##1}}% + \fi% + \ignorespaces% + \endgroup% + \else% + \led@err@FootnoteWithoutEdtext% \fi% - \ignorespaces% - \endgroup } \csgdef{series@display#1}{} \footnormal{#1} @@ -2808,9 +2870,13 @@ \newcommand{\content}{##1}% \stepcounter{footnote#1}% \protected@csxdef{@thefnmark#1}{\csuse{thefootnote#1}}% - \nottoggle{nomk@}%Nomk is set to true when using \footnoteXnomk with eledpar + \nottoggle{nomk@}%Nomk is set to true when using \footnoteXnomk with eledpar {\csuse{@footnotemark#1}}% {}% + \ifluatex% + \xdef\footnote@luatextextdir{\the\luatextextdir}% + \xdef\footnote@luatexpardir{\the\luatexpardir}% + \fi% \csuse{vfootnote#1}{#1}{\expandonce\content}\m@mmf@prepare% \endgroup% } @@ -2834,7 +2900,7 @@ \listxadd{\@series}{#1} } }% End of \newseries -\newseries{A,B,C,D,E,Z} +\expandafter\newseries\expandafter{\default@series} \newcommand{\seriesatbegin}[1]{ \edef\series{#1} \def\new{} @@ -2888,6 +2954,11 @@ \setcommand@series{##1}{#1}{##2}% }% } + +\newhookcommand@series{twolines} + +\newhookcommand@series{morethantwolines} + \newhookcommand@series{Xhangindent} \newhookcommand@series{hangindentX} @@ -2924,6 +2995,8 @@ \newhookcommand@series{boxlinenum} +\newhookcommand@series{boxXendlinenum}% + \newhookcommand@series{boxsymlinenum} \newhookcommand@series{parafootsep} @@ -2996,6 +3069,7 @@ \newif\ifledplinenum \ledplinenumtrue \newcommand*{\symplinenum}{} +\newtoggle{fulllines@}% \newtoggle{nonum@} \newtoggle{nosep@} \newtoggle{nomk@}% @@ -3032,7 +3106,7 @@ {%Be sure the \prevline exists. \ifcsequal{prevline#2}{lineinfo@}%Try it {% - \ifcsempty{symlinenum@#2}% Try if a symbol is define + \IfStrEq{\csuse{symlinenum@#2}}{}% {% \hspace{\csuse{inplaceofnumber@#2}}% }% @@ -3076,6 +3150,7 @@ }% }% \newcommand{\printlinefootnotenumbers}[2]{% + \xdef\@currentseries{#2}% \ifboolexpr{% (togl{pstartinfootnote@#2} and bool{numberpstart})% or togl{pstartinfootnoteeverytime@#2}}% @@ -3384,8 +3459,13 @@ \else% \expandafter\def\csname the@@label#2\endcsname{\l@dgetref@num{1}{#2}|\l@dgetref@num{2}{#2}|\l@dgetref@num{3}{#2}}% \fi% + \ifdefined\Rlineflag% \StrDel{\csuse{the@@label#1}}{\Rlineflag}[\@tempa]% - \StrDel{\csuse{the@@label#2}}{\Rlineflag}[\@tempb]% + \StrDel{\csuse{the@@label#2}}{\Rlineflag}[\@tempb]% + \else% + \letcs{\@tempa}{the@@label#1}% + \letcs{\@tempb}{the@@label#2}% + \fi% \linenum{\@tempa|% \@tempb}}}% @@ -3973,7 +4053,6 @@ \newcommand*{\hangingsymbol}{} \newif\ifinstanza -\instanzafalse \newif\ifinserthangingsymbol \newcommand{\inserthangingsymbol}{% \ifinserthangingsymbol% @@ -4070,6 +4149,7 @@ \newcommandx{\stanza}[1][1,usedefault]{\@startstanza[#1]} \newcommandx{\@stopstanza}[1][1,usedefault]{% + \unskip% \endlock% \pend[#1]% \endgroup% @@ -4078,6 +4158,7 @@ } \newcommandx*{\newverse}[2][1,2,usedefault]{% + \unskip% \endlock\pend[#1]\sza@penalty\global% \advance\stanza@count\@ne\stanza@line[#2]% } diff --git a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty index 38f18761f1c..07d9fadb905 100644 --- a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty +++ b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty @@ -23,7 +23,7 @@ %% This work consists of the files listed in the README file. %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledpar}[2015/03/12 v1.13.1 eledmac extension for parallel texts]% +\ProvidesPackage{eledpar}[2015/03/22 v1.14.0 eledmac extension for parallel texts]% \RequirePackage{xspace}% \newif\ifshiftedpstarts @@ -54,7 +54,6 @@ \section@numR=\z@ \pst@rtedLfalse \newif\ifpst@rtedR - \pst@rtedRfalse \newcommand*{\beginnumberingR}{% \ifnumberingR @@ -159,8 +158,6 @@ \newif\ifbypage@R \newif\ifbypstart@R - \bypage@Rfalse - \bypstart@Rfalse \newcommand*{\lineationR}[1]{{% \ifnumbering \led@err@LineationInNumbered @@ -1054,6 +1051,7 @@ \luatextextdir\l@luatextextdir@L% \luatexpardir\l@luatexpardir@L% \luatexbodydir\l@luatexbodydir@L% + \ifdefstring{\l@luatextextdir@L}{TRT}{\@RTLtrue}{}% \fi% \csuse{eled@sectioning@\the\l@dpscL}% \egroup% @@ -1144,6 +1142,7 @@ \luatextextdir\l@luatextextdir@R% \luatexpardir\l@luatexpardir@R% \luatexbodydir\l@luatexbodydir@R% + \ifdefstring{\l@luatextextdir@L}{TRT}{\@RTLtrue}{}% \fi% \csuse{eled@sectioning@\the\l@dpscR R}% \egroup% @@ -1826,7 +1825,6 @@ \l@dpscR=\z@} \newif\ifl@dusedbabel - \l@dusedbabelfalse \newcommand*{\l@dbbl@set@language}[1]{% \edef\languagename{#1}% \select@language{\languagename}% @@ -1885,7 +1883,6 @@ } \newif\ifaraw@text - \araw@textfalse \newcommand*{\checkraw@text}{% \araw@textfalse \ifvbox\namebox{l@dLcolrawbox\the\l@dpscL} -- cgit v1.2.3