summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/reledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-05 23:11:45 +0000
committerKarl Berry <karl@freefriends.org>2017-06-05 23:11:45 +0000
commit2f0fbea27b80ff89c321ef2771e588f1cd688516 (patch)
treeed5718982329bc0ba86615fbc4f93975c162052a /Master/texmf-dist/tex/latex/reledmac
parentb24122a971cddb2ecf9c75a917ffbf9cef30c492 (diff)
reledmac (5jun17)
git-svn-id: svn://tug.org/texlive/trunk@44473 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/reledmac')
-rw-r--r--Master/texmf-dist/tex/latex/reledmac/reledmac.sty35
1 files changed, 27 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
index bcbc5f2f06f..b2765feb369 100644
--- a/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
+++ b/Master/texmf-dist/tex/latex/reledmac/reledmac.sty
@@ -35,7 +35,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2017/05/04 v2.20.0 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2017/06/04 v2.21.0 typesetting critical editions]%
\RequirePackage{xkeyval}
\newif\ifparledgroup
\DeclareOptionX{series}[A,B,C,D,E]{\xdef\default@series{#1}}
@@ -1402,6 +1402,7 @@
\let\setline=\@gobble \let\advanceline=\@gobble
\let\sameword\sameword@inedtext%
\let\edtext=\dummy@edtext
+ \let\edindex\dummy@edindex%
\l@dtabnoexpands
\morenoexpands}
\let\morenoexpands=\relax
@@ -1533,11 +1534,14 @@
\newcommand{\l@d@add}[1]{\xdef\l@d@nums{\l@d@nums#1}}
\newcommand{\get@sw@txt}[1]{%
- \ifxetex%
- \xdef\sw@txt{#1}%
- \else%
- \expandafter\xdef\expandafter\sw@txt\expandafter{\detokenize{#1}}%
- \fi%
+ \begingroup%
+ \let\sameword\@firstofone%Allow to have nested \sameword
+ \ifxetex%
+ \xdef\sw@txt{#1}%
+ \else%
+ \expandafter\xdef\expandafter\sw@txt\expandafter{\detokenize{#1}}%
+ \fi%
+ \endgroup%
}%
\newcommandx{\sameword}[2][1,usedefault]{%
\leavevmode%
@@ -6400,9 +6404,23 @@
\newcommand{\ledinnotehyperpage}[2]{\csuse{#1}{\ledinnotemark{\hyperpage{#2}}}}%
\newcommand{\ledinnotemark}[1]{#1\emph{n}}%
\newcommandx{\@wredindex}[2][1=\expandonce\jobname,usedefault]{%#1 = the index name, #2 = the text
+ \begingroup%
+ \let\emph\@firstofone%
+ \let\textbf\@firstofone%
+ \let\textit\@firstofone%
+ \let\textmd\@firstofone%
+ \let\textnormal\@firstofone%
+ \let\textrm\@firstofone%
+ \let\textsc\@firstofone%
+ \let\textsf\@firstofone%
+ \let\textsl\@firstofone%
+ \let\texttt\@firstofone%
+ \let\textup\@firstofone%
+ \xdef\@tmp{#2}%To be used in IfSubStr instead of #2 directly. Avoid some expansion bugs (for example with \edindex{textsc{something}})
+ \endgroup%
\ifl@imakeidx%
\ifnum\@edindex@fornote@>\z@%
- \IfSubStr[1]{#2}{|}{\get@index@command#2+}{\get@index@command#2|+}%
+ \IfSubStr[1]{\@tmp}{|}{\get@index@command#2+}{\get@index@command#2|+}%
\get@edindex@ledinnote@command%
\expandafter\imki@wrindexentry{#1}{\@index@txt|(\@ledinnote@command}{\thestartpageline}%
\expandafter\imki@wrindexentry{#1}{\@index@txt|)\@ledinnote@command}{\theendpageline}%
@@ -6412,7 +6430,7 @@
\fi%
\else%
\ifnum\@edindex@fornote@>\z@%
- \IfSubStr[1]{#2}{|}{\get@index@command#2+}{\get@index@command#2|+}%
+ \IfSubStr[1]{\@tmp}{|}{\get@index@command#2+}{\get@index@command#2|+}%
\get@edindex@ledinnote@command%
\expandafter\protected@write\@indexfile{}%
{\string\indexentry{\@index@txt|(\@ledinnote@command}{\thestartpageline}
@@ -6447,6 +6465,7 @@
{}%
{\led@error@fail@patch@makeindex}%
\newcommand{\edindex}[1]{\@bsphack\@esphack}
+\newcommandx{\dummy@edindex}[2][1=\expandonce\jobname,usedefault]{}%
\newcommand{\hyperlinkformat}[3]{%
\ifstrempty{#1}%
{\hyperlink{#2}{#3}}%