* temporarily disabling enumeration numbering
@ 2010-04-05 12:04 Vianney le Clément
2010-04-05 12:33 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Vianney le Clément @ 2010-04-05 12:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: temporarily disabling enumeration numbering
2010-04-05 12:04 temporarily disabling enumeration numbering Vianney le Clément
@ 2010-04-05 12:33 ` Wolfgang Schuster
2010-04-05 12:48 ` Vianney le Clément
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2010-04-05 12:33 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen
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}
\x1f\x1e
%\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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: temporarily disabling enumeration numbering
2010-04-05 12:33 ` Wolfgang Schuster
@ 2010-04-05 12:48 ` Vianney le Clément
2010-04-05 13:39 ` Vianney le Clément
0 siblings, 1 reply; 5+ messages in thread
From: Vianney le Clément @ 2010-04-05 12:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thanks for the patch.
Vianney
On Mon, Apr 5, 2010 at 14:33, Wolfgang Schuster
<schuster.wolfgang@googlemail.com> wrote:
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: temporarily disabling enumeration numbering
2010-04-05 12:48 ` Vianney le Clément
@ 2010-04-05 13:39 ` Vianney le Clément
2010-04-05 13:52 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Vianney le Clément @ 2010-04-05 13:39 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: temporarily disabling enumeration numbering
2010-04-05 13:39 ` Vianney le Clément
@ 2010-04-05 13:52 ` Wolfgang Schuster
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2010-04-05 13:52 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-05 13:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-05 12:04 temporarily disabling enumeration numbering Vianney le Clément
2010-04-05 12:33 ` Wolfgang Schuster
2010-04-05 12:48 ` Vianney le Clément
2010-04-05 13:39 ` Vianney le Clément
2010-04-05 13:52 ` Wolfgang Schuster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).