summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
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/source/latex
parentb24122a971cddb2ecf9c75a917ffbf9cef30c492 (diff)
reledmac (5jun17)
git-svn-id: svn://tug.org/texlive/trunk@44473 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/migration.dtx1
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx98
2 files changed, 89 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/migration.dtx b/Master/texmf-dist/source/latex/reledmac/migration.dtx
index c751e47227a..a4574afc430 100644
--- a/Master/texmf-dist/source/latex/reledmac/migration.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/migration.dtx
@@ -37,6 +37,7 @@
\usepackage[english]{babel}
\usepackage{xspace}
\usepackage{graphicx,metalogo}
+\usepackage{csquotes}
\renewcommand{\MakeUppercase}[1]{#1}
\pagestyle{headings}
\setcounter{StandardModuleDepth}{1}
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index 4c760d334e7..fb5cf076d18 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -472,6 +472,9 @@
% \changes{v2.20.0}{2017/05/04}{Add \protect\cs{AtStartEveryStanza}, \protect\cs{BeforeEveryStopStanza}, \protect\cs{AtEndEveryPend}, \protect\cs{AtStartEveryPstart}.}
% \changes{v2.20.0}{2017/05/04}{Add second optional argument of \protect\cs{pstart}, \protect\cs{pend} and \protect\cs{stanza}.}
% \changes{v2.20.0}{2017/05/04}{Add third and fourth optional argument of \protect\cs{newverse}.}
+% \changes{v2.21.0}{2017/06/04}{Fix bug when using formatting command in the argument of \protect\cs{edindex} inside \protect\cs{edtext}.}
+% \changes{v2.21.0}{2017/06/04}{Now, as explained in the handbook, an \protect\cs{edindex} inside \protect\cs{edtext} index only for main text, and not for critical footnotes.}
+% \changes{v2.21.0}{2017/06/04}{Add the possibility of nested \protect\cs{sameword}.}
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
%
@@ -1673,6 +1676,59 @@
% \endnumbering
% \egend
%
+% \subsubsection{Sameword for a group of words}
+% Sometime, a group of words, and not only a single word, occurs multiple times.
+% In this case, you have two solutions.
+%
+% First, you can consider only individual words, and not groups of word.
+% See this example:
+% \begin{verbatim}
+%\sameword{per} \sameword{causam}
+%tamen scire
+%\edtext{\sameword{causam}}{\Bfootnote{fnote}}
+%est
+%\edtext{\sameword{per} \sameword{causam}}{\Bfootnote{causam rei B}}
+%cognoscere
+%\edtext{\sameword{causam}}{\Bfootnote{fnote}}
+% \end{verbatim}
+% \begin{ledgroup}
+% \beginnumbering
+% \pstart
+%\sameword{per} \sameword{causam}
+%tamen scire
+%\edtext{\sameword{causam}}{\Bfootnote{fnote}}
+%est
+%\edtext{\sameword{per} \sameword{causam}}{\Bfootnote{causam rei B}}
+%cognoscere
+%\edtext{\sameword{causam}}{\Bfootnote{fnote}}
+% \pend
+% \endnumbering
+% \end{ledgroup}
+% Here, there no ambiguity about which \enquote{per causam} we speak.
+%
+% However, we may consider that as \enquote{per causam} is the lemma of the second note, there should be only one number for the whole lemma.
+% In this case we can mark all the \enquote{per causam} groups.
+% But as \enquote{causam} is also called as lemma in note~1 and ~3, we need to use nested \cs{sameword}.
+% Consequently, we need to use \cs{lemma} for the \cs{edtext} linked to \enquote{per causam}, as we don't want to have number for individual word.
+%
+% \begin{verbatim}
+%\sameword{per \sameword{causam}} tamen scire
+%\edtext{\sameword{causam}}{\Bfootnote{fnote}} est
+%\edtext{\sameword[1]{per \sameword{causam}}}{\lemma{\sameword{per causam}}\Bfootnote{causam rei B}} cognoscere
+%\edtext{\sameword{causam}}{\Bfootnote{fnote}}
+% \end{verbatim}
+% \begin{ledgroup}
+%\beginnumbering
+%\pstart
+%\sameword{per \sameword{causam}} tamen scire
+%\edtext{\sameword{causam}}{\Bfootnote{fnote}} est
+%\edtext{\sameword[1]{per \sameword{causam}}}%
+% {\lemma{\sameword{per causam}}\Bfootnote{causam rei B}}
+% cognoscere
+%\edtext{\sameword{causam}}{\Bfootnote{fnote}}
+%\pend
+%\endnumbering
+% \end{ledgroup}
% \subsubsection{Customizing}
% \DescribeMacro{\showwordrank}You can redefine the \protect\cs{showwordrank} macro to change the way the number is printed. The default value is
% \begin{verbatim}
@@ -2615,6 +2671,8 @@
% is ended by an ampersand (\verb+&+), and the stanza itself is ended
% by putting \verb?\&? at the end of the last line.
%
+% If you need to add brackets directly after \verb?\stanza?, \verb+&+ or \verb?\&?, add \cs{norelax}, as in other case the brackets will be interpreted as delimitation for optional argument (cf.~\reff{contentverse})
+%
%
% \subsection{Define stanza indents}
% \DescribeMacro{\stanzaindentbase}
@@ -3939,7 +3997,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2017/05/04 v2.20.0 typesetting critical editions]%
+\ProvidesPackage{reledmac}[2017/06/04 v2.21.0 typesetting critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -7229,6 +7287,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
@@ -7652,7 +7711,7 @@
% } (E)
%
% In this example, all lemma information for \protect\cs{edtext} is framed. The text in parenthesis is the content of critical notes associated to the preceding frame.
-% As you can see, we have two level of \protect\cs{edtext}.
+% As you can see, we have two levels of \protect\cs{edtext}.
%
%The list for \protect\cs{edtext}s of level~1 is $\{\{1,2,2,3,4,3\},\{5,4\}\}$.
%
@@ -7689,11 +7748,14 @@
% we detokenize only for non-\XeTeX engines. In any case, in \XeTeX a \protect\cs{csname} construction can contain UTF-8 characters without a problem, as UTF-8 characters are not managed with category codes, but instead read directly as UTF-8 characters.
% \begin{macrocode}
\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%
}%
% \end{macrocode}
% \end{macro}
@@ -16292,12 +16354,27 @@
% \changes{v1.12.0}{2014/08/05}{Use correctly default index when \protect\package{imakeidx} is loaded.}
% \changes{v1.14.0}{2014/10/27}{Let eledmac take advantage of imakeidx even when memoir class is used}
% \begin{macro}{\@wredindex}
+% \begin{macro}{\dummy@edindex}
% Write the index information to the \file{idx} file.
% \begin{macrocode}
\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}%
@@ -16307,7 +16384,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}
@@ -16346,10 +16423,11 @@
{}%
{\led@error@fail@patch@makeindex}%
\newcommand{\edindex}[1]{\@bsphack\@esphack}
+\newcommandx{\dummy@edindex}[2][1=\expandonce\jobname,usedefault]{}%
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+% \end{macro}
% \subsection{Hyperlink}
% \begin{macro}{\hyperlinkformat}
% \protect\cs{hyperlinkformat} command is to be used to have both a internal hyperlink and a format, when indexing.