diff options
author | Karl Berry <karl@freefriends.org> | 2013-11-09 23:38:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-11-09 23:38:16 +0000 |
commit | 9d1f0b004cd5a2bdf8014aef14a0afb6f54c3c06 (patch) | |
tree | 327dd724a3e886e675aec58dcba21b1451078e49 /Master/texmf-dist/tex/latex/eledmac/eledpar.sty | |
parent | ed47a420cd7d5ffcfc9106fbb61a9e25bc47c577 (diff) |
eledmac (9nov13)
git-svn-id: svn://tug.org/texlive/trunk@32113 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/eledmac/eledpar.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/eledmac/eledpar.sty | 102 |
1 files changed, 98 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty index 358d09e92db..18890617f82 100644 --- a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty +++ b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty @@ -24,7 +24,7 @@ %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{eledpar}[2013/10/27 v1.4.3 eledmac extension for parallel texts] +\ProvidesPackage{eledpar}[2013/11/08 v1.5.0 eledmac extension for parallel texts] \newif\ifshiftedpstarts \let\shiftedversestrue\shiftedpstartstrue @@ -80,6 +80,9 @@ \global\numberingRtrue \global\advance\section@numR \@ne \global\absline@numR \z@ + \gdef\normal@page@breakR{} + \gdef\l@prev@pbR{} + \gdef\l@prev@nopbR{} \global\line@numR \z@ \global\@lockR \z@ \global\sub@lockR \z@ @@ -158,7 +161,6 @@ \line@list@stuffR{\jobname.\extensionchars\the\section@numR R}% \l@dend@stuff} -%% \changes{v0.11}{2012/06/11}{Lineation can be by pstart (like in eledmac 0.15).} \newif\ifbypage@R \newif\ifbypstart@R \bypage@Rfalse @@ -228,7 +230,10 @@ \ifledRcol \setcounter{sublinenumincrementR}{#1}% \else \setcounter{sublinenumincrement}{#1}% \fi} - +\WithSuffix\newcommand\firstlinenum*[1]{\setcounter{firstlinenumR}{#1}\setcounter{firstlinenum}{#1}} +\WithSuffix\newcommand\linenumincrement*[1]{\setcounter{linenumincrementR}{#1}\setcounter{linenumincrement}{#1}} +\WithSuffix\newcommand\firstsublinenum*[1]{\setcounter{subfirstlinenumR}{#1}\setcounter{subfirstlinenum}{#1}} +\WithSuffix\newcommand\sublinenumincrement*[1]{\setcounter{sublinenumincrementR}{#1}\setcounter{sublinenumincrement}{#1}} \newcommand*{\Rlineflag}{R} \newcommand*{\linenumrepR}[1]{\@arabic{#1}} @@ -371,6 +376,7 @@ \page@num=#1\relax \last@page@num=#1\relax \def\next@page@num{#1}% + \listcsxadd{normal@page@break}{\the\absline@num} \fi \fi} @@ -620,6 +626,8 @@ \fi \fi} +\newcommand*{\new@lineL}{% + \write\linenum@out{\string\@l[\the\c@page][\thepage]}} \newcommand*{\new@lineR}{% \write\linenum@outR{\string\@l[\the\c@page][\thepage]}} \renewcommand*{\flag@start}{% @@ -808,6 +816,8 @@ \let\thepstart\thepstartR \let\pstart\pstartR \let\pend\pendR + \let\ledpb\ledpbR + \let\lednopb\lednopbR \let\lineation\lineationR \Rightsidehook \let\oldstanza\stanza @@ -976,7 +986,7 @@ \add@inserts \affixside@note \l@dlsn@te - {\ledllfill\hb@xt@ \wd\one@line{\do@insidelineLhook\inserthangingsymbolL\new@line\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta% + {\ledllfill\hb@xt@ \wd\one@line{\do@insidelineLhook\inserthangingsymbolL\new@lineL\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta% \l@drsn@te }}% \add@penaltiesL @@ -1755,6 +1765,9 @@ \unhbox\l@drightbox }% \checkraw@text + \checkverseL + \checkverseR + \checkpb@columns \repeat} \@writelinesinparL \@writelinesinparR @@ -1781,6 +1794,27 @@ \global\instanzaLfalse \global\instanzaRfalse} + +\newcommand{\checkpb@columns}{% + \newif\if@pb + \newif\if@nopb + \IfStrEq{\led@pb@setting}{before}{ + \numdef{\next@absline}{\the\absline@num+1}% + \numdef{\next@abslineR}{\the\absline@numR+1}% + \xifinlistcs{\next@absline}{l@prev@pb}{\@pbtrue}{}% + \xifinlistcs{\next@abslineR}{l@prev@pbR}{\@pbtrue}{} + \xifinlistcs{\next@absline}{l@prev@nopb}{\@nopbtrue}{}% + \xifinlistcs{\next@abslineR}{l@prev@nopbR}{\@nopbtrue}{} + }{} + \IfStrEq{\led@pb@setting}{after}{ + \xifinlistcs{\the\absline@num}{l@prev@pb}{\@pbtrue}{}% + \xifinlistcs{\the\absline@numR}{l@prev@pbR}{\@pbtrue}{} + \xifinlistcs{\the\absline@num}{l@prev@nopb}{\@nopbtrue}{}% + \xifinlistcs{\the\absline@numR}{l@prev@nopbR}{\@nopbtrue}{} + }{} +\if@nopb\nopagebreak[4]\enlargethispage{\baselineskip}\fi +\if@pb\pagebreak[4]\fi +} \newcommand*{\columnseparator}{% \smash{\rule[-0.2\baselineskip]{\columnrulewidth}{1.05\baselineskip}}} \newdimen\columnrulewidth @@ -1886,6 +1920,8 @@ \get@nextboxL \checkpageL + \checkverseL + \checkpbL \repeat \ifl@dpagefull \@writelinesonpageL{\the\numpagelinesL}% @@ -1906,6 +1942,8 @@ \fi \get@nextboxR \checkpageR + \checkverseR + \checkpbR \repeat \ifl@dpagefull \@writelinesonpageR{\the\numpagelinesR}% @@ -2010,6 +2048,7 @@ \newif\ifl@dsamepage \l@dsamepagetrue \newif\ifl@dpagefull + \newcommand*{\checkpageL}{% \l@dpagefulltrue \l@dsamepagetrue @@ -2039,6 +2078,51 @@ \l@dpagefulltrue \fi} +\newcommand{\checkpbL}{ + \IfStrEq{\led@pb@setting}{after}{ + \xifinlistcs{\the\absline@num}{l@prev@pb}{\l@dpagefulltrue\l@dsamepagefalse}{} + \xifinlistcs{\the\absline@num}{l@prev@nopb}{\l@dpagefullfalse\l@dsamepagetrue}{} + }{} + \IfStrEq{\led@pb@setting}{before}{ + \numdef{\next@absline}{\the\absline@num+1} + \xifinlistcs{\next@absline}{l@prev@pb}{\l@dpagefulltrue\l@dsamepagefalse}{} + \xifinlistcs{\next@absline}{l@prev@nopb}{\l@dpagefullfalse\l@dsamepagetrue}{} + }{} +} + +\newcommand{\checkpbR}{ + \IfStrEq{\led@pb@setting}{after}{ + \xifinlistcs{\the\absline@numR}{l@prev@pbR}{\l@dpagefulltrue\l@dsamepagefalse}{} + \xifinlistcs{\the\absline@numR}{l@prev@nopbR}{\l@dpagefullfalse\l@dsamepagetrue}{} + }{} + \IfStrEq{\led@pb@setting}{before}{ + \numdef{\next@abslineR}{\the\absline@numR+1} + \xifinlistcs{\next@abslineR}{l@prev@pbR}{\l@dpagefulltrue\l@dsamepagefalse}{} + \xifinlistcs{\next@abslineR}{l@prev@nopbR}{\l@dpagefullfalse\l@dsamepagetrue}{} + }{} +} +\newcommand{\checkverseL}{ +\ifinstanzaL + \iflednopbinverse + \ifinserthangingsymbol + \numgdef{\prev@abslineverse}{\the\absline@num-1} + \IfStrEq{\led@pb@setting}{after}{\lednopbnum{\prev@abslineverse}}{} + \IfStrEq{\led@pb@setting}{before}{\ifnum\numpagelinesL<3\ledpbnum{\prev@abslineverse}\fi}{} + \fi + \fi +\fi +} +\newcommand{\checkverseR}{ +\ifinstanzaR + \iflednopbinverse + \ifinserthangingsymbolR + \numgdef{\prev@abslineverse}{\the\absline@numR-1} + \IfStrEq{\led@pb@setting}{after}{\lednopbnumR{\prev@abslineverse}}{} + \IfStrEq{\led@pb@setting}{before}{\ifnum\numpagelinesR<3\ledpbnumR{\prev@abslineverse}\fi}{} + \fi + \fi +\fi +} \newdimen\ledthegoal \ifshiftedpstarts \newcommand*{\goalfraction}{0.95} @@ -2111,6 +2195,16 @@ \fi \fi} +\def\l@prev@pbR{} +\def\l@prev@nopbR{} +\newcommand{\ledpbR}{\write\linenum@outR{\string\led@pbR}} +\newcommand{\ledpbnumR}[1]{\write\linenum@outR{\string\led@pbnumR{#1}}} +\newcommand{\lednopbR}{\write\linenum@outR{\string\led@nopbR}} +\newcommand{\lednopbnumR}[1]{\write\linenum@outR{\string\led@nopbnumR{#1}}} +\newcommand{\led@pbR}{\listcsxadd{l@prev@pbR}{\the\absline@numR}} +\newcommand{\led@pbnumR}[1]{\listcsxadd{l@prev@pbR}{#1}} +\newcommand{\led@nopbR}{\listcsxadd{l@prev@nopbR}{\the\absline@numR}} +\newcommand{\led@nopbnumR}[1]{\listcsxadd{l@prev@nopbR}{#1}} \endinput %% %% End of file `eledpar.sty'. |