summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/eledmac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-01-25 00:01:52 +0000
committerKarl Berry <karl@freefriends.org>2015-01-25 00:01:52 +0000
commit401557891939e158c1e89c03003981afba8b02f2 (patch)
tree55481d4248c453eb938d096070214f3acd717a6c /Master/texmf-dist/source/latex/eledmac
parent4dbab71af1e1896d581b9fed5424590311ab5141 (diff)
eledmac (24jan15)
git-svn-id: svn://tug.org/texlive/trunk@36136 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/eledmac')
-rw-r--r--Master/texmf-dist/source/latex/eledmac/eledmac.dtx146
-rw-r--r--Master/texmf-dist/source/latex/eledmac/eledpar.dtx90
2 files changed, 115 insertions, 121 deletions
diff --git a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
index 5afe089056c..38d1b81abc3 100644
--- a/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
+++ b/Master/texmf-dist/source/latex/eledmac/eledmac.dtx
@@ -51,7 +51,7 @@
%
% \fi
%
-% \CheckSum{10594}
+% \CheckSum{10642}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -167,7 +167,7 @@
% deleted the commented out original edmac texts}
% \changes{v0.7}{2011/06/17}{Ma\"ieul Rouquette new maintainer}
% \changes{v0.8}{2011/17/06}{Bug on endnotes fixed: in a // text, all endnotes will print and be placed at the ends of columns (!)}
-% \changes{v0.8.1}{2011/07/14}{Bug on \cs{edtext} ; \cs{critex} ; \cs{lemma} fixed: we can now us non switching commands}
+% \changes{v0.8.1}{2011/07/14}{Bug on \cs{edtext} ; \cs{critex} ; \cs{lemma} fixed: we can now us not switching commands}
% \changes{v0.9}{2011/08/03}{No more ledpatch. All patches are now in the main file.}
% \changes{v0.9.1}{2011/08/08}{Fix some bugs linked to integrating ledpatch on the main file.}
% \changes{v0.10}{2011/08/22}{Corrections to \cs{section} and other titles in numbered sections}
@@ -212,7 +212,9 @@
% \changes{v1.13.2}{2014/09/30}{Fix bug with normal footnotes, added by v1.13.0.}
% \changes{v1.13.3}{2014/10/04}{Fix extra spaces with paragraphed footnotes, added by v1.13.0.}
% \changes{v1.13.4}{2014/10/20}{Fix bug with index when memoir class is used without hyperref}
-% \changes{v1.15.0}{2014/22/15}{Fix bug with footnotes layout when using some options of the geometry package (bug add by v1.13.0).}
+% \changes{v1.15.0}{2015/01/12}{Fix bug with footnotes layout when using some options of the geometry package (bug add by v1.13.0).}
+% \changes{v1.16.0}{2015/01/23}{Compatibility of standard footnotes with some biblatex styles.}
+% \changes{v1.16.0}{2015/01/23}{New \cs{stanzaindent} command.}
% \hyphenation{man-u-script man-u-scripts}
%
%
@@ -1658,7 +1660,7 @@
% of the length \verb?\stanzaindentbase?, whose default value is 20pt.
%
% \DescribeMacro{\setstanzaindents}
-% In order to use the stanza macros, one must set the indentation values.
+% In order to use the stanza macros, \textbf{one must set the indentation values}.
% First the value of \verb+\stanzaindentbase+ should be set,
% unless the default value 20pt is desired.
% Every stanza line indentation is a multiple of this.
@@ -1713,7 +1715,15 @@
% its indentations (penalties) may be set within a group; the prior values
% will be restored when the group ends.
%
-% % \subsection{Stanza breaking}
+% \subsection{Manual stanza indent}
+% \DescribeMacro{\stanzaindent}
+% \DescribeMacro{\stanzaindent*}
+% You can set the indent of some specific verse by calling \cs{stanzaindent}\marg{value} at the begining of the verse, before any other character. In this case, the indent defined by \cs{setstanzaindents} for this verse is skipped, and \marg{value} is used instead.
+%
+% If you use the mechanism of indent repetition, the next verse will be printed as it should be even if the current verse would have its normal indent value. In other word, using \cs{stanzaindent} in a verse does not shift the indent repetition.
+%
+% However, if you want to shift the indent repetition, and so the next verse to have the indent which should have been used for the current verse, use \cs{stanzaindent*} instead of \cs{stanzaindent}.
+% \subsection{Stanza breaking}
% \DescribeMacro{\setstanzapenalties}
% When the stanzas run over several pages, it is often
% desirable that page breaks should arise between certain lines in the
@@ -2143,7 +2153,7 @@
% that \meta{item} and the current page \& linenumber should be added to
% the raw index file.
%
-% If the \Lclass{memoir} class or the \Lpack{imakeidx} package is used then the macro takes an optional
+% If the \Lclass{memoir} class or the \Lpack{imakeidx} or \Lpack{indextools} package is used then the macro takes an optional
% argument, which is the name of a raw index file. For example
% |\edindex[line]{item}| will use |line.idx| as the raw file instead of
% |\jobname.idx|.
@@ -2152,9 +2162,9 @@
%
% Be careful with the order of package loading and index declaration. You must use this order:
% \begin{enumerate}
-% \item Load \Lpack{imakeidx}.
+% \item Load \Lpack{imakeidx} or \Lpack{indextools} .
% \item Load \Lpack{eledmac}.
-% \item Declare the index with the macro \cs{makeindex} of \Lpack{imakeidx}.
+% \item Declare the index with the macro \cs{makeindex} of \Lpack{imakeidx}/\Lpack{indextools}.
% \end{enumerate}
% \DescribeMacro{\pagelinesep}
% The page \& linenumber combination is written as |page\pagelinesep line|,
@@ -2894,7 +2904,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledmac}[2015/01/16 v1.15.1 LaTeX port of EDMAC]%
+\ProvidesPackage{eledmac}[2015/01/23 v1.16.0 LaTeX port of EDMAC]%
% \end{macrocode}
%
% Generally, these are the modifications to the original.
@@ -3021,7 +3031,18 @@
% Define a flag for if the \Lpack{imakeidx} package has been used.
% \begin{macrocode}
\newif\ifl@imakeidx
-\@ifpackageloaded{imakeidx}{\l@imakeidxtrue}{\l@imakeidxfalse}
+\@ifpackageloaded{imakeidx}{\l@imakeidxtrue}{}%False is the default value
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ifl@indextools}
+% Define a flag for if the \Lpack{indextools} package has been used.
+% \begin{macrocode}
+\newif\ifl@indextools%
+\@ifpackageloaded{indextools}{%
+ \l@indextoolstrue%
+ \l@imakeidxtrue%
+ \let\imki@wrindexentry\indtl@wrindexentry%
+ }{}%False is the default value. We consider indextools as a variant of imakeidx. That's why we set `l@imakeidx` to true. We also let \imki@wrindexentry to \indtl@wrindexentry
% \end{macrocode}
% \end{macro}
% \begin{macro}{\if@RTL}
@@ -3312,6 +3333,13 @@
}%
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\led@error@IndextoolsAfterEledmac}
+% \begin{macrocode}
+\newcommand{\led@error@IndextoolsAfterEledmac}{%
+ \eledmac@error{Indextools must be loaded before eledmac.}{\@ehd}%
+}%
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Gobbling}
% \changes{v1.14.0}{2014/10/27}{Provide \cs{@gobblefour}}
@@ -5480,6 +5508,7 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\critext}
+% \changes{v1.16.0}{2014/01/23}{\cs{critext} and \cs{edtext} are now defined only in eledmac, not in \Lpack{eledpar}. Debug wrong numbering when using \cs{sameword} + \Lpack{eledpar} + \cs{tag} command.}
% Now we begin \cs{critext} itself. The definition requires a \verb"/" after
% the arguments: this eliminates the possibility of problems about
% knowing where \verb"#2" ends. This also changes the handling of spaces
@@ -5524,9 +5553,12 @@
%
% \cs{insert@count} will be altered by the note-generating macros:
% it counts the number of deferred footnotes or other insertions
-% generated by this instance of \cs{critext}.
+% generated by this instance of \cs{critext}.
+% If we are in a right column (eledpar), we use \cs{insert@countR}
+% instead of \cs{insert@count}.
% \begin{macrocode}
- \global\insert@count=0
+ \ifledRcol \global\insert@countR \z@%
+ \else \global\insert@count \z@ \fi%
% \end{macrocode}
%
% Now process the note-generating macros in argument \verb"#2"
@@ -5586,30 +5618,31 @@
% \begin{macrocode}
\newcommand{\edtext}[2]{\leavevmode
\@edtext@true%
- \begingroup
- \global\renewcommand{\@tag}{\no@expands #1}%%
- \set@line
- \global\insert@count=0
- \ignorespaces #2\relax
+ \begingroup%
+ \global\renewcommand{\@tag}{\no@expands #1}%
+ \set@line%
+ \ifledRcol \global\insert@countR \z@%
+ \else \global\insert@count \z@ \fi%
+ \ignorespaces #2\relax%
\@ifundefined{xpg@main@language}{%if not polyglossia
\flag@start}%
{\if@RTL\flag@end\else\flag@start\fi% With polyglossia, you must track whether the language reads left to right (English) or right to left (Arabic).
}%
- \endgroup
+ \endgroup%
\showlemma{#1}%
- \ifx\end@lemmas\empty \else
- \gl@p\end@lemmas\to\x@lemma
- \x@lemma
- \global\let\x@lemma=\relax
- \fi
+ \ifx\end@lemmas\empty \else%
+ \gl@p\end@lemmas\to\x@lemma%
+ \x@lemma%
+ \global\let\x@lemma=\relax%
+ \fi%
\@ifundefined{xpg@main@language}{%if not polyglossia
\flag@end}%
{\if@RTL\flag@start\else\flag@end\fi% With polyglossia, you must track whether the language reads left to right (English) or right to left (Arabic).
}%
\global\@noneed@Footnotefalse%
- \@edtext@false%
- \global\@lemmacommand@false%
- }
+ \@edtext@false%
+ \global\@lemmacommand@false%
+}%
\newcommand*{\flag@end}{%
\ifledRcol%
@@ -8525,10 +8558,7 @@
% \begin{macro}{\@footnotetext}
% Add \cs{m@mmf@prepare} at the end of \cs{@footnotetext}.
% \begin{macrocode}
-\let\l@dold@footnotetext\@footnotetext
-\renewcommand{\@footnotetext}[1]{%
- \l@dold@footnotetext{#1}%
- \m@mmf@prepare}
+\apptocmd{\@footnotetext}{\m@mmf@prepare}{}{}
% \end{macrocode}
% \end{macro}
%
@@ -8561,13 +8591,12 @@
% different forms for when in numbered or regular text.
% \changes{v0.5}{2004/04/03}{Enabled regular \cs{footnote} in numbered text}
% \begin{macrocode}
-\let\l@doldold@footnotetext\@footnotetext
-\renewcommand{\@footnotetext}[1]{%
+\pretocmd{\@footnotetext}{%
\ifnumberedpar@
\edtext{}{\l@dbfnote{#1}}%
\else
- \l@doldold@footnotetext{#1}%
- \fi}
+ }{}{}
+\apptocmd{\@footnotetext}{\fi}{}{}%
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -8582,14 +8611,15 @@
% \begin{macrocode}
\newcommand{\l@dbfnote}[1]{%
\ifnumberedpar@
- \gdef\@tag{#1}%
+ \gdef\@tag{#1\relax}%
\xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\@thefnmark}}%
\to\inserts@list
\global\advance\insert@count \@ne
\fi\ignorespaces}
\newcommand{\vl@dbfnote}[2]{%
\def\@thefnmark{#2}%
- \l@doldold@footnotetext{#1}}
+ \@footnotetext{#1}%
+ }%
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -11535,19 +11565,18 @@
% \changes{v1.8.5}{2014/08/28}{Debug indexing in right column, with eledpar.}
% Here's some code for indexing using page \& line numbers.
%
-% \begin{macro}{\ifeledmac@check@imakeidx@}
-% First, ensure that \Lpack{imakeidx} is loaded \emph{before} \Lpack{eledmac}.
+% First, ensure that \Lpack{imakeidx} or \Lpack{indextools} is loaded \emph{before} \Lpack{eledmac}.
% \changes{v1.12.0}{2014/08/05}{Ensure that \Lpack{imakeidx} is loaded \emph{before} \Lpack{eledmac}}
% \begin{macrocode}
-\newif\ifeledmac@after@imakeidx@
-\@ifpackageloaded{imakeidx}{\eledmac@after@imakeidx@true}{}
\AtBeginDocument{%
- \ifeledmac@after@imakeidx@\else%
+ \unless\ifl@imakeidx%
\@ifpackageloaded{imakeidx}{\led@error@ImakeidxAfterEledmac}{}%
- \fi
+ \fi%
+ \unless\ifl@indextools%
+ \@ifpackageloaded{indextools}{\led@error@indextoolsAfterEledmac}{}%
+ \fi%
}
% \end{macrocode}
-% \end{macro}
% \begin{macro}{\pagelinesep}
% \begin{macro}{\edindexlab}
% \begin{macro}{\c@labidx}
@@ -11641,7 +11670,7 @@
% \end{macro}
% The \Lpack{memoir} class provides more flexible indexing than the
% standard classes. We need different code if the \Lpack{memoir}
-% class is being used, except if \Lpack{imakeidx} is used.
+% class is being used, except if \Lpack{imakeidx} or \Lpack{indextools} is used.
% \begin{macro}{\edindex}
% \changes{v0.4.1}{2003/03/29}{Let eledmac take advantage of memoir's indexing}
% \changes{v1.5}{2013/07/11}{Compatibility with \Lpack{imakeidx} package, and possibility to use multiple index with \cs{edindex}.}
@@ -11653,6 +11682,7 @@
% \begin{enumerate}
% \item Memoir class is used.
% \item AND \Lpack{imakeidx} is not used.
+% \item AND \Lpack{indextools} is not used.
% \end{enumerate}
% Need to add the definition of |\edindex| to |\makeindex|, and initialise
% |\edindex| to do nothing. In this case |\edindex| has an optional
@@ -11747,6 +11777,7 @@
% \begin{enumerate}
% \item Memoir class is NOT used.
% \item OR \Lpack{imakeidx} is used.
+% \item OR \Lpack{indextools} is used.
% \end{enumerate}
% \begin{macrocode}
\def\create@edindex@notfor@memoir{
@@ -11808,7 +11839,12 @@
% \begin{macrocode}
\@ifclassloaded{memoir}{%
\@ifpackageloaded{imakeidx}%
- {\create@edindex@notfor@memoir}{\create@edindex@for@memoir}%
+ {\create@edindex@notfor@memoir}%
+ {%
+ \@ifpackageloaded{indextools}%
+ {\create@edindex@notfor@memoir}%
+ {\create@edindex@for@memoir}%
+ }%
}%
{\create@edindex@notfor@memoir}%
% \end{macrocode}
@@ -12209,6 +12245,26 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\stanzaindent}
+% \begin{macro}{\stanzaindent*}
+% The macro \cs{stanzaindent}, when called at the begining of a verse, change the indentation normally defined for this verse by \cs{setstanzaindent}.
+% The starred version skip the current verse for the repetition of stanza indent.
+% \begin{macrocode}
+\newcommand{\stanzaindent}[1]{%
+ \hspace{\dimexpr#1\stanzaindentbase-\parindent\relax}%
+ \ignorespaces%
+}%
+\WithSuffix\newcommand\stanzaindent*[1]{%
+ \stanzaindent{#1}%
+ \global\advance\stanza@modulo-\@ne%
+ \ifnum\stanza@modulo=0%
+ \global\stanza@modulo=\value{stanzaindentsrepetition}%
+ \fi%
+ \ignorespaces%
+}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\stanza@line}
% \begin{macro}{\stanza@hang}
% \begin{macro}{\sza@penalty}
diff --git a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
index 6a02faea231..1eadf6c5af8 100644
--- a/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
+++ b/Master/texmf-dist/source/latex/eledmac/eledpar.dtx
@@ -51,7 +51,7 @@
%
% \fi
%
-% \CheckSum{4802}
+% \CheckSum{4698}
%
% \makeatletter
% \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
@@ -118,10 +118,9 @@
% \newcommand{\dtxfilename}{\texttt{eledpar.dtx}}
% \GetFileInfo{eledpar.sty}
% ^^A Put changes in the right order : see http://tex.stackexchange.com/a/74113/7712
-%\makeatletter
% \let\org@changes@\changes@
-% \def\my@changes v#1.#2#3\@nil{%
-% \org@changes@{v#1.\six@digits{#2}#3=v#1.#2#3}%
+% \def\my@changes v#1.#2.#3\@nil{%
+% \org@changes@{v#1.\six@digits{#2}.#3=v#1.#2.#3}%
% }%
% \newcommand*{\six@digits}[1]{%
% \ifnum#1<100000 0\fi
@@ -131,7 +130,7 @@
% \two@digits{#1}%
% }%
% \renewcommand*{\changes@}[1]{%
-% \my@changes#1\@nil
+% \my@changes#1.\@nil
% }%
%\makeatother
% \newcommand{\Lpack}[1]{\textsf{#1}}
@@ -183,6 +182,7 @@
% \changes{v1.9.0}{2014/09/16}{Compatibility with \cs{Xnoteswidthliketwocolumns} and \cs{notesXwidthliketwocolumns}}
% \changes{v1.10.0}{2015/01/12}{Restore critical notes in \cs{eledsection} in parallel columns (this bug was added in 1.8.2).}
% \changes{v1.10.0}{2015/01/12}{Compatibility with \cs{AtEveryPstart} and \cs{AtEveryPend}}
+% \changes{v1.11.0}{2015/01/23}{Compatibility of standard footnotes with some biblatex styles.}
% \hyphenation{man-u-script man-u-scripts}
%
%
@@ -872,7 +872,7 @@
% \begin{macrocode}
%<*code>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{eledpar}[2015/01/16 v1.10.1 eledmac extension for parallel texts]%
+\ProvidesPackage{eledpar}[2015/01/23 v1.11.0 eledmac extension for parallel texts]%
% \end{macrocode}
% With the option `shiftedpstarts' a long pstart one the left side (or in the right side) don't make a blank on the corresponding pstart, but the blank is put on the bottom of the page. Consequently, the pstarts on the parallel pages are shifted, but the shifted stop at every end of pages.
@@ -1252,7 +1252,7 @@
% For right texts the selection is recorded in the count \cs{line@marginR},
% otherwise in the count \cs{line@margin}:
% $0$ for left, $1$ for right, $2$ for outer, and $3$ for inner.
-% \changes{v0.3a}{2005/03/30}{Don't just set \cs{line@marginR} in \cs{linenummargin}}
+% \changes{v0.3.a}{2005/03/30}{Don't just set \cs{line@marginR} in \cs{linenummargin}}
% \begin{macrocode}
\newcount\line@marginR
\renewcommand*{\linenummargin}[1]{{%
@@ -2247,76 +2247,14 @@
% \edtext{#1}{#2}
% \end{verbatim}
%
-% \changes{v1.3}{2012/11/16}{Manage RTL language.}
+
% \begin{macro}{\critext}
-% Now we begin \cs{critext} itself.
-%
-% We slightly modify the original to make accomodation for when right text is
-% being processed.
-%
-% \begin{macrocode}
-\long\def\critext#1#2/{\leavevmode
- \@edtext@true%
- \begingroup
- \renewcommand{\@tag}{\no@expands #1}%
- \set@line
- \ifledRcol \global\insert@countR \z@
- \else \global\insert@count \z@ \fi
- \ignorespaces #2\relax
- \@ifundefined{xpg@main@language}{%if not polyglossia
- \flag@start}%
- {\if@RTL\flag@end\else\flag@start\fi% be careful on the direction of writing with polyglossia
- }%
- \endgroup
- \showlemma{#1}%
- \ifx\end@lemmas\empty \else
- \gl@p\end@lemmas\to\x@lemma
- \x@lemma
- \global\let\x@lemma=\relax
- \fi
- \@ifundefined{xpg@main@language}{%if not polyglossia
- \flag@end}%
- {\if@RTL\flag@start\else\flag@end\fi% be careful on the direction of writing with polyglossia
- }
- \@edtext@false%
- \@lemmacommand@false%
- }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\edtext}
+% \changes{v1.3}{2012/11/16}{Manage RTL language.}
+% \changes{v1.11.0}{2014/01/22}{\cs{critext} and \cs{edtext} are now defined only in eledmac.}
% And similarly for \cs{edtext}.
-% \begin{macrocode}
-\renewcommand{\edtext}[2]{\leavevmode
- \@edtext@true%
- \begingroup%
- \renewcommand{\@tag}{\no@expands #1}%
- \set@line%
- \ifledRcol \global\insert@countR \z@%
- \else \global\insert@count \z@ \fi%
- \ignorespaces #2\relax%
- \@ifundefined{xpg@main@language}{%if not polyglossia
- \flag@start}%
- {\if@RTL\flag@end\else\flag@start\fi% be careful on the direction of writing with polyglossia
- }%
- \endgroup%
- \showlemma{#1}%
- \ifx\end@lemmas\empty \else%
- \gl@p\end@lemmas\to\x@lemma%
- \x@lemma%
- \global\let\x@lemma=\relax%
- \fi%
- \@ifundefined{xpg@main@language}{%if not polyglossia
- \flag@end}%
- {\if@RTL\flag@start\else\flag@end\fi% be careful on the direction of writing with polyglossia
- }%
- \@edtext@false%
- \@lemmacommand@false%
-}
-
-% \end{macrocode}
% \end{macro}
-%
+% \end{macro}
%
% \begin{macro}{\set@line}
% The \cs{set@line} macro
@@ -3717,12 +3655,12 @@
% \begin{macro}{\l@dbfnote}
% \verb?\l@dbfnote? adds the footnote to the insert list, and
% \verb?\vl@dbfnote? calls the original \verb?\@footnotetext?.
-% \changes{v1.3.1}{2012/11/16}{Compatibility of standard footnotes with eledmac when theses footnotes contain any commands.}
+% \changes{v1.3.1}{2012/11/16}{Compatibility of standard footnotes with eledmac when theses footnotes contain any commands.}
% \changes{v1.3.3}{2012/11/19}{Spurious space with footnote in right column.}
% \begin{macrocode}
\renewcommand{\l@dbfnote}[1]{%
\ifnumberedpar@
- \gdef\@tag{#1}%
+ \gdef\@tag{#1\relax}%
\ifledRcol%
\xright@appenditem{\noexpand\vl@dbfnote{{\expandonce\@tag}}{\@thefnmark}}%
\to\inserts@listR
@@ -4848,7 +4786,7 @@
% \end{macrocode}
% More to do? If there is we have to get the number of lines for the next
% pair of pages before starting to output them.
-% \changes{v0.3b}{2005/04/08}{Added \cs{l@dminpagelines} calculation
+% \changes{v0.3.b}{2005/04/08}{Added \cs{l@dminpagelines} calculation
% for succeeding page pairs}
% \begin{macrocode}
\checkraw@text