summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/eledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-09-18 22:58:23 +0000
committerKarl Berry <karl@freefriends.org>2014-09-18 22:58:23 +0000
commit5c46cbe2d34d3ae0d9f584f9b183265358484397 (patch)
tree0f840ecd0904500ceac6d2e054f15fc62f773b2f /Master/texmf-dist/tex/latex/eledmac
parent049e1d558c44f46e601b82c3183b9865a5c3e488 (diff)
eledmac (16sep14)
git-svn-id: svn://tug.org/texlive/trunk@35199 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/eledmac')
-rw-r--r--Master/texmf-dist/tex/latex/eledmac/eledmac.sty248
-rw-r--r--Master/texmf-dist/tex/latex/eledmac/eledpar.sty161
2 files changed, 326 insertions, 83 deletions
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
index 04e18190549..8d4dfd3ccca 100644
--- a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
+++ b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
@@ -25,12 +25,13 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledmac}[2014/09/12 v1.12.8 LaTeX port of EDMAC]%
+\ProvidesPackage{eledmac}[2014/09/16 v1.13.0 LaTeX port of EDMAC]%
\newif\ifledfinal
\newif\ifparapparatus@
\newif\ifnoquotation@
\newif\iflednopbinverse
\newif\ifparledgroup
+\newif\ifwidthliketwocolumns%
\newif\ifledsecnolinenumber
\parapparatus@false
\DeclareOption{noquotation}{\noquotation@true}
@@ -39,6 +40,7 @@
\DeclareOption{parapparatus}{\parapparatus@true}
\DeclareOption{nopbinverse}{\lednopbinversetrue}
\DeclareOption{ledsecnolinenumber}{\ledsecnolinenumbertrue}
+\DeclareOption{widthliketwocolumns}{\widthliketwocolumnstrue}%
\ExecuteOptions{final}
\ProcessOptions*\relax
@@ -215,6 +217,10 @@
\else
\begingroup
\initnumbering@sectcmd
+ \ifwidthliketwocolumns%
+ \csuse{setwidthliketwocolumns@\columns@position}%
+ \csuse{setpositionliketwocolumns@\columns@position}%
+ \fi%
\fi
\gdef\eled@sections@@{}%
\if@noeled@sec\else%
@@ -265,6 +271,7 @@
\immediate\closeout\eled@sectioning@out%
\fi%
\ifl@dpairing\else
+ \global\l@dnumpstartsL=\z@%
\endgroup
\fi
}
@@ -279,8 +286,14 @@
\led@mess@SectionContinued{\the\section@num}%
\line@list@stuff{\jobname.\extensionchars\the\section@num}%
\l@dend@stuff
- \begingroup
- \initnumbering@sectcmd
+ \ifl@dpairing\else%
+ \begingroup%
+ \initnumbering@sectcmd%
+ \ifwidthliketwocolumns%
+ \csuse{setwidthliketwocolumns@\columns@position}%
+ \csuse{setpositionliketwocolumns@\columns@position}%
+ \fi%
+ \fi%
\else
\led@err@NumberingShouldHaveStarted
\endnumbering
@@ -1059,6 +1072,9 @@
\fi%
\vskip-\baselineskip%
}
+\newcommand*{\dolinehook}[1]{\gdef\do@linehook{#1}}%
+\newcommand*{\doinsidelinehook}[1]{\gdef\do@insidelinehook{#1}}%
+
\newcommand*{\do@linehook}{}
\newcommand*{\do@insidelinehook}{}
\newcommand*{\l@demptyd@ta}{%
@@ -1437,6 +1453,10 @@
\csuse{bhookXnote@#1}
\csuse{Xnotefontsize@#1}
\footsplitskips
+ \ifl@dpairing%
+ \csuse{setwidthliketwocolumns@\columns@position}%
+ \fi%
+ \setXnotespositionliketwocolumns@{#1}%
\spaceskip=\z@skip \xspaceskip=\z@skip
\csname #1footfmt\endcsname #2[#1]\egroup}
\newcommand*{\footsplitskips}{%
@@ -1568,11 +1588,20 @@
}%
\vskip\skip\csname #1footins\endcsname%
\leftskip0pt \rightskip0pt
- \csname #1footnoterule\endcsname%
+ \ifl@dpairing\else%
+ \hsize=\old@hsize%
+ \fi%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
\vskip\csuse{afterXrule@#1}%
\noindent\leavevmode}
\let\normalfootnoterule=\footnoterule
-\newcommand*{\normalfootgroup}[1]{{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\unvbox\csname #1footins\endcsname}
+\newcommand*{\normalfootgroup}[1]{%
+ {\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}%
+ \unvbox\csname #1footins\endcsname%
+ \hsize=\old@hsize%
+ }%
\newcommand*{\mpnormalfootgroup}[1]{{
\vskip\skip\@nameuse{mp#1footins}
@@ -1584,11 +1613,15 @@
\ifparledgroup%
\ifl@dpairing%
\else%
- \@nameuse{#1footnoterule}%
- \vskip\csuse{afterXrule@#1}%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
+ \vskip\csuse{afterXrule@#1}%
\fi%
\else%
- \@nameuse{#1footnoterule}%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
\vskip\csuse{afterXrule@#1}%
\fi%
\setlength{\parindent}{0pt}
@@ -1642,11 +1675,11 @@
}
\providecommand{\footfudgefiddle}{64}
\newcommand*{\para@footsetup}[1]{{\csuse{Xnotefontsize@#1}
+ \setXnoteswidthliketwocolumns@{#1}%
\dimen0=\baselineskip
\multiply\dimen0 by 1024
\divide \dimen0 by \columnwidth \multiply\dimen0 by \footfudgefiddle\relax
- \expandafter
- \xdef\csname #1footfudgefactor\endcsname{%
+ \csxdef{#1footfudgefactor}{%
\expandafter\strip@pt\dimen0 }}}
\newcommand*{\parafootstart}[1]{%
@@ -1658,7 +1691,9 @@
{}%
}%
\vskip\skip\csname #1footins\endcsname%
- \csname #1footnoterule\endcsname%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
\vskip\csuse{afterXrule@#1}%
\noindent\leavevmode}
\newcommand*{\para@vfootnote}[2]{%
@@ -1717,9 +1752,12 @@
\makehboxofhboxes
\setbox0=\hbox{{\csuse{Xnotefontsize@#1}\csuse{txtbeforeXnotes@#1}}\unhbox0 \removehboxes}%
\csuse{Xnotefontsize@#1}
- \noindent\unhbox0\par}
+ \noindent\unhbox0\par%
+ \global\hsize=\old@hsize%
+ }%
\newcommand*{\mppara@footgroup}[1]{{%
+ \setXnoteswidthliketwocolumns@{#1}%
\vskip\skip\@nameuse{mp#1footins}
\ifl@dpairing\ifparledgroup%
\leavevmode\marks\parledgroup@{begin}%
@@ -1729,12 +1767,16 @@
\ifparledgroup%
\ifl@dpairing%
\else%
- \@nameuse{#1footnoterule}%
- \vskip\csuse{afterXrule@#1}%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
+ \vskip\csuse{afterXrule@#1}%
\fi%
\else%
- \@nameuse{#1footnoterule}%
- \vskip\csuse{afterXrule@#1}%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
+ \vskip\csuse{afterXrule@#1}%
\fi%
\unvbox\csname mp#1footins\endcsname
\ifcsstring{Xragged@#1}{L}{\RaggedLeft}{}%
@@ -1833,11 +1875,15 @@
\ifparledgroup%
\ifl@dpairing%
\else%
- \@nameuse{#1footnoterule}%
- \vskip\csuse{afterXrule@#1}%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
+ \vskip\csuse{afterXrule@#1}%
\fi%
\else%
- \@nameuse{#1footnoterule}%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
\vskip\csuse{afterXrule@#1}%
\fi%
{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
@@ -1897,11 +1943,15 @@
\ifparledgroup%
\ifl@dpairing%
\else%
- \@nameuse{#1footnoterule}%
- \vskip\csuse{afterXrule@#1}%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
+ \vskip\csuse{afterXrule@#1}%
\fi%
\else%
- \@nameuse{#1footnoterule}%
+ \setXnoteswidthliketwocolumns@{#1}%
+ \setXnotespositionliketwocolumns@{#1}%
+ \print@Xfootnoterule{#1}%%
\vskip\csuse{afterXrule@#1}%
\fi%
{\csuse{Xnotefontsize@#1}\noindent\csuse{txtbeforeXnotes@#1}}\par
@@ -1981,6 +2031,10 @@
\csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\footsplitskips
+ \ifl@dpairing%
+ \csuse{setwidthliketwocolumns@\columns@position}%
+ \fi%
+ \setnotesXpositionliketwocolumns@{#1}%
\spaceskip=\z@skip \xspaceskip=\z@skip
\csuse{\csuse{footnote@dir}}\if@RTL\else\noindent\leavevmode\fi\@nameuse{footfmt#1}{#1}{#2}\egroup}
@@ -2016,13 +2070,20 @@
\vskip\skip\csname footins#1\endcsname%
\leftskip=\z@
\rightskip=\z@
- \@nameuse{footnoterule#1}%
+ \ifl@dpairing\else%
+ \hsize=\old@hsize%
+ \fi%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
\vskip\csuse{afterruleX@#1}}
\let\normalfootnoteruleX=\footnoterule
\newcommand*{\normalfootgroupX}[1]{%
- \unvbox\@nameuse{footins#1}}
+ \unvbox\@nameuse{footins#1}%
+ \hsize=\old@hsize%
+ }%
\newcommand*{\mpnormalfootgroupX}[1]{%
\vskip\skip\@nameuse{mpfootins#1}
@@ -2034,11 +2095,15 @@
\ifparledgroup%
\ifl@dpairing%
\else%
- \@nameuse{footnoterule#1}%
- \vskip\csuse{afterruleX@#1}%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
+ \vskip\csuse{afterruleX@#1}%
\fi%
\else%
- \@nameuse{footnoterule#1}%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
\vskip\csuse{afterruleX@#1}%
\fi%
\unvbox\@nameuse{mpfootins#1}}
@@ -2136,11 +2201,15 @@
\ifparledgroup%
\ifl@dpairing%
\else%
- \@nameuse{footnoterule#1}%
- \vskip\csuse{afterruleX@#1}%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
+ \vskip\csuse{afterruleX@#1}%
\fi%
\else%
- \@nameuse{footnoterule#1}%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
\vskip\csuse{afterruleX@#1}%
\fi%
\splittopskip=\ht\strutbox
@@ -2199,11 +2268,15 @@
\ifparledgroup%
\ifl@dpairing%
\else%
- \@nameuse{footnoterule#1}%
- \vskip\csuse{afterruleX@#1}%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
+ \vskip\csuse{afterruleX@#1}%
\fi%
\else%
- \@nameuse{footnoterule#1}%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
\vskip\csuse{afterruleX@#1}%
\fi%
\splittopskip=\ht\strutbox
@@ -2229,9 +2302,10 @@
\para@footsetupX{#1}}
\newcommand*{\para@footsetupX}[1]{{\csuse{notefontsizeX@#1}
+ \setnotesXwidthliketwocolumns@{#1}%
\dimen0=\baselineskip
\multiply\dimen0 by 1024
- \divide\dimen0 by \hsize \multiply\dimen0 by \footfudgefiddle\relax
+ \divide\dimen0 by \columnwidth \multiply\dimen0 by \footfudgefiddle\relax%
\expandafter
\xdef\csname footfudgefactor#1\endcsname{%
\expandafter\strip@pt\dimen0 }}}
@@ -2248,7 +2322,9 @@
\rightskip=\z@
\parindent=\z@
\vskip\skip\@nameuse{footins#1}%
- \@nameuse{footnoterule#1}%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
\vskip\csuse{afterruleX@#1}%
}
@@ -2298,6 +2374,7 @@
\csuse{notefontsizeX@#1}
\noindent\unhbox0\par}
\newcommand*{\mppara@footgroupX}[1]{{%
+ \setnotesXwidthliketwocolumns@{#1}%
\vskip\skip\@nameuse{mpfootins#1}
\ifl@dpairing\ifparledgroup
\leavevmode%
@@ -2308,12 +2385,16 @@
\ifparledgroup%
\ifl@dpairing%
\else%
- \@nameuse{footnoterule#1}%
- \vskip\csuse{afterruleX@#1}%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
+ \vskip\csuse{afterruleX@#1}%
\fi%
\else%
- \@nameuse{footnoterule#1}%
- \vskip\csuse{afterruleX@#1}%
+ \setnotesXwidthliketwocolumns@{#1}%
+ \setnotesXpositionliketwocolumns@{#1}%
+ \print@footnoteXrule{#1}%
+ \vskip\csuse{afterruleX@#1}%
\fi%
\unvbox\csname mpfootins#1\endcsname
\ifcsstring{raggedX@#1}{L}{\RaggedLeft}{}%
@@ -2323,10 +2404,61 @@
\csuse{notefontsizeX@#1}
\noindent\unhbox0\par}}
+
+\newdimen\old@hsize%
+\old@hsize=\hsize%
+
+\newcommand{\setXnoteswidthliketwocolumns@}[1]{%
+ \global\let\hsize@fornote=\hsize%
+ \old@hsize=\hsize%
+ \iftoggle{Xnoteswidthliketwocolumns@#1}%
+ {%
+ \csuse{setwidthliketwocolumns@\columns@position}%
+ \global\let\hsize@fornote=\hsize%
+ }%
+ {}%
+ \let\hsize=\hsize@fornote%
+ \let\columnwidth=\hsize@fornote%
+}%
+
+\newcommand{\setnotesXwidthliketwocolumns@}[1]{%
+ \global\let\hsize@fornote=\hsize%
+ \old@hsize=\hsize%
+ \iftoggle{notesXwidthliketwocolumns@#1}%
+ {%
+ \csuse{setwidthliketwocolumns@\columns@position}%
+ \global\let\hsize@fornote=\hsize%
+ }%
+ {}%
+ \let\hsize=\hsize@fornote%
+ \let\columnwidth=\hsize@fornote%
+}%
+
+\newcommand{\setXnotespositionliketwocolumns@}[1]{%
+ \iftoggle{Xnoteswidthliketwocolumns@#1}{%
+ \csuse{setnotespositionliketwocolumns@\columns@position}%
+ }{}%
+}%
+
+\newcommand{\setnotesXpositionliketwocolumns@}[1]{%
+ \iftoggle{notesXwidthliketwocolumns@#1}{%
+ \csuse{setnotespositionliketwocolumns@\columns@position}%
+ }{}%
+}%
+
\def\@fnpos{familiar-critical}
\def\@mpfnpos{critical-familiar}
\newcommand{\fnpos}[1]{\xdef\@fnpos{#1}}
\newcommand{\mpfnpos}[1]{\xdef\@mpfnpos{#1}}
+\newcommand{\print@Xfootnoterule}[1]{%
+ \moveleft-\leftskip\vbox{\csuse{#1footnoterule}}%
+ \nointerlineskip%
+}%
+
+\newcommand{\print@footnoteXrule}[1]{%
+ \moveleft-\leftskip\vbox{\csuse{footnoterule#1}}%
+ \nointerlineskip%
+}%
\newcommand*{\doxtrafeeti}{%
\setbox\@outputbox \vbox{%
@@ -2472,6 +2604,8 @@
\csgdef{txtbeforeXnotes@#1}{}
\csgdef{maxhnotesX@#1}{\ledfootinsdim}%
\csgdef{maxhXnotes@#1}{\ledfootinsdim}
+ \newtoggle{Xnoteswidthliketwocolumns@#1}%
+ \newtoggle{notesXwidthliketwocolumns@#1}%
\expandafter\newinsert\csname mpfootins#1\endcsname
\expandafter\newinsert\csname footins#1\endcsname
@@ -2564,8 +2698,17 @@
\listeadd{\new}{\series}
\xdef\@series{\new}
}
-\newcommand{\settoggle@series}[3]{%
- \def\do##1{\global\settoggle{#2@##1}{#3}}
+
+\newcommandx{\settoggle@series}[4][4]{%
+ \def\do##1{%
+ \global\settoggle{#2@##1}{#3}%
+ \ifstrequal{#4}{reload}%
+ {%
+ \csuse{foot\csuse{series@display##1}}{##1}%
+ \csuse{foot\csuse{series@displayX##1}}{##1}%
+ }%
+ {}%
+ }%
\ifstrempty{#1}{%
\dolistloop{\@series}%
}%
@@ -2588,7 +2731,9 @@
}%
}%
\newcommand{\newhookcommand@series}[1]{%
- \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{\csuse{setcommand@series}{##1}{#1}{##2}}%
+ \global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
+ \setcommand@series{##1}{#1}{##2}%
+ }%
}
\newhookcommand@series{Xhangindent}
@@ -2660,7 +2805,7 @@
\newcommand{\newhookcommand@series@reload}[1]{%
\global\expandafter\newcommand\expandafter*\csname #1\endcsname[2][]{%
- \csuse{setcommand@series}{##1}{#1}{##2}[reload]
+ \setcommand@series{##1}{#1}{##2}[reload]%
}%
}
\newhookcommand@series@reload{beforeXnotes}
@@ -2671,7 +2816,9 @@
\newhookcommand@series@reload{maxhXnotes}
\newcommand{\newhooktoggle@series}[1]{%
- \global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{\settoggle@series{##1}{#1}{##2}}%
+ \global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{%
+ \settoggle@series{##1}{#1}{##2}%
+ }%
}
\newhooktoggle@series{numberonlyfirstinline}
\newhooktoggle@series{numberonlyfirstintwolines}
@@ -2681,6 +2828,15 @@
\newhooktoggle@series{nonbreakableafternumber}
\newhooktoggle@series{Xlemmadisablefontselection}
\newhooktoggle@series{Xendlemmadisablefontselection}
+\newcommand{\newhooktoggle@series@reload}[1]{%
+ \global\expandafter\newcommandx\expandafter*\csname #1\endcsname[2][1,2={true},usedefault]{%
+ \settoggle@series{##1}{#1}{##2}[reload]%
+ }%
+}%
+
+\newhooktoggle@series@reload{Xnoteswidthliketwocolumns}%
+\newhooktoggle@series@reload{notesXwidthliketwocolumns}%
+
\newcommand*{\notenumfont}{\normalfont}
\newcommand*{\notefontsetup}{\footnotesize}
\newif\ifledplinenum
@@ -3102,7 +3258,7 @@
\newcommand*{\ledrightnote}[1]{\edtext{}{\l@drsnote{#1}}}
\newcommand*{\ledinnernote}[1]{%
- \ifodd\c@page% Do not use \page@num, because not yet calculated when command is called
+ \ifodd\c@page% Do not use \page@num, because it is not yet calculated when command is called
\ledleftnote{#1}%
\else%
\ledrightnote{#1}%
@@ -3110,7 +3266,7 @@
}
\newcommand*{\ledouternote}[1]{%
- \ifodd\c@page% Do not use \page@num, because not yet calculated when command is called
+ \ifodd\c@page% Do not use \page@num, because it is not yet calculated when command is called
\ledrightnote{#1}%
\else%
\ledleftnote{#1}%
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty
index 862422b411c..63ee57c58e7 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}[2014/08/31 v1.8.3 eledmac extension for parallel texts]%
+\ProvidesPackage{eledpar}[2014/09/16 v1.9.0 eledmac extension for parallel texts]%
\newif\ifshiftedpstarts
\let\shiftedversestrue\shiftedpstartstrue
@@ -31,7 +31,8 @@
\DeclareOption{shiftedverses}{\shiftedpstartstrue}
\DeclareOption{shiftedpstarts}{\shiftedpstartstrue}
\DeclareOption{parledgroup}{\parledgrouptrue}
-\ProcessOptions
+\DeclareOption{widthliketwocolumns}{\widthliketwocolumnstrue}%
+\ProcessOptions%
\l@dpairingfalse
\newif\ifl@dpaging
\l@dpagingfalse
@@ -134,7 +135,8 @@
\led@mess@SectionContinued{\the\section@numR R}%
\line@list@stuffR{\jobname.\extensionchars\the\section@numR R}%
\l@dend@stuff
- \initnumbering@sectcmd
+ \begingroup%
+ \initnumbering@sectcountR%
\else
\led@err@numberingShouldHaveStarted
\endnumberingR
@@ -752,9 +754,14 @@
\l@dpairingtrue
\l@dpagingfalse
\initnumbering@sectcmd
+ \at@begin@pairs%
}{%
\l@dpairingfalse
}
+
+\newcommand{\AtBeginPairs}[1]{\xdef\at@begin@pairs{#1}}%
+\def\at@begin@pairs{}%
+
\newenvironment{pages}{%
\let\oldchapter\chapter
\let\chapter\chapterinpages
@@ -1005,6 +1012,7 @@
\l@dlsn@te %space kept for backward compatibility
{\ledllfill\hb@xt@ \wd\one@line{\do@insidelineLhook\inserthangingsymbolL\new@lineL\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta%
\l@drsn@te}}
+
\def\print@eledsectionL{%
\add@inserts\affixside@note%
\addtocounter{pstartL}{-1}%
@@ -1025,6 +1033,12 @@
\fi%
\vskip\eledsection@correcting@skip%
}
+
+\newcommand*{\dolineLhook}[1]{\gdef\do@lineLhook{#1}}%
+\newcommand*{\dolineRhook}[1]{\gdef\do@lineRhook{#1}}%
+\newcommand*{\doinsidelineLhook}[1]{\gdef\do@insidelineLhook{#1}}%
+\newcommand*{\doinsidelineRhook}[1]{\gdef\do@insidelineRhook{#1}}%
+
\newcommand*{\do@lineLhook}{}
\newcommand*{\do@lineRhook}{}
\newcommand*{\do@insidelineLhook}{}
@@ -1748,10 +1762,46 @@
\ifledRcol \gdef\theledlanguageR{#2}%
\else \gdef\theledlanguageL{#2}%
\fi}%
- \let\l@duselanguage\xpg@set@language%
+ \let\l@duselanguage\select@language%
\gdef\theledlanguageL{\xpg@main@language}%
\gdef\theledlanguageR{\xpg@main@language}%
}}
+\newif\if@pstarts
+\newcommand*{\check@pstarts}{%
+ \@pstartsfalse
+ \ifnum\l@dnumpstartsL>\l@dpscL
+ \@pstartstrue
+ \else
+ \ifnum\l@dnumpstartsR>\l@dpscR
+ \@pstartstrue
+ \fi
+ \fi
+}
+
+\newif\ifaraw@text
+ \araw@textfalse
+\newcommand*{\checkraw@text}{%
+ \araw@textfalse
+ \ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}
+ \araw@texttrue
+ \else
+ \ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}
+ \araw@texttrue
+ \fi
+ \fi
+}
+
+\newcommand*{\@writelinesinparL}{%
+ \edef\next{%
+ \write\linenum@out{\string\@pend[\the\@donereallinesL]}}%
+ \next
+ \global\@donereallinesL \z@}
+\newcommand*{\@writelinesinparR}{%
+ \edef\next{%
+ \write\linenum@outR{\string\@pendR[\the\@donereallinesR]}}%
+ \next
+ \global\@donereallinesR \z@}
+
\newsavebox{\@eledsectionL}%
\newsavebox{\@eledsectionR}%
\newcommand*{\Columns}{%
@@ -1889,41 +1939,78 @@
\newlength{\aftercolumnseparator}%
\setlength{\aftercolumnseparator}{-2pt}%
-\newif\if@pstarts
-\newcommand*{\check@pstarts}{%
- \@pstartsfalse
- \ifnum\l@dnumpstartsL>\l@dpscL
- \@pstartstrue
- \else
- \ifnum\l@dnumpstartsR>\l@dpscR
- \@pstartstrue
- \fi
- \fi
-}
-\newif\ifaraw@text
- \araw@textfalse
-\newcommand*{\checkraw@text}{%
- \araw@textfalse
- \ifvbox\namebox{l@dLcolrawbox\the\l@dpscL}
- \araw@texttrue
- \else
- \ifvbox\namebox{l@dRcolrawbox\the\l@dpscR}
- \araw@texttrue
- \fi
- \fi
-}
+\newcommand{\setwidthliketwocolumns@L}{%
+ \newdimen\temp%
+ \temp=\hsize%
+ \hsize=\Lcolwidth%
+ \advance\hsize\Rcolwidth%
+ \advance\temp-\hsize%
+ \multiply\temp by 2%
+ \divide\temp by 3%
+ \advance\hsize\temp%
+}%
-\newcommand*{\@writelinesinparL}{%
- \edef\next{%
- \write\linenum@out{\string\@pend[\the\@donereallinesL]}}%
- \next
- \global\@donereallinesL \z@}
-\newcommand*{\@writelinesinparR}{%
- \edef\next{%
- \write\linenum@outR{\string\@pendR[\the\@donereallinesR]}}%
- \next
- \global\@donereallinesR \z@}
+\newcommand{\setpositionliketwocolumns@L}{%
+ \renewcommand{\ledrlfill}{\hfill}%
+}%
+
+\newcommand{\setnotespositionliketwocolumns@L}{%
+}%
+
+\newcommand{\setwidthliketwocolumns@C}{%
+ \newdimen\temp%
+ \temp=\hsize%
+ \hsize=\Lcolwidth%
+ \advance\hsize\Rcolwidth%
+ \advance\temp-\hsize%
+ \divide\temp by 2%
+ \advance\hsize\temp%
+}%
+
+\newcommand{\setpositionliketwocolumns@C}{%
+ \doinsidelinehook{\hfill}%
+ \renewcommand{\ledrlfill}{\hfill}%
+}%
+
+\newcommand{\setnotespositionliketwocolumns@C}{%
+ \newdimen\temp%
+ \newdimen\tempa%
+ \temp=\hsize%
+ \tempa=\Lcolwidth%
+ \advance\tempa\Rcolwidth%
+ \advance\temp-\tempa%
+ \divide\temp by 2%
+ \leftskip=\temp%
+ \rightskip=-\temp%
+}%
+
+\newcommand{\setwidthliketwocolumns@R}{%
+ \newdimen\temp%
+ \temp=\hsize%
+ \hsize=\Lcolwidth%
+ \advance\hsize\Rcolwidth%
+ \advance\temp-\hsize%
+ \multiply\temp by 2%
+ \divide\temp by 3%
+ \advance\hsize\temp%
+}%
+
+\newcommand{\setpositionliketwocolumns@R}{%
+ \doinsidelinehook{\hfill}%
+}%
+
+\newcommand{\setnotespositionliketwocolumns@R}{%
+ \newdimen\temp%
+ \newdimen\tempa%
+ \temp=\hsize%
+ \tempa=\Lcolwidth%
+ \advance\tempa\Rcolwidth%
+ \advance\temp-\tempa%
+ \divide\temp by 2%
+ \leftskip=\temp%
+ \rightskip=-\temp%
+}%
\newcount\numpagelinesL
\newcount\numpagelinesR