summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-14 23:11:36 +0000
committerKarl Berry <karl@freefriends.org>2013-07-14 23:11:36 +0000
commitba2df729135f3be63bba7fe73342e971a82cb7c4 (patch)
treeaf696e6f64339fd6cd8dad9d67e9b041ca3ce236 /Master/texmf-dist/tex/latex
parent045c6c5eb9ed75f69c24d2b8b227b71899a69be2 (diff)
eledmac (14jul13)
git-svn-id: svn://tug.org/texlive/trunk@31193 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/eledmac/eledmac.sty104
-rw-r--r--Master/texmf-dist/tex/latex/eledmac/eledpar.sty8
2 files changed, 90 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
index fa13d48314c..96cc735df4d 100644
--- a/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
+++ b/Master/texmf-dist/tex/latex/eledmac/eledmac.sty
@@ -24,7 +24,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledmac}[2013/07/10 v1.4.9 LaTeX port of EDMAC]
+\ProvidesPackage{eledmac}[2013/07/11 v1.5 LaTeX port of EDMAC]
\newif\ifledfinal
\newif\ifparapparatus@
\newif\ifnoquotation@
@@ -40,6 +40,7 @@
\RequirePackage{etoolbox}
\reserveinserts{32}
\RequirePackage{suffix}
+\RequirePackage{xstring}
\RequirePackage{ifluatex}
\ifcsdef{if@RTL}{}{\newif\if@RTL}
\ifledfinal
@@ -54,6 +55,8 @@
\newif\ifl@dmemoir
\@ifclassloaded{memoir}{\l@dmemoirtrue}{\l@dmemoirfalse}
+\newif\ifl@imakeidx
+\@ifpackageloaded{imakeidx}{\l@imakeidxtrue}{\l@imakeidxfalse}
\newcommand{\eledmac@warning}[1]{\PackageWarning{eledmac}{#1}}
\newcommand{\eledmac@error}[2]{\PackageError{eledmac}{#1}{#2}}
\newcommand*{\led@err@NumberingStarted}{%
@@ -980,12 +983,13 @@
\fi
\affixline@num
\affixpstart@num
- \hb@xt@ \linewidth{\inserthangingsymbol\l@dld@ta\add@inserts\affixside@note
+ \hb@xt@ \linewidth{\do@insidelinehook\inserthangingsymbol\l@dld@ta\add@inserts\affixside@note
\l@dlsn@te
{\ledllfill\hb@xt@ \wd\one@line{\new@line\l@dunhbox@line{\one@line}}\ledrlfill\l@drd@ta%
\l@drsn@te
}}}%
\newcommand*{\do@linehook}{}
+\newcommand*{\do@insidelinehook}{}
\newcommand*{\l@demptyd@ta}{%
\gdef\l@dld@ta{}%
\gdef\l@drd@ta{}%
@@ -2212,7 +2216,8 @@
{}%
{\footnotelang@poly[R]}%
\footnoteoptions@[R]{##1}{true}%
- \xright@appenditem{\noexpand\csuse{v#1footnote}{#1}%
+ \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}%
+\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@listR
\footnoteoptions@[R]{##1}{false}%
\global\advance\insert@countR \@ne%
@@ -2224,7 +2229,8 @@
{}%
{\footnotelang@poly}%
\footnoteoptions@{##1}{true}%
- \xright@appenditem{\noexpand\csuse{v#1footnote}{#1}%
+ \xright@appenditem{\noexpand\prepare@edindex@fornote{\l@d@nums}%
+\noexpand\csuse{v#1footnote}{#1}%
{{\l@d@nums}{\csexpandonce{@tag}}{\csexpandonce{content}}}}\to\inserts@list
\global\advance\insert@count \@ne%
\footnoteoptions@{##1}{false}%
@@ -2512,6 +2518,7 @@
\m@m@makecoltext
\global \maxdepth \@maxdepth}
+\AtBeginDocument{\@ifpackageloaded{footmisc}{}{\newif\ifFN@bottom}}
\newcommand*{\l@ddofootinsert}{%
%%% \page@start
\ifvoid\footins
@@ -2521,7 +2528,7 @@
\boxmaxdepth \@maxdepth
\@tempdima\dp\@cclv
\unvbox \@cclv
- \vskip \skip\footins
+ \ifFN@bottom\vfill\fi\vskip \skip\footins%%% If the option bottom of loadmisc package is loaded
\color@begingroup
\normalcolor
\footnoterule
@@ -3034,7 +3041,16 @@
\newcommand{\thepageline}{%
\thepage\pagelinesep\lineref{\edindexlab\thelabidx}}
-
+\newcommand{\thestartpageline}{\l@dparsedstartpage\pagelinesep\l@dparsedstartline}
+\newcommand{\theendpageline}{\l@dparsedendpage\pagelinesep\l@dparsedendline}
+\newif\if@edindex@fornote@
+\newcommand{\prepare@edindex@fornote}[1]{%
+ \l@dp@rsefootspec#1|%
+ \@edindex@fornote@true
+}
+\def\get@index@command#1|#2{\gdef\@index@command{#2}\gdef\@index@txt{#1}}
+\newcommand{\ledinnote}[2]{\csuse{#1}{#2\emph{n}}}
+\newcommand{\ledinnotehyperpage}[2]{\csuse{#1}{\hyperpage{#2}\emph{n}}}
\@ifclassloaded{memoir}{%
\g@addto@macro{\makememindexhook}{%
\def\edindex{\@bsphack%
@@ -3057,31 +3073,73 @@
\def\l@d@@wrindexhyp#1|#2|#3\\{%
\ifshowindexmark\@showidx{#1}\fi
\ifx\\#2\\%
- \protected@write\@auxout{}%
- {\string\@@wrindexm@m{\@idxfile}{#1|hyperpage}{\thepageline}}%
+ \if@edindex@fornote@%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|(ledinnotehyperpage}{\thestartpageline}}%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|)ledinnotehyperpage}{\theendpageline}}%
+ \else%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|hyperpage}{\thepageline}}%
+ \fi%
\else
\def\Hy@temp@A{#2}%
\ifx\Hy@temp@A\HyInd@ParenLeft
- \protected@write\@auxout{}%
- {\string\@@wrindexm@m{\@idxfile}{#1|#2hyperpage}{\thepageline}}%
+ \if@edindex@fornote@%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|(ledinnotehyperpage{#2}}{\thestartpageline}}%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|)ledinnotehyperpage{#2}}{\theendpageline}}%
+ \else%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|#2hyperpage}{\thepageline}}%
+ \fi%
\else
- \protected@write\@auxout{}%
- {\string\@@wrindexm@m{\@idxfile}{#1|#2}{\thepageline}}%
+ \if@edindex@fornote@%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|(ledinnote{#2}}{\thestartpageline}}%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|)ledinnote{#2}}{\theendpageline}}%
+ \else%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|#2}{\thepageline}}%
+ \fi%
\fi
\fi
\endgroup
\@esphack}
}{%
- \g@addto@macro{\makeindex}{%
+ \pretocmd{\makeindex}{%
\def\edindex{\@bsphack
\doedindexlabel
\begingroup
\@sanitize
- \@wredindex}}
+ \@wredindex}}{}{}
\newcommand{\edindex}[1]{\@bsphack\@esphack}
- \newcommand{\@wredindex}[1]{%
- \protected@write\@indexfile{}%
- {\string\indexentry{#1}{\thepageline}}%
+ \newcommandx{\@wredindex}[2][1=\jobname,usedefault]{%#1 = the index name, #2 = the text
+ \ifl@imakeidx%
+ \if@edindex@fornote@%
+ \IfSubStr[1]{#2}{|}{\get@index@command#2}{\get@index@command#2|}%
+ \expandafter\imki@wrindexentry{#1}{\@index@txt|(ledinnote{\@index@command}}{\thestartpageline}%
+ \expandafter\imki@wrindexentry{#1}{\@index@txt|)ledinnote{\@index@command}}{\theendpageline}%
+ \else%
+ \imki@wrindexentry{#1}{#2}{\thepageline}%
+ \fi%
+ \else%
+ \if@edindex@fornote@%
+ \IfSubStr[1]{#2}{|}{\get@index@command#2}{\get@index@command#2|}%
+ \expandafter\protected@write\@indexfile{}%
+ {\string\indexentry{\@index@txt|(ledinnote{\@index@command}}{\thestartpageline}
+ }%
+ \expandafter\protected@write\@indexfile{}%
+ {\string\indexentry{\@index@txt|)ledinnote{\@index@command}}{\theendpageline}
+ }%
+ \else%
+ \protected@write\@indexfile{}%
+ {\string\indexentry{#2}{\thepageline}
+ }%
+ \fi%
+ \fi%
\endgroup
\@esphack}
}
@@ -3089,8 +3147,16 @@
\AtBeginDocument{\@ifpackageloaded{hyperref}{}{%
\def\l@d@@wrindexhyp#1||\\{%
\ifshowindexmark\@showidx{#1}\fi
- \protected@write\@auxout{}%
- {\string\@@wrindexm@m{\@idxfile}{#1}{\thepageline}}%
+ \IfSubStr[1]{#1}{|}{\get@index@command#1}{\get@index@command#1|}%
+ \if@edindex@fornote@%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{\@index@txt|(ledinnote{\@index@command}}{\thestartpageline}}%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{\@index@txt|)ledinnote{\@index@command}}{\theendpageline}}%
+ \else%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1}{\thepageline}}%
+ \fi%
\endgroup
\@esphack}}}
diff --git a/Master/texmf-dist/tex/latex/eledmac/eledpar.sty b/Master/texmf-dist/tex/latex/eledmac/eledpar.sty
index 4ceb2e8c41a..61a56ae8df0 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/07/10 v1.3.5 eledmac extension for parallel texts]
+\ProvidesPackage{eledpar}[2013/07/11 v1.4 eledmac extension for parallel texts]
\newif\ifshiftedpstarts
\let\shiftedversestrue\shiftedpstartstrue
@@ -951,7 +951,7 @@
\add@inserts
\affixside@note
\l@dlsn@te
- {\ledllfill\hb@xt@ \wd\one@line{\inserthangingsymbolL\new@line\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta%
+ {\ledllfill\hb@xt@ \wd\one@line{\do@insidelineLhook\inserthangingsymbolL\new@line\l@dunhbox@line{\one@line}}\correcthangingL\ledrlfill\l@drd@ta%
\l@drsn@te
}}%
\add@penaltiesL
@@ -964,6 +964,8 @@
\newcommand*{\do@lineLhook}{}
\newcommand*{\do@lineRhook}{}
+\newcommand*{\do@insidelineLhook}{}
+\newcommand*{\do@insidelineRhook}{}
\newcommand*{\do@lineR}{%
\advance\countRline \@ne
@@ -985,7 +987,7 @@
\add@insertsR
\affixside@noteR
\l@dlsn@te
- {\correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{\inserthangingsymbolR\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta%
+ {\correcthangingR\ledllfill\hb@xt@ \wd\one@lineR{\do@insidelineRhook\inserthangingsymbolR\new@lineR\l@dunhbox@line{\one@lineR}}\ledrlfill\l@drd@ta%
\l@drsn@te
}}%
\add@penaltiesR