summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/reledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-07-14 21:41:14 +0000
committerKarl Berry <karl@freefriends.org>2016-07-14 21:41:14 +0000
commit15d8e872670cad2846331dc4843baf948fdac3dd (patch)
tree36f1319349170894ea7181160e2e7e6737d729a5 /Master/texmf-dist/source/latex/reledmac
parent98c2bca5edfb6ec04214316a66cadd924dd45d62 (diff)
reledmac (14jul16)
git-svn-id: svn://tug.org/texlive/trunk@41699 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/reledmac')
-rw-r--r--Master/texmf-dist/source/latex/reledmac/reledmac.dtx96
1 files changed, 78 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
index 5c5781ca69c..f7ec6bf6823 100644
--- a/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
+++ b/Master/texmf-dist/source/latex/reledmac/reledmac.dtx
@@ -422,6 +422,7 @@
% \changes{v2.14.0}{2016/07/01}{Hyperref with the line number inside critical footnotes is correct when using \protect\cs{xxref}}
% \changes{v2.14.0}{2016/07/01}{Some internal changes for new features of \protect\reledpar.}
% \changes{v2.14.1}{2016/07/04}{Fix bug when using \protect\cs{footnoteX} in the first argument of \protect\cs{edtext}.}
+% \changes{v2.14.1a}{2016/07/14}{Fix problematic typos in the handbook.}
% \title{\Macpackage \\
% Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename)
% has version number \fileversion, last revised \filedate.}}
@@ -1533,14 +1534,73 @@
%
% The \protect\cs{sameword} number~5 is called in a \protect\cs{lemma} related to \protect\cs{edtext} of level~1. It must be marked by ``1''.
%
-% The \protect\cs{sameword} number is called in two \protect\cs{lemma}s: one related to a \protect\cs{edtext} of level~1, the other related to \protect\cs{edtext} of level~2.
+% The \protect\cs{sameword} number~1 is called in two \protect\cs{lemma}s: one related to a \protect\cs{edtext} of level~1, the other related to \protect\cs{edtext} of level~2.
% It must be marked by ``1,2''.
% However, as \protect\cs{lemma} is called only in level~1 and~2, ``1,2'' could replaced by ``inlemma''.
%
-% The \protect\cs{sameword} number ``2'' is in the first argument of a \protect\cs{edtext} of level~3, but it has no \protect\cs{lemma}-command, so there is no need to mark it.
+% The \protect\cs{sameword} number~2 is in the first argument of a \protect\cs{edtext} of level~3, but it has no \protect\cs{lemma}-command, so there is no need to mark it.
%
+% Here, the corresponding code:
+% \egstart
+% \begin{verbatim}
+%\edtext{%
+% \edtext{%
+% \sameword[inlemma]{A} (1)
+% \edtext{%
+% \sameword{A} (2)
+% }%
+% {%
+% \Afootnote{level~3}%
+% }%
+% \sameword[2]{A} (3)
+% }%
+% {%
+% \lemma{%
+% \sameword{A}%
+% \ldots%
+% \sameword{A}%
+% }%
+% \Afootnote{level~2}%
+% }%
+% \sameword{A} (4)
+% \sameword[1]{A} (5)
+%}%
+%{%
+% \lemma{\sameword{A}\ldots\sameword{A}}%
+% \Afootnote{level~1}%
+%}
+% \end{verbatim}
+% \egmid
+% \beginnumbering
+% \firstlinenum{1}
+% \linenumincrement{1}
+% \pstart
+%\edtext{%
+% \edtext{%
+% \sameword[inlemma]{A} (1)
+% \edtext{%
+% \sameword{A} (2)
+% }%
+% {%
+% \Afootnote{level~3}%
+% }%
+% \sameword[2]{A} (3)
+% }%
+% {%
+% \lemma{\sameword{A}\ldots\sameword{A}}%
+% \Afootnote{level~2}%
+% }%
+% \sameword{A} (4)
+% \sameword[1]{A} (5)
+%}%
+%{%
+% \lemma{\sameword{A}\ldots\sameword{A}}%
+% \Afootnote{level~1}%
+%}
+% \pend
+% \endnumbering
+% \egend
%
-%
% \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}
@@ -3684,7 +3744,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{reledmac}[2016/07/04 v2.14.1 typeset critical editions]%
+\ProvidesPackage{reledmac}[2016/07/14 v2.14.1a typeset critical editions]%
% \end{macrocode}
%
% \subsection{Package options}
@@ -7277,28 +7337,28 @@
% \begin{enumerate}
% \item Get the rank of each \protect\cs{sameword} in a line (relative rank) from the rank of each \protect\cs{sameword} in all the numbered section (absolute rank):
% \begin{itemize}
-% \item For each paired \protect\cs{sameword} argument and absolute line number, a counter is defined. Its value corresponds to the number of times \protect\cs{sameword}\marg{argument}+ is called from the beginning of the lineation to the end of the current line. We also store the same data for the preceding absolute line number, if it does not have \protect\cs{sameword}\marg{argument}.
+% \item For each paired \protect\cs{sameword} argument and absolute line number, a counter is defined. Its value corresponds to the number of times \protect\cs{sameword}\marg{argument} is called from the beginning of the lineation to the end of the current line. We also store the same data for the preceding absolute line number, if it does not have \protect\cs{sameword}\marg{argument}.
% \item For each \protect\cs{sameword} having the same argument, we subtract from its absolute rank the number stored for the paired \protect\cs{sameword} argument and previous absolute line number. Consequently, we obtain the relative rank.
% \item See the following example which explain how for same \protect\cs{sameword} absolute ranks are transformed to relative rank.
% \begin{verbatim}
% At line 1:
% absolute rank 1 becomes relative rank 1-0 = 1
-% 1 is stored for this \sameword and the line 1
+% 1 is stored for this \sameword and line 1
% At line 2:
% absolute rank 2 becomes relative rank 2-1 = 1
-% absolute rank 3 becomes relative rank 3-2 = 2
-% 3 is stored for this \sameword and the line 2
+% absolute rank 3 becomes relative rank 3-1 = 2
+% 3 is stored for this \sameword and line 2
% At line 3:
% no \sameword for this line.
-% 3 is stored for this \sameword and the line 3
+% 3 is stored for this \sameword and line 3
% At line 4:
% absolute rank 4 becomes relative rank 4-3 = 1
-% 3 is stored for this \sameword and the line 4
+% 4 is stored for this \sameword and line 4
% \end{verbatim}
% \end{itemize}
% \item Create lists of lists of \protect\cs{sameword} by depth of \protect\cs{edtext}.
-% That is: create a list for \protect\cs{edtext} of level~1, a list for \protect\cs{edtext} of level~2, a list for \protect\cs{edtext} of level~3 etc.
-% For each \protect\cs{edtext} in these list, we store all the relative rank of \protect\cs{saweword} which are called as lemma information, that is 1) or called in the first argument of \protect\cs{sameword} 2) or called in the \protect\cs{lemma} macro of the second argument of \protect\cs{sameword} AND marked by the optional argument of \protect\cs{saweword} in first argument of \protect\cs{edtext}.
+% That is: create a list for \protect\cs{edtext}s of level~1, a list for \protect\cs{edtext}s of level~2, a list for \protect\cs{edtext}s of level~3 etc.
+% For each \protect\cs{edtext} in these lists, we store all the relative rank of \protect\cs{saweword} which are called as lemma information, that is 1) or called in the first argument of \protect\cs{sameword} 2) or called in the \protect\cs{lemma} macro of the second argument of \protect\cs{sameword} AND marked by the optional argument of \protect\cs{saweword} in first argument of \protect\cs{edtext}.
%
% For example, suppose a line with nested \protect\cs{edtext}s which contains some
% word marked by \protect\cs{sameword} and having the following relative rank:\\
@@ -7323,7 +7383,7 @@
%
% As you can see, the mandatory argument of \protect\cs{sameword} does not matter: we store the rank informations for every word potentially ambiguous.
% \end{enumerate}
-% \item At the second run, when a critical notes is called, we associate it to the next item of the list associated to is \protect\cs{edtext} level. So, in the previous example:
+% \item At the second run, when a critical notes is called, we associate it to the next item of the list associated to its \protect\cs{edtext} level. So, in the previous example:
% \begin{itemize}
% \item Critical notes (A) and (B) are associated with $\{1,2,2,3\}$.
% \item Critical note (C) is associated with $\{1,2,2,3,4,3\}$.
@@ -7336,10 +7396,10 @@
% \item At each call of this \protect\cs{sameword@inedtext}, we step to the next element of the list associated to the note. Let it be $r$.
% \item For the word marked by \protect\cs{sameword}, we calculate how many time it is called in its line. To do it:
% \begin{itemize}
-% \item We get the absolute line number of the current \protect\cs{sameword}. This absolute line number was stored with list of relative rank for the current \protect\cs{edtext}. That means, in the previous example, that, if the absolute line number of \protect\cs{edtext} was 1, that critical notes (A) and (B) were not associated with $\{1,2,2,3\}$ but with $\{(1,1),(2,1),(2,1),(3,1)\}$. Such method to know the absolute line number associated to a \protect\cs{sameword} is required because a \protect\cs{edtext} can be overlap many lines, but \protect\cs{sameword} can't get it.
-% \item We get the value associated, when reading the auxiliary file, to the pair compose by the current marked word and the current absolute line number. Let this value be $n$.
+% \item We get the absolute line number of the current \protect\cs{sameword}. This absolute line number was stored with list of relative rank for the current \protect\cs{edtext}. That means, in the previous example, that, if the absolute line number of \protect\cs{edtext} was 1, that critical notes (A) and (B) were not associated with $\{1,2,2,3\}$ but with $\{(1,1),(2,1),(2,1),(3,1)\}$. Such method to know the absolute line number associated to a \protect\cs{sameword} is required because a \protect\cs{edtext} can overlap many lines, but \protect\cs{sameword} can't get it.
+% \item We get the value associated, when reading the auxiliary file, to the pair composed by the current marked word and the current absolute line number. To this value, we subtract the value associated to the pair composed by the current marked word and the previous absolute line number. Let the result be $n$.
% \end{itemize}
-% \item If $n >1 $, that mean the current word appears more than once time in its line. In this case, we call \protect\cs{showwordrank} with the word as first argument and $r$ as second argument. If the word is called only once, we just print it.
+% \item If $n >1 $, that means the current word appears more than once time in its line. In this case, we call \protect\cs{showwordrank} with the word as first argument and $r$ as second argument. If the word is called only once, we just print it.
% \end{itemize}
% \end{itemize}
% After theory, implementation.
@@ -7377,7 +7437,7 @@
% \begin{macrocode}
\protected@write\linenum@out{}{\string\@sw{\sw@txt}{\csuse{sw@\sw@txt}}{#1}}%
% \end{macrocode}
-% Do the same thing if we are in the right columns.
+% Do the same thing if we are in the right column.
% \begin{macrocode}
\else%
\csnumgdef{sw@\sw@txt}{\csuse{sw@\sw@txt}+\@ne}%
@@ -7524,8 +7584,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\showwordrank}
-% \begin{macrocode}
% Finally, the way the rank will be printed.
+% \begin{macrocode}
\newcommand{\showwordrank}[2]{%
#1\textsuperscript{#2}%
}%