temporarily disabling enumeration numbering
Hello again, Section 10.3 of the manual says that one can disable numbering for one item of an enumeration by putting [-]. However, this seems to affect the following item instead of the current one. For example, \defineenumeration[MyEnum][location=left] \starttext \MyEnum First\par \MyEnum[-] Second\par \MyEnum Third\par \MyEnum Fourth\par \stoptext removes the number of the third line, instead of the second one. Vianney
Am 05.04.10 14:04, schrieb Vianney le Clément:
Hello again,
Section 10.3 of the manual says that one can disable numbering for one item of an enumeration by putting [-]. However, this seems to affect the following item instead of the current one. For example,
\defineenumeration[MyEnum][location=left] \starttext \MyEnum First\par \MyEnum[-] Second\par \MyEnum Third\par \MyEnum Fourth\par \stoptext
removes the number of the third line, instead of the second one.
A perfect example. \unprotect %\def\@@makedescription[#1]#2% % {\postponenotes % new, assumes grouping % \doenumerationcheckconditions % \dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#2},\c!bookmark=,\c!list=][]% % \@@dostartdescriptionindeed} \def\@@makedescription[#1]#2% {\postponenotes % new, assumes grouping \doenumerationcheckconditions{#1}% \dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#2},\c!bookmark=,\c!list=][]% \@@dostartdescriptionindeed} %\def\doenumerationcheckconditions % {\doifelse{\descriptionparameter\c!number}\v!yes % {\ifx\currentdescriptionreference\enumerationdisablenumbersignal % \setfalse\enumerationnumberenabled \else \settrue\enumerationnumberenabled % \fi}% % {\setfalse\enumerationnumberenabled}% % \edef\currentenumerationcoupling{\descriptionparameter\c!coupling}} \def\doenumerationcheckconditions#1% {\doifelse{\descriptionparameter\c!number}\v!yes {\doifelse{#1}\enumerationdisablenumbersignal\setfalse\settrue\enumerationnumberenabled} {\setfalse\enumerationnumberenabled}% \edef\currentenumerationcoupling{\descriptionparameter\c!coupling}} \protect \defineenumeration[MyEnum][location=left] \starttext \MyEnum First\par \MyEnum[-] Second\par \MyEnum Third\par \MyEnum Fourth\par \stoptext Wolfgang
Thanks for the patch.
Vianney
On Mon, Apr 5, 2010 at 14:33, Wolfgang Schuster
Am 05.04.10 14:04, schrieb Vianney le Clément:
Hello again,
Section 10.3 of the manual says that one can disable numbering for one item of an enumeration by putting [-]. However, this seems to affect the following item instead of the current one. For example,
\defineenumeration[MyEnum][location=left] \starttext \MyEnum First\par \MyEnum[-] Second\par \MyEnum Third\par \MyEnum Fourth\par \stoptext
removes the number of the third line, instead of the second one.
A perfect example.
\unprotect
%\def\@@makedescription[#1]#2% % {\postponenotes % new, assumes grouping % \doenumerationcheckconditions % \dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#2},\c!bookmark=,\c!list=][]% % \@@dostartdescriptionindeed}
\def\@@makedescription[#1]#2% {\postponenotes % new, assumes grouping \doenumerationcheckconditions{#1}%
\dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#2},\c!bookmark=,\c!list=][]% \@@dostartdescriptionindeed} %\def\doenumerationcheckconditions % {\doifelse{\descriptionparameter\c!number}\v!yes % {\ifx\currentdescriptionreference\enumerationdisablenumbersignal % \setfalse\enumerationnumberenabled \else \settrue\enumerationnumberenabled % \fi}% % {\setfalse\enumerationnumberenabled}% % \edef\currentenumerationcoupling{\descriptionparameter\c!coupling}}
\def\doenumerationcheckconditions#1% {\doifelse{\descriptionparameter\c!number}\v!yes
{\doifelse{#1}\enumerationdisablenumbersignal\setfalse\settrue\enumerationnumberenabled} {\setfalse\enumerationnumberenabled}% \edef\currentenumerationcoupling{\descriptionparameter\c!coupling}}
\protect
\defineenumeration[MyEnum][location=left] \starttext \MyEnum First\par \MyEnum[-] Second\par \MyEnum Third\par \MyEnum Fourth\par \stoptext
Wolfgang
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
The patch seems to break \footnote: \unprotect % workaround \def\@@makedescription[#1]#2% {\postponenotes % new, assumes grouping \doenumerationcheckconditions{#1}% \dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#2},\c!bookmark=,\c!list=][]% \@@dostartdescriptionindeed} \def\doenumerationcheckconditions#1% {\doifelse{\descriptionparameter\c!number}\v!yes {\doifelse{#1}\enumerationdisablenumbersignal\setfalse\settrue\enumerationnumberenabled} {\setfalse\enumerationnumberenabled}% \edef\currentenumerationcoupling{\descriptionparameter\c!coupling}} \protect \starttext Blabla\footnote{blabla} \stoptext writes "Blablaln:linenotefootnote". Vianney
Am 05.04.10 15:39, schrieb Vianney le Clément:
The patch seems to break \footnote:
New attempt. \unprotect % strc-des.mkiv \def\@@makedescription[#1]#2% {\postponenotes % new, assumes grouping \edef\currentdescriptionreference{#1}% \doenumerationcheckconditions \dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#2},\c!bookmark=,\c!list=][]% \@@dostartdescriptionindeed} % strc-not.mkiv \def\@@notemakedescription[#1]#2#3% {\ifnotesenabled \edef\currentdescriptionreference{#1}% \iftrialtypesetting \doenumerationcheckconditions \let\currentnote\currentdescriptionmain \typesetdummynotesymbol \else \begingroup \doenumerationcheckconditions \let\currentnote\currentdescriptionmain \dodescriptioncomponent[\c!reference=#1,\c!label={\descriptionparameter\c!text},\c!title={#3},\c!list=,\c!bookmark=,][]% \xdef\currentnotenumber{\ctxlua{structure.notes.store("\currentnote",\currentdescriptionnumberentry)}}% \settrue\processingnote \ifconditional\skipnoteplacement \globallet\lastnotesymbol\dolastnotesymbol \else \iftypesettinglines % otherwise problems with \type <crlf> {xxx} \ignorelines % makes footnotes work in \startlines ... \stoplines \fi \ifnotesymbol \dolastnotesymbol \else \unskip\unskip \globallet\lastnotesymbol\dolastnotesymbol \fi \fi \ifconditional\postponingnotes % todo: per note class \global\settrue\postponednote \else\ifconditional\inlocalnotes % todo: per note class \global\settrue\postponednote \else \handlenoteinsert\currentnote\currentnotenumber \fi\fi \endgroup \fi \fi \ifconditional\skipnoteplacement \global\setfalse\skipnoteplacement \else \kern\notesignal\relax % \relax is needed to honor spaces \fi} \defineenumeration[test][location=left] \protect \starttext \test First \par \test[-] Second\par \test Third \par \test Fourth\par Blabla\footnote{blabla} \stoptext Wolfgang
participants (2)
-
Vianney le Clément
-
Wolfgang Schuster