Dear Contextnicians, I would like a separate numbered list in this case called Problems. I have created a small test file below. Unfortunately I cannot see how to get this to number separately from section numbering. (I was not having any success before using \definehead[Problems][section] \definelist [Problems] \definehead [Problems] [section] \setuphead [Problems] [style=\ss\bf,color=red,before={\blank {\ss\bf\red Problem }},after={\qquad}] \def\problem#1#2{{\par\Problems{#1}{\red #2}\par}} \starttext List of Problems\par\blank[big] \placelist [Problems] [alternative=c,criterium=all,width=2em,interaction=all] \blank[big] \section{Tufte} \input tufte \problem{a first problem}{the first problem description} \input tufte \problem{a second problem}{second problem description} \section{Another Tufte} \stoptext TIA -- Nigel
At 10:03 15/04/2003 +0100, you wrote:
Dear Contextnicians, I would like a separate numbered list in this case called Problems. I have created a small test file below. Unfortunately I cannot see how to get this to number separately from section numbering. (I was not having any success before using \definehead[Problems][section]
\definelist [Problems] \definehead [Problems] [section] \setuphead [Problems] [style=\ss\bf,color=red,before={\blank {\ss\bf\red Problem }},after={\qquad}]
^^^^^^^^^^^^^^^^^^^^^ that looks real messy -)
\def\problem#1#2{{\par\Problems{#1}{\red #2}\par}}
\starttext List of Problems\par\blank[big] \placelist [Problems] [alternative=c,criterium=all,width=2em,interaction=all] \blank[big] \section{Tufte} \input tufte \problem{a first problem}{the first problem description} \input tufte \problem{a second problem}{second problem description} \section{Another Tufte} \stoptext
one solution is to count yourself and feed that number into the section handler: \setuphead[Problems][ownnumber=yes,expansion=yes] \newcounter\NigelsProblem \def\problem#1#2% {\par \doglobal\increment\NigelsProblem \Problems{\NigelsProblem}{#1}{\red #2} \par} but ... this does not give you what you want because now your sections count on % use a lower level head \definehead [Problem] [subsubsubsection] % cleaned up \setuphead [Problem] [style=\ss\bf, color=red, before=\blank] % use a label text \setuplabeltext [Problem=Problems ] % use your own numbers \setuphead [Problem] [ownnumber=yes] % increment and feed \newcounter\NigelsProblem \def\problem#1% {\doglobal\increment\NigelsProblem \Problem{\NigelsProblem}{#1}} % nicer here \setuplist [Problem] [alternative=c, criterium=all, width=2em, interaction=all] % the test \starttext List of Problems \blank[big] \placelist[Problem] \blank[big] \section{Tufte} \input tufte \problem{a first problem}{the first problem description} \section{Another Tufte} \input tufte \problem{a second problem}{second problem description} \stoptext ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
At 18:49 15/04/2003 +0100, you wrote:
\definehead [Problem] [subsubsubsection] Hans, Thanks very much this does exactly as wanted. Luckily the real document only goes to subsubsection!
there are some 7 levels predefined but more are possible if needed, so subsubsubsubsub... Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Nigel King