summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-08 22:55:22 +0000
committerKarl Berry <karl@freefriends.org>2015-08-08 22:55:22 +0000
commit2c4e39a47e58aca19e393283377c93378cc0e1bc (patch)
tree0a248b7a2eacba78e89f808de94d6fb9bdb44583 /Master/texmf-dist/tex/latex
parent194127387a006f30c0dc7692e54f55ddc94a2434 (diff)
reledmac (8aug15)
git-svn-id: svn://tug.org/texlive/trunk@38081 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty124
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledpar.sty14
2 files changed, 109 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index 15056105b40..522365c6c2d 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
@@ -33,14 +33,10 @@
- \newcommand{\numberit}{%
- \refstepcounter{stanzanum}%
- \flagstanza{\thestanzanum}%
- }
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2015/07/27 v2.0.1 typesset critical edition]%
+\ProvidesPackage{reledmac}[2015/08/08 v2.1.0 typesset critical edition]%
\RequirePackage{xkeyval}
\newif\ifparledgroup
\DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}}
@@ -243,10 +239,10 @@
\reledmac@error{Xfootnote without edtext. Check syntax.}{\@ehc}%
}%
\newcommand{\led@error@ImakeidxAfterEledmac}{%
- \reledmac@error{Imakeidx must be loaded before eledmac.}{\@ehc}%
+ \reledmac@error{Imakeidx must be loaded before reledmac.}{\@ehc}%
}%
\newcommand{\led@error@IndextoolsAfterEledmac}{%
- \reledmac@error{Indextools must be loaded before eledmac.}{\@ehc}%
+ \reledmac@error{Indextools must be loaded before reledmac.}{\@ehc}%
}%
\newcommand{\led@error@fail@patch@@makecol}{%
\reledmac@error{Fail to patch \string\@makecol\space command.}{\@ehc}%
@@ -1111,13 +1107,14 @@
\fi
\ifdim\dimen0>0pt \hskip\dimen0 \fi}
-\newcommand*{\advanceline}[1]{%
+\newcommand*{\advanceline}[1]{\leavevmode%
\ifledRcol \write\linenum@outR{\string\@adv[#1]}%
\else \write\linenum@out{\string\@adv[#1]}%
\fi%
}
\newcommand*{\setline}[1]{%
+ \leavevmode%
\ifnum#1<\z@
\led@warn@BadSetline
\else
@@ -2036,8 +2033,8 @@
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnote}[2]{%
\insert\csname #1footins\endcsname\bgroup
- \csuse{Xbhooknote@#1}
- \csuse{Xnotefontsize@#1}
+ \noindent\csuse{Xbhooknote@#1}%
+ \csuse{Xnotefontsize@#1}%
\footsplitskips
\ifl@dpairing\ifl@dpaging\else%
\setXnoteswidthliketwocolumns@{#1}%
@@ -2048,8 +2045,8 @@
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\mpnormalvfootnote}[2]{%
\global\setbox\@nameuse{mp#1footins}\vbox{%
\unvbox\@nameuse{mp#1footins}
- \csuse{Xbhooknote@#1}
- \csuse{Xnotefontsize@#1}
+ \noindent\csuse{Xbhooknote@#1}%
+ \csuse{Xnotefontsize@#1}%
\hsize\columnwidth
\@parboxrestore
\color@begingroup
@@ -2165,11 +2162,11 @@
\newcommand*{\paravfootnote}[2]{%
\insert\csname #1footins\endcsname
\bgroup
- \csuse{Xbhooknote@#1}
\csuse{Xnotefontsize@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
- \noindent\csname #1footfmt\endcsname #2{#1}}%
+ \noindent\csuse{Xbhooknote@#1}%
+ \csname #1footfmt\endcsname #2{#1}}%
\setbox0=\hbox{\Xunvxh{0}{#1}}%
\dp0=0pt
\ht0=\csname #1footfudgefactor\endcsname\wd0
@@ -2180,11 +2177,12 @@
\newcommand*{\mpparavfootnote}[2]{%
\global\setbox\@nameuse{mp#1footins}\vbox{%
\unvbox\@nameuse{mp#1footins}%
- \csuse{Xbhooknote@#1}
\csuse{Xnotefontsize@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
- \noindent\color@begingroup\csname #1footfmt\endcsname #2{#1}\color@endgroup}%
+ \noindent\color@begingroup%
+ \csuse{Xbhooknote@#1}%
+ \csname #1footfmt\endcsname #2{#1}\color@endgroup}%
\setbox0=\hbox{\Xunvxh{0}{#1}}%
\dp0=\z@
\ht0=\csname #1footfudgefactor\endcsname\wd0
@@ -2538,6 +2536,12 @@
(togl{Xpstart@#2} and bool{numberpstart})%
or togl{Xpstarteverytime@#2}}%
{\printpstart}{}%
+ \iftoggle{Xstanza@#2}{%
+ \ifnumberstanza%
+ \printstanza%
+ \csuse{Xstanzaseparator@#2}%
+ \fi%
+ }{}%
\iftoggle{Xonlypstart@#2}{}{\printlines#1|}%
}%
\newcommand{\printXbeforenumber}[1]{%
@@ -2772,8 +2776,8 @@
\hbox{\textsuperscript{\normalfont\@nameuse{@thefnmark#1}}}}
\notbool{parapparatus@}{\newcommand*}{\newcommand}{\normalvfootnoteX}[2]{%
\insert\@nameuse{footins#1}\bgroup
- \csuse{bhooknoteX@#1}
- \csuse{notefontsizeX@#1}
+ \noindent\csuse{bhooknoteX@#1}%
+ \csuse{notefontsizeX@#1}%
\footsplitskips
\ifl@dpairing\ifl@dpaging\else%
\setnoteswidthliketwocolumnsX@{#1}%
@@ -2785,8 +2789,8 @@
\newcommand*{\mpnormalvfootnoteX}[2]{%
\global\setbox\@nameuse{mpfootins#1}\vbox{%
\unvbox\@nameuse{mpfootins#1}
- \csuse{bhooknoteX@#1}
- \csuse{notefontsizeX@#1}
+ \noindent\csuse{bhooknoteX@#1}%
+ \csuse{notefontsizeX@#1}%
\hsize\columnwidth
\@parboxrestore
\color@begingroup
@@ -3127,11 +3131,11 @@
\newcommand*{\para@vfootnoteX}[2]{%
\insert\csname footins#1\endcsname
\bgroup
- \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
- \noindent\@nameuse{footfmt#1}{#1}{#2}}%
+ \noindent\csuse{bhooknoteX@#1}%
+ \@nameuse{footfmt#1}{#1}{#2}}%
\setbox0=\hbox{\unvxhX{0}{#1}}%
\dp0=\z@
\ht0=\csname footfudgefactor#1\endcsname\wd0
@@ -3141,11 +3145,12 @@
\newcommand*{\mppara@vfootnoteX}[2]{%
\global\setbox\@nameuse{mpfootins#1}\vbox{%
\unvbox\@nameuse{mpfootins#1}
- \csuse{bhooknoteX@#1}
\csuse{notefontsizeX@#1}
\footsplitskips
\setbox0=\vbox{\hsize=\maxdimen
- \noindent\color@begingroup\@nameuse{footfmt#1}{#1}{#2}\color@endgroup}%
+ \noindent\color@begingroup%
+ \csuse{bhooknoteX@#1}%
+ \@nameuse{footfmt#1}{#1}{#2}\color@endgroup}%
\setbox0=\hbox{\unvxhX{0}{#1}}%
\dp0=\z@
\ht0=\csname footfudgefactor#1\endcsname\wd0
@@ -3583,6 +3588,8 @@
\newtoggle{Xonlypstart@#1}%
\newtoggle{Xpstarteverytime@#1}%
\newtoggle{Xpstart@#1}%
+ \newtoggle{Xstanza@#1}%
+ \csgdef{Xstanzaseparator@#1}{}%
\csgdef{Xsymlinenum@#1}{}%
\newtoggle{Xnonumber@#1}%
\csgdef{Xbeforenumber@#1}{0pt}%
@@ -3623,6 +3630,7 @@
\noexpand\prepare@preXnotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
\unexpanded{\def\sw@list@inedtext}{\expandafter\unexpanded\expandafter{\sw@inthisedtext}}%The value of the \sw@inthisedtext of current \edtext will be pushed to \sw@list@inedtext when the notes are expanded.
+ \noexpand\setcounter{stanzaR}{\the\c@stanzaR}%Save stanzaR counter for footnote
\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
}\to\inserts@listR
@@ -3640,6 +3648,9 @@
\noexpand\prepare@preXnotes{#1}%
\noexpand\prepare@edindex@fornote{\l@d@nums}%
\unexpanded{\def\sw@list@inedtext}{\expandafter\unexpanded\expandafter{\sw@inthisedtext}}%The value of the \sw@inthisedtext of current edtext will be pushed to \sw@list@inedtext when the notes are expanded.
+ \ifl@dpairing%
+ \noexpand\setcounter{stanzaL}{\the\c@stanzaL}%Save stanzaR counter for footnote
+ \fi%
\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\expandonce\@tag}{\expandonce\content}}%
}\to\inserts@list
@@ -3882,6 +3893,10 @@
\newhooktoggle@series{Xnonumber}
\newhooktoggle@series{Xpstart}
\newhooktoggle@series{Xpstarteverytime}%
+
+ \newhooktoggle@series{Xstanza}%
+ \newhookcommand@series{Xstanzaseparator}%
+
\newhooktoggle@series{Xonlypstart}
\newhooktoggle@series{Xnonbreakableafternumber}
\newhooktoggle@series{Xlemmadisablefontselection}
@@ -4981,6 +4996,52 @@
\fi%
\ignorespaces%
}%
+\newcounter{stanza}
+\renewcommand{\thestanza}{%
+ \textbf{\arabic{stanza}}%
+}
+\newif\ifnumberstanza%
+\newcommand{\@insertstanzanumber}[0]{%
+ \ifnumberstanza%
+ \ifl@dpairing%
+ \ifledRcol%
+ \stanzanumwrapper{\thestanzaR}%
+ \else%
+ \stanzanumwrapper{\thestanzaL}%
+ \fi%
+ \else%
+ \stanzanumwrapper{\thestanza}%
+ \fi%
+ \setline{1}%
+ \fi%
+}%
+\newcommand{\@advancestanzanumber}[0]{%
+ \ifnumberstanza%
+ \ifl@dpairing%
+ \ifledRcol%
+ \addtocounter{stanzaR}{1}%
+ \else%
+ \addtocounter{stanzaL}{1}%
+ \fi%
+ \else%
+ \addtocounter{stanza}{1}%
+ \fi%
+ \fi%
+}%
+\newcommand{\stanzanumwrapper}[1]{%
+ \flagstanza{#1}%
+}%
+\newcommand{\printstanza}[0]{%
+ \ifboolexpr{bool{l@dpairing} or bool{l@dprintingpages} or bool{l@dprintingcolumns}}{%
+ \ifledRcol@%
+ \thestanzaR%
+ \else%
+ \thestanzaL%
+ \fi%
+ }{%
+ \thestanza%
+ }%
+}
\newcommandx{\stanza@line}[1][1]{
\ifnum\value{stanzaindentsrepetition}=0
@@ -5013,7 +5074,8 @@
\def\noexpand&{%
\noexpand\newverse[][]}%
\def\noexpand\&{\noexpand\@stopstanza}%
- \noexpand\stanza@line[#1]}
+ \noexpand\@advancestanzanumber%
+ \noexpand\stanza@line[#1]\noexpand\@insertstanzanumber}
\newcommandx{\stanza}[1][1,usedefault]{\@startstanza[#1]}
@@ -5835,13 +5897,23 @@
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{%
\if@eled@sectioning\else%
\ifl@dprintingpages\else%
- \if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \eledsection: will keep critical notes from printing on the title page.
+ \if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \Pages: will keep critical notes from printing on the title page. Here for classical classes
\fi%
\fi%
}%
{}%
{}%
+\patchcmd{\scr@startchapter}{\if@openright\cleardoublepage\else\clearpage\fi}{%
+ \if@eled@sectioning\else%
+ \ifl@dprintingpages\else%
+ \if@openright\cleardoublepage\else\clearpage\fi%No clearpage inside a \Pages: will keep critical notes from printing on the title page. Here for scrbook.
+ \fi%
+ \fi%
+ }
+ {}
+ {}
+
\patchcmd{\@makechapterhead}
{#1}
{\print@leftmargin@eledsection%
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
index 48b3141179c..ad14fe8e176 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledpar.sty
@@ -28,7 +28,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledpar}[2015/07/27 v2.1.0 reledmac extension for parallel texts]%
+\ProvidesPackage{reledpar}[2015/08/08 v2.2.0 reledmac extension for parallel texts]%
\RequirePackage{xspace}%
\RequirePackage{xkeyval}
@@ -1465,7 +1465,7 @@
\chardef\next=\catcode`\&
\catcode`\&=\active
-\newenvironment{astanza}{%
+\newenvironment{astanza}[1][]{%
\catcode`\&\active
\global\stanza@count\@ne\stanza@modulo\@ne
\ifnum\usenamecount{sza@0@}=\z@
@@ -1483,7 +1483,7 @@
\global\advance\stanza@count\@ne
\@astanza@line}%
\def\&{\@stopastanza}%
- \pstart
+ \pstart[#1]%
\@astanza@line
}{}
@@ -1506,6 +1506,14 @@
\catcode`\&=\next
+\newcounter{stanzaL}
+\newcounter{stanzaR}
+\renewcommand{\thestanzaL}{%
+ \textbf{\arabic{stanzaL}}%
+}
+\renewcommand{\thestanzaR}{%
+ \textbf{\arabic{stanzaR}}%
+}
\providecommand*{\newnamebox}[1]{%
\expandafter\newbox\csname #1\endcsname}
\providecommand*{\setnamebox}[1]{%