summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ednotes
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-07-10 22:34:26 +0000
committerKarl Berry <karl@freefriends.org>2006-07-10 22:34:26 +0000
commit8abaae73c1bd5624110e77ebafcfba25e7d0694e (patch)
tree37a770787788bcf8babd34bc7aac1c3d5adba1aa /Master/texmf-dist/tex/latex/ednotes
parentfdfb62e01e61d31afda1b823add36f4ef9849475 (diff)
ednotes 1.5 (10jul06)
git-svn-id: svn://tug.org/texlive/trunk@1810 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ednotes')
-rw-r--r--Master/texmf-dist/tex/latex/ednotes/edcntwd0.sty19
-rw-r--r--Master/texmf-dist/tex/latex/ednotes/ednotes.sty261
2 files changed, 193 insertions, 87 deletions
diff --git a/Master/texmf-dist/tex/latex/ednotes/edcntwd0.sty b/Master/texmf-dist/tex/latex/ednotes/edcntwd0.sty
index 48c44001300..1d20e3a84f5 100644
--- a/Master/texmf-dist/tex/latex/ednotes/edcntwd0.sty
+++ b/Master/texmf-dist/tex/latex/ednotes/edcntwd0.sty
@@ -1,5 +1,5 @@
%% EdCntWd0.sty--count word occurrences with ednotes.sty.
-\def\fileversion{0.32b} \def\filedate{2006/06/26} %% TODO
+\def\fileversion{0.32d} \def\filedate{2006/07/06} %% TODO
%% Copyright (C) 2004 Uwe L\"uck & Christian Tapp (direction)
%% 2005 2006 Uwe L\"uck.
@@ -51,7 +51,7 @@
% nothing but character tokens. (Cf. \csname on p. 203 of TeXbook.)
% 4.) Customization: Index numbers appear as subscripts by default.
% To change this, type
-% \renewcommand*{\CWtextscript}{\textsuperscript}
+% \renewcommand{\CWtextscript}{\textsuperscript}
% or \let\CWtextscript\textsuperscript .
% 5.) Pagewise/running line numbering: Switching from pagewise to
% running line numbering needs an extra run or deletion of
@@ -91,9 +91,10 @@
% \newif\if@CW@firstinpar \global\@CW@firstinpartrue %% !
% \c@CW@par identifies paragraphs which contain \countword.
-% From v0.32a onwards, it is a LaTeX counter in order to
-% work properly with \includeonly
-\newcounter{CW@par} % \newcount\c@CW@par
+% From v0.32a onwards, it is kind of a LaTeX counter in order
+% to work properly with \includeonly:
+\newcount\c@CW@par
+\@addtoreset{CW@par}{@ckpt}
% \@CW@wordlist is made a list of \countword-arguments in one
% paragraph, to be written to the .aux .
@@ -110,7 +111,10 @@
% When there is evidence that there are more occurrences of
% \countword than in the previous run:
\def\@CW@missingdata{\G@refundefinedtrue
- \@EN@warning{Missing data for \string\countword}%
+ \@EN@warning{Missing data (.aux) for
+ \string\countword\MessageBreak}%
+%Package ednotes Warning: Missing data (.aux) for \countword
+%on inputline
\CWtextscript?}
%% <- TODO: warning when some \countword has been removed!?
@@ -360,4 +364,5 @@ v0.32a /06/07 \c@CW@par with \includeonly.
extended documentation; rearranged code.
2006/06/16 \@CW@missingdata.
v0.32b /06/26 LPPL v1.3c.
-
+ /06/29 `Missing data (.aux)'
+v0.32c /07/06 \includeonly with less LaTeX counter features.
diff --git a/Master/texmf-dist/tex/latex/ednotes/ednotes.sty b/Master/texmf-dist/tex/latex/ednotes/ednotes.sty
index 6fb640b67e5..e5b04a6bd5e 100644
--- a/Master/texmf-dist/tex/latex/ednotes/ednotes.sty
+++ b/Master/texmf-dist/tex/latex/ednotes/ednotes.sty
@@ -5,7 +5,7 @@
%% --author-maintained, for critical editions
%% (varying J. Lavagnino's and D. Wujastyk's EDMAC).
%%
-\def\fileversion{1.23b} \def\filedate{2006/06/26} %% TODO
+\def\fileversion{1.3} \def\filedate{2006/07/06} %% TODO
%
%% This file can be redistributed and/or modified under
%% the terms of the LaTeX Project Public License; either
@@ -153,6 +153,10 @@
% Cf. EDMAC's \no@expands; EDMAC, however, deals with the
% problem in a different way and needs more changes
% than we do.)
+% ---You may find
+% \IfLemmaTag{<in lemma tag>}{<in main text>}
+% useful as well, perhaps more flexible than \notinnote.
+%
% *"Optional" user commands:* -------------------------------------
% Each of \Bnote, \Bnotelabel, \Cnote, \Cnotelabel, \Dnote,
% \Dnotelabel, \Enote, and \Enotelabel is defined by calling
@@ -219,10 +223,11 @@
% occur more than once in a line. See our package `edcntwd0.sty'.
% (With `ednotes.sty' v1.1 you need `edcntwd0.sty' v0.31.)
%
-% *Customizing:* (important change v1.1!)
+% *Customizing:*
% Appearance of notes is directed by macros \extrafootnoterule,
% \linesfmt etc. occurring in the following lines
-% (each starting with \renewcommand).
+% (each starting with \renewcommand). -- More recently, customizing
+% footnote rules has been introduced; see below.
% For customizing, copy the respective lines to your own file,
% remove left hand comment mark, and change the definition in the
% right hand pair of braces. (The definition you find there is our
@@ -325,6 +330,26 @@
% conflict with our lemma mechanism. (Coexistence would be possible
% by suitable use of braces and repeating present definitions
% after change of <'s catcode.)
+% ---Customizing *footnote rules*: From its version 1.5 onwards,
+% manyfoot has offered customizing footnote rules, as described
+% in section 3 of manyfoot.pdf . Only with version 1.3 onwards,
+% our ednotes supports this manyfoot feature. First please note
+% that ednotes always simply executes \newfootnote, never
+% \DeclareNewFootnote. This seems to suffice for scholarly
+% critical editions and for customizing the footnote rules.
+% When you read in manyfoot.pdf about customizing footnote
+% rules, therefore please disregard any difference between
+% \newfootnote and \DeclareNewFootnote.---So please read
+% section 3 of manyfoot.pdf . Observe the \SelectFootnoteRule
+% commands preceding some \DeclareFootnoteRule commands.
+% If such a command precedes \newfootnote{<X>}, ednotes
+% produces the same effect if you precede loading ednotes
+% after \newcommand{\Select<X>noterule}{<SFR args>},
+% when you would want to use \SelectFootnoteRule<SFR args>
+% with mere manyfoot. (The accompanying file varnrule.tex
+% explains more and enables you to play with the possibilites.)
+% ---(Please never forget to update the ncctools MiKTeX package
+% when you update the ednotes package!)
%
% *Your shorthands:*
% \Anote etc. prevent editorial notes from appearing in the
@@ -348,6 +373,9 @@
% parameter and at least one *mandatory* parameter -- well, if it
% doesn't have, you can use \RobustTestOpt if you put a pair of
% braces after the shorthand macro name, this would work as well.
+% ---You may find
+% \IfTypesetting{<for typesetting>}{<for mere expanding>}
+% more flexible.
%
% *Known problems:*
% With run-in-paragraph footnotes (options `para' or `para*'), notes
@@ -501,9 +529,9 @@
% For pointing out errors and problems, we are grateful to test
% users Robert Alessi, Sergei Mariev---see version history.
% Florian Kragl contributed to now `manyfoot.sty's \ExtraParaSkip
-% as described above. v1.1 is due to problems that Roy Flechner
-% reported. v1.12 is due to Hillel Chayim Yisraeli's discovery
-% of spurious footnote marks.
+% as described above. v1.1 and v1.23c are due to problems that
+% Roy Flechner reported. v1.12 is due to Hillel Chayim Yisraeli's
+% discovery of spurious footnote marks.
%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
% 1994/12/01: \newcommand* etc. %% TODO: more recent needed?
@@ -544,6 +572,9 @@
\AtEndOfPackage{%
\SetFootnoteHook{\@EN@MF@hook@B}%
\let\@EN@MF@hook@B\@empty
+ \@ifundefined{SelectBnoteRule}{}{%
+ \expandafter\SelectFootnoteRule\SelectBnoteRule
+ \let\SelectBnoteRule\relax}%
\newfootnote[para]{B}%
\newcommand{\Bnote}{\@EN@note B}%
\newcommand{\Bnotelabel}{\@EN@notelabel B}%
@@ -552,6 +583,9 @@
\AtEndOfPackage{%
\SetFootnoteHook{\@EN@MF@hook@B}%
\let\@EN@MF@hook@B\@empty
+ \@ifundefined{SelectBnoteRule}{}{%
+ \expandafter\SelectFootnoteRule\SelectBnoteRule
+ \let\SelectBnoteRule\relax}%
\newfootnote{B}%
\newcommand{\Bnote}{\@EN@note B}%
\newcommand{\Bnotelabel}{\@EN@notelabel B}%
@@ -561,6 +595,9 @@
\AtEndOfPackage{%
\SetFootnoteHook{\@EN@MF@hook@C}%
\let\@EN@MF@hook@C\@empty
+ \@ifundefined{SelectCnoteRule}{}{%
+ \expandafter\SelectFootnoteRule\SelectCnoteRule
+ \let\SelectCnoteRule\relax}%
\newfootnote[para]{C}%
\newcommand{\Cnote}{\@EN@note C}%
\newcommand{\Cnotelabel}{\@EN@notelabel C}%
@@ -569,6 +606,9 @@
\AtEndOfPackage{%
\SetFootnoteHook{\@EN@MF@hook@C}%
\let\@EN@MF@hook@C\@empty
+ \@ifundefined{SelectCnoteRule}{}{%
+ \expandafter\SelectFootnoteRule\SelectCnoteRule
+ \let\SelectCnoteRule\relax}%
\newfootnote{C}%
\newcommand{\Cnote}{\@EN@note C}%
\newcommand{\Cnotelabel}{\@EN@notelabel C}%
@@ -578,6 +618,9 @@
\AtEndOfPackage{%
\SetFootnoteHook{\@EN@MF@hook@D}%
\let\@EN@MF@hook@D\@empty
+ \@ifundefined{SelectDnoteRule}{}{%
+ \expandafter\SelectFootnoteRule\SelectDnoteRule
+ \let\SelectDnoteRule\relax}%
\newfootnote[para]{D}%
\newcommand{\Dnote}{\@EN@note D}%
\newcommand{\Dnotelabel}{\@EN@notelabel D}%
@@ -586,6 +629,9 @@
\AtEndOfPackage{%
\SetFootnoteHook{\@EN@MF@hook@D}%
\let\@EN@MF@hook@D\@empty
+ \@ifundefined{SelectDnoteRule}{}{%
+ \expandafter\SelectFootnoteRule\SelectDnoteRule
+ \let\SelectDnoteRule\relax}%
\newfootnote{D}%
\newcommand{\Dnote}{\@EN@note D}%
\newcommand{\Dnotelabel}{\@EN@notelabel D}%
@@ -595,6 +641,9 @@
\AtEndOfPackage{%
\SetFootnoteHook{\@EN@MF@hook@E}%
\let\@EN@MF@hook@E\@empty
+ \@ifundefined{SelectEnoteRule}{}{%
+ \expandafter\SelectFootnoteRule\SelectEnoteRule
+ \let\SelectEnoteRule\relax}%
\newfootnote[para]{E}%
\newcommand{\Enote}{\@EN@note E}%
\newcommand{\Enotelabel}{\@EN@notelabel E}%
@@ -603,6 +652,9 @@
\AtEndOfPackage{%
\SetFootnoteHook{\@EN@MF@hook@E}%
\let\@EN@MF@hook@E\@empty
+ \@ifundefined{SelectEnoteRule}{}{%
+ \expandafter\SelectFootnoteRule\SelectEnoteRule
+ \let\SelectEnoteRule\relax}%
\newfootnote{E}%
\newcommand{\Enote}{\@EN@note E}%
\newcommand{\Enotelabel}{\@EN@notelabel E}%
@@ -653,7 +705,7 @@
%% Load required packages:
\RequirePackage[ruled\if@EN@Apara,para\fi]{manyfoot}[2005/05/11]
%% <- \SetFootnoteHook
-%% TODO: Leave choice to user!?
+%% todo: Leave choice to user!? -> `unruled' -- \Select... suffices.
%% TODO: ruled -> \Execute...!?
\RequirePackage{lineno}[2004/10/11]
@@ -668,6 +720,9 @@
%% Execute option concerning first apparatus:
\SetFootnoteHook{\@EN@MF@hook@A}
\let\@EN@MF@hook@A\@empty
+\@ifundefined{SelectAnoteRule}{}{%
+ \expandafter\SelectFootnoteRule\SelectAnoteRule
+ \let\SelectAnoteRule\relax}%
\if@EN@Apara
\newfootnote[para]{A}% Needs `manyfoot.sty'.
\newcommand{\Anote}{\@EN@note A}%
@@ -681,7 +736,6 @@
%% User commands (if not defined in option code etc.):
\newcommand{\addlemmaexpands}{\@EN@addtomacro\@EN@lemmaexpands}
%% <- local; cf. using LaTeX's \g@addto@macro: %% TODO: decide
-% \newcommand{\addlemmaexpands}{\g@addto@macro\@EN@lemmaexpands}
\newcommand{\showlemmaexpands}{%
\typeout{\string\@EN@lemmaexpands=\meaning\@EN@lemmaexpands}%
}
@@ -724,21 +778,26 @@
%
% Our sphack for going around control sequences in text:
\def\@EN@sphack{\relax
- \ifhmode\ifdim\lastskip>\z@ \ignorespaces \fi\fi}
-%
-\def\@EN@xpxpxp{\expandafter\expandafter\expandafter} % :-) v1.23
-% Basic handling of \Anote etc.:
-\long\def\@EN@note#1#2{% #1 note family, #2 lemma.
-% %% TODO: \long!?
+ \ifhmode\ifdim\lastskip>\z@ \ignorespaces \fi\fi
+}
+% For ellipsis commands in moving arguments:
+\def\IfTypesetting{%
\ifx\protect\@typeset@protect \expandafter \@firstoftwo
\else \expandafter \@secondoftwo
\fi
- {\def\@EN@notefam{#1}\@EN@process #2\<\>\@nil}%
- {\@EN@robust@process #2\<\>\@nil}%
+}
+% A nice shortcut (v1.23):
+\def\@EN@xpxpxp{\expandafter\expandafter\expandafter}
+
+% Basic handling of \Anote etc.:
+\long\def\@EN@note#1#2{% #1 note family, #2 lemma.
+ \IfTypesetting{%
+ \def\@EN@notefam{#1}\@EN@process #2\<\>\@nil
+ }{\@EN@robust@process #2\<\>\@nil}%
}
%
% Lemma versions and preparing label:
-\long\def\@EN@process#1\<#2\>#3\@nil{% %% TODO: \long!?
+\long\def\@EN@process#1\<#2\>#3\@nil{%
% Usage: \@EN@process #k\<\>\@nil.
%% TODO: simplify using LaTeX's \in@!?
% Implementation: don't leave control to user's input unless \<, \>
@@ -748,42 +807,39 @@
% \let\@EN@lemmatag\@EN@lemmaarg %% Would be overridden.
\ifx\@nnil#2#3\@nnil
% No ellipsis, #1 all of user's input, dummy \<\> gobbled.
- \@EN@addtomacro\@EN@lemmaarg\unskip
+ \@EN@addtomacro\@EN@lemmaarg\unskip
\@EN@simplelemmatag
-% \let\@EN@lemmatag\@EN@lemmaarg
\@EN@mathlemmatag
\else
\@EN@simplelemmatag
-% %% TODO: this case is the rare one, so put it into an extra
-% %% macro for efficiency!?
\ifx\@nnil#3\@nnil % \<, but no \> from user.
% #2 ends on \<, \>\@nil gobbled.
- \@EN@gobble@pause#2\@nil
+ \@EN@gobble@pause#2\@nil\@nil
\else
% #3 ends on dummy \<\>.
- \@EN@gobble@resume\@EN@gobble@pause#2\@EN@sphack\@nil#3%
+ \@EN@gobble@resume\@EN@gobble@pause#2\@EN@sphack\@nil
% This \@EN@sphack replacing \> in main text.
+ #3\@nil\@nil
\fi
\fi
- \ifLemmaTag \expandafter \@firstoftwo
- \else \expandafter \@secondoftwo
- %% <- TODO: \...process might be redirected to
- %% \...robust@process immediately.
- \fi
- {\@EN@lemmaarg\@gobble}%
- {\stepcounter{EN@label}% % v1.23
-% {\global\advance\c@EN@label\@ne
+ \IfLemmaTag % v1.3
+ {\@EN@lemmaarg\@gobble}%
+ %% TODO: \...process might otherwise be redirected to
+ %% \...robust@process immediately. %% ???
+ {\stepcounter{EN@label}%
% Much must be expanded, especially for storing the note in a
% hook (some tables):
- \edef\@EN@tempa{\noexpand\@EN@putdown{EN@l\number\c@EN@label}}%
- \@EN@xpxpxp \@EN@tempa
- \expandafter \@EN@notefam \expandafter {\@EN@lemmatag}}%
+ \edef\@EN@tempa{\noexpand\@EN@putdown{EN@l\number\c@EN@label}}%
+ \@EN@xpxpxp \@EN@tempa
+ \expandafter \@EN@notefam \expandafter {\@EN@lemmatag}}%
}
-\long\def\@EN@gobble@pause#1\<{\@EN@finishlemma#1\@nil} %% TODO: \long!?
+\long\def\@EN@gobble@pause#1\<\@nil{%
+ \futurelet\@let@token
+ %% <- TODO \@EN@finishlemma like \@EN@gobble@opt@till!?
+ \@EN@finishlemma #1\@nil}
% #1 contains \@nil separating arguments.
% Variant of LaTeX's \@ifnextchar---don't gobble spaces:
-\def\@EN@finishlemma{\futurelet\@let@token\@EN@finlem}
-\def\@EN@finlem{%
+\def\@EN@finishlemma{%
\ifx\@let@token<%
\let\@EN@next\@EN@xfinlem
\else
@@ -791,7 +847,7 @@
\fi
\@EN@next
}
-\long\def\@EN@xfinlem<#1>#2\@nil#3\@nil{% %% TODO: \long!?
+\long\def\@EN@xfinlem<#1>#2\@nil#3\@nil{%
\@EN@addtomacro\@EN@lemmaarg{\@EN@sphack#2#3\unskip}%
\@EN@addtomacro\@EN@lemmatag{#1\@EN@CWhook{#2}#3\unskip}%
\@EN@mathlemmatag
@@ -802,20 +858,21 @@
% printed right here. Alternative (but needs extra code to test
% for \extraellipsis): \extraellipsis{ELL}. %% TODO: decide
% Think of keyboards without `<', `>'?
-\long\def\@EN@gobble@resume#1\>{#1} %% TODO: \long!?
+\long\def\@EN@gobble@resume#1\>\@nil{#1}
\let\@EN@CWhook\@gobble %% For counting words package.
\def\@EN@simplelemmatag{\let\@EN@lemmatag\@EN@lemmaarg}
% Useful for math mode extension as well.
\let\@EN@mathlemmatag\relax %% Hook for math mode.
%
-\newcounter{EN@label} %% for \includeonly; v1.23
-%% <- TODO: problem with final label test
-% \newcount\c@EN@label
+% \newcounter{EN@label}
+% % <- for \includeonly, v1.23; sufficient v1.3:
+\newcount\c@EN@label
+\@addtoreset{EN@label}{@ckpt}
%
% New mechanism for ellipsis in lemma -- supporting nested lemmas
% or at least lemmas shared by apparatuses exceeding one
% (v1.22b 2006/01/13):
-\def\@EN@lemma@ellipsis{%
+\def\@EN@ltag@ellipsis{%
\futurelet\@let@token\@EN@make@nested@lemmaellipsis}%
\def\@EN@make@nested@lemmaellipsis{%
\ifx\@let@token<%
@@ -826,7 +883,6 @@
\fi}
\long\def\@EN@ellipsis@only<#1>#2\>{#1}
%
-
% .aux entries, note, and lemma in main text:
% (v1.1: much changes. I just remove what was before, see stored
% older version.)
@@ -911,50 +967,58 @@
}
%
% Expanding in note version of lemma:
-\newif\ifLemmaTag \LemmaTagfalse
\let\@EN@lemmaexpands\@empty
-%% TODO: \long below!? Cf. properly expanding versions.
-\def\@EN@gobble{\@EN@sphack\@gobble}
-\def\@EN@gobbletwo{\@EN@sphack\@gobbletwo}
-\def\@EN@secondofthree#1#2#3{\@EN@sphack#2}
+\long\def\@EN@gobble{\@EN@sphack\@gobble}
+\long\def\@EN@gobbletwo{\@EN@sphack\@gobbletwo}
+\long\def\@EN@secondofthree#1#2#3{\@EN@sphack#2}
+\let\IfLemmaTag\@secondoftwo % v1.3
+% <- Had thought I would use it more than once ...
+% ... maybe for replacing some \addlemmaexpands entries:
\addlemmaexpands{%
- \LemmaTagtrue
+ \let\IfLemmaTag\@firstoftwo
\let\notinnote\@EN@gobble
\let\@EN@note\@EN@secondofthree
\let\@EN@notelabel\@EN@gobbletwo
- \let\donote\@EN@gobbletwo
+% \let\resume\notinnote \let\pause\notinnote
+ % <- v1.23c -- Thanks to Roy Flechner.
+% \let\pause\@EN@pause@ltag % v1.3
+% \let\donote\@EN@gobbletwo
\let\label\notinnote \let\linelabel\notinnote
- \let\<\@EN@lemma@ellipsis
+ \let\<\@EN@ltag@ellipsis
}
%% <- TODO: user commands only!? (no \let)
%% TODO: cf. EDMAC's tag (fonts? accents? -- lineno.sty commands?)
\let\notinnote\@firstofone
%
-% Variant of \@EN@process when moving:
+% Variant of \@EN@process when moving: (v1.21/1.22)
\long\def\@EN@robust@process#1\<#2\>#3\@nil#4{%
#1%
\ifx\@nnil#2#3\@nnil
% No ellipsis, #1 all of user's input, dummy \<\> gobbled.
\else
- \@EN@sphack
+ \@EN@sphack@aux{}% for ensuing space in .aux, v1.3
\ifx\@nnil#3\@nnil % \<, but no \> from user.
% #2 ends on \<, \>\@nil gobbled.
- \@EN@robust@gobble@pause#2%
+ \@EN@robust@gobble@pause#2\@nil
\else % #3 ends on dummy \<\>.
\@EN@gobble@resume
- \@EN@robust@gobble@pause#2\@EN@sphack#3%
- % This \@EN@sphack replacing \> in main text.
+ \@EN@robust@gobble@pause#2\@EN@sphack@aux{}#3\@nil\@nil
\fi
\fi
}
-\long\def\@EN@robust@gobble@pause#1\<{\@EN@gobble@opt#1<>\@nil\@empty}
-\long\def\@EN@gobble@opt#1<#2>#3\@nil{%
- \ifx\@nnil#3\@nnil #1%
- \else \ifx\@nnil#1\@nnil\else#1<#2>\fi \@EN@gobble@diamond#3%
- \fi
-}
-\long\def\@EN@gobble@diamond#1<>{#1}
-%% TODO: all of them \long?
+\DeclareRobustCommand{\@EN@sphack@aux}{\@EN@sphack\@gobble}
+\long\def\@EN@robust@gobble@pause#1\<\@nil{%
+ \@EN@gobble@opt@till#1<>\@nil}
+\long\def\@EN@gobble@opt@till#1<#2>#3\@nil{%
+ \ifx\@nnil#3\@nnil
+ #1\ifx\@nnil#2\@nnil \else
+ <\@EN@gobble@less#2\@nil \fi % v1.3
+ \else
+ \ifx\@nnil#1\@nnil\else#1<#2>\fi \@EN@gobble@diamond #3\@nil
+ \fi}
+ % <- TODO weak against aggressive expansion
+\long\def\@EN@gobble@less#1<\@nil{}
+\long\def\@EN@gobble@diamond#1<>\@nil{#1}
%
% Shorthand macros for lemma in moving argument:
\newcommand\RobustTestOpt{%
@@ -985,13 +1049,14 @@
% A first version is obtained by reading unto the \donote
% bearing the same label. \@EN@lemmaarg is then rebuilt,
% replacing \pause and \resume by \< and \>.
-% %% TODO: \long below!? -> lemma.
\def\@EN@notelabel#1#2{% #1 note family, #2 label.
- \def\@EN@notefam{#1}%
- \def\@EN@laplabel{#2}%
- \let\@EN@lemmaarg\@empty
- \let\@EN@next\@EN@firstnext
- \@EN@next
+ \IfTypesetting{% v1.3
+ \def\@EN@notefam{#1}%
+ \def\@EN@laplabel{#2}%
+ \let\@EN@lemmaarg\@empty
+ \let\@EN@next\@EN@firstnext
+ \@EN@next
+ }\relax % Second argument: otherwise do nothing.
% The following removed braces urgently needed:
% \@EN@getlabel\donote
% {\@EN@laplabel
@@ -1002,7 +1067,7 @@
% \@EN@appendwrong
% }%
}
-\long\def\@EN@firstnext#1\donote#2#3{% %% TODO: \long!? Alex!?
+\long\def\@EN@firstnext#1\donote#2#3{%
\def\@EN@tempa{#2}%
\ifx \@EN@tempa \@EN@laplabel
\@EN@addtomacro\@EN@lemmaarg{#1}%
@@ -1021,7 +1086,7 @@
\expandafter\@EN@addtomacro \expandafter\@EN@lemmaarg
\expandafter {\expandafter#1\expandafter{\@EN@tempa}}%
}%
- \long\def\@EN@next##1#1##2{% %% TODO: \long!? Alex!?
+ \long\def\@EN@next##1#1##2{%
% %% TODO: \let [pre-defined] for efficiency!?
\@EN@addtomacro\@EN@lemmaarg{##1}%
\def\@EN@tempa{##2}%
@@ -1035,7 +1100,6 @@
\@EN@getlabel\pause
{\@nnil
\def\@EN@next\resume\@nil{\@EN@donote}%
- % %% TODO: \let [pre-defined] for efficiency!?
\else
\ifx\@EN@tempa\@EN@laplabel
\@EN@addtomacro\@EN@lemmaarg\<%
@@ -1045,13 +1109,13 @@
\fi
}%
}
-\long\def\@EN@replaceresume#1\pause\@nil{% %% TODO: \long!?
+\long\def\@EN@replaceresume#1\pause\@nil{%
\@EN@getlabel\resume
{\@nnil
\let\@EN@next\@EN@donote
\else
\ifx\@EN@tempa\@EN@laplabel
- \long\def\@EN@next####1\resume\@nil %% TODO: \long!?
+ \long\def\@EN@next####1\resume\@nil
% %% TODO: \let [pre-defined] for efficiency!?
{\@EN@addtomacro\@EN@lemmaarg{\>####1}\@EN@donote}%
\else
@@ -1062,10 +1126,30 @@
}
\def\@EN@donote{\expandafter\@EN@process\@EN@lemmaarg \<\>\@nil}
%
-%% TODO: analogue to \@EN@robust@process.
-%% TODO: \afterassignment possible anywhere?
-%% TODO: \AtBeginDocument: \misplaced\< etc.
-%% TODO: remove testing \typeout's.
+% Variants for \@EN@notelabel in lemma tag or when moving:
+% (v1.3)
+\def\@EN@notelabel@cmd#1#2#3{%
+ \IfLemmaTag{#2}{%
+ \IfTypesetting{%
+ \PackageError{ednotes}{Misplaced \string#1}{%
+ Missing ...notelabel;
+ cf. package documentation.}%
+ }{\@EN@sphack@aux{}#3}}}
+%
+\newcommand\pause{%
+ \@EN@notelabel@cmd\pause
+ {\futurelet\@let@token\@EN@pause@ltag}\@EN@pause@aux}
+\def\@EN@pause@ltag#1{%
+ \@EN@sphack\ifx\@let@token<\expandafter\@EN@gobble@opt\fi}
+\def\@EN@gobble@opt<#1>{}
+\long\def\@EN@pause@aux#1#2\resume{%
+ \@EN@gobble@opt@till #2<>\@nil\resume}
+%
+\newcommand\resume{%
+ \@EN@notelabel@cmd\resume\@EN@gobble\@gobble}
+\newcommand\donote{%
+ \@EN@notelabel@cmd\donote\@EN@gobbletwo\@gobbletwo}
+
% v1.1: reduce number of control strings from \newlabel.
% We keep using \linelabel and \label for kind of simplicity and
% because modifying them would hardly save time or save us from
@@ -1259,6 +1343,8 @@
from user^^J-- still appropriate in final version!? --}%
\global\let\@EN@pagebreaks@finalwarn\@EN@pagebreaksfinalwarn
\pagebreak}
+%% TODO: \afterassignment possible anywhere?
+%% TODO: remove testing \typeout's.
%% Reminder about `mfparxsp.sty':
\AtBeginDocument{%
@@ -1446,3 +1532,18 @@ v1.23a /06/20 Corrected \RequirePackage{edcntwd0}-date.
v1.23b /06/22 Require manyfoot v1.9.
/06/26 LPPL v1.3c; require mfparptc v4.1; remarks on
hyphenation of first word in lemma tag.
+ [Sent to CTAN]
+v1.23c /06/27 Fix for \pause/\resume in lemma tag (Roy Flechner,
+ a few day later Christian Tapp as well).
+ [Sent to Ednotes.news]
+v1.3 2006/06/27 affirmed \long's (were TODOs); simplified
+ \@EN@gobble@pause.
+ 2006/06/28 \@EN@robust@process refined; gobble \>\@nil etc.;
+ \@EN@sphack@aux.
+ 2006/06/29 \ifLemmaTag -> \IfLemmaTag (-> doc.);
+ lemma@ellipsis -> ltag@ellipsis; \IfTypesetting;
+ \@EN@notelabel@cmd, \@EN@pause@ltag, \@EN@pause@aux.
+ 2006/07/05 \SelectAnoteRule etc. supporting
+ manyfoot's \SelectFootnoteRule.
+ 2006/07/06 \includeonly just with \@addtoreset{@ckpt};
+