I need to produce an lengthy itemization of the form: 1.AAAA 1.1 aaaa 1.2 bbbb 2.BBBB 2.1 cccc I can get: 1.AAAA 1 aaaa 2 bbbb 2.BBBB 1 cccc easily enough, but how can I get the main division number to repeat in the subitem numeration? Alan
2007/9/30, Alan Bowen
I need to produce an lengthy itemization of the form: 1.AAAA 1.1 aaaa 1.2 bbbb 2.BBBB 2.1 cccc
I can get: 1.AAAA 1 aaaa 2 bbbb 2.BBBB 1 cccc easily enough, but how can I get the main division number to repeat in the subitem numeration?
Alan
\def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1} \defineconversion[firstlevelnumber][\firstlevelnumber] \def\secondlevelnumber#1{\thefirstlevelnumber.#1} \defineconversion[secondlevelnumber][\secondlevelnumber] \starttext \startitemize[firstlevelnumber] \item AAAA \startitemize[secondlevelnumber] \item aaaa \item bbbb \stopitemize \item BBBB \startitemize[secondlevelnumber] \item cccc \item dddd \stopitemize \stopitemize \stoptext Wolfgang
Thanks, Wolfgang. This is good start. The problem now is that with \def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1} \defineconversion[firstlevelnumber][\firstlevelnumber] \def\secondlevelnumber#1{\thefirstlevelnumber.#1} \defineconversion[secondlevelnumber][\secondlevelnumber] \starttext \setupitemize[n,packed,joinedup,serried] \startitemize[ firstlevelnumber] \item item 1 \startitemize[secondlevelnumber] \item item 1.1 \item item 1.2 \item item 1.3 \stopitemize \item item 2 \startitemize[secondlevelnumber] \item item 2.1 \item item 2.2 \item{ item 2.3 \stopitemize \item item 3 \startitemize[secondlevelnumber] \item item 3.1 \item item 3.2 \stopitemize \stopitemize • the subitem numeration ends with a full stop which I am unable to remove using stopper=0. (Inserting it in the second level \setupitemize ruins the numeration • the subitem text is smashed against the numeration All best, Alan On Sep 30, 2007, at 12:11 PM, Wolfgang Schuster wrote:
2007/9/30, Alan Bowen
: I need to produce an lengthy itemization of the form: 1.AAAA 1.1 aaaa 1.2 bbbb 2.BBBB 2.1 cccc
I can get: 1.AAAA 1 aaaa 2 bbbb 2.BBBB 1 cccc easily enough, but how can I get the main division number to repeat in the subitem numeration?
Alan
\def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1} \defineconversion[firstlevelnumber][\firstlevelnumber]
\def\secondlevelnumber#1{\thefirstlevelnumber.#1} \defineconversion[secondlevelnumber][\secondlevelnumber]
\starttext \startitemize[firstlevelnumber] \item AAAA \startitemize[secondlevelnumber] \item aaaa \item bbbb \stopitemize \item BBBB \startitemize[secondlevelnumber] \item cccc \item dddd \stopitemize \stopitemize \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ______________________________________________________________________ _____________
On Sun, 30 Sep 2007, Alan Bowen wrote:
I need to produce an lengthy itemization of the form: 1.AAAA 1.1 aaaa 1.2 bbbb 2.BBBB 2.1 cccc
I can get: 1.AAAA 1 aaaa 2 bbbb 2.BBBB 1 cccc easily enough, but how can I get the main division number to repeat in the subitem numeration?
From core-itm.tex
% \startbuffer % \item % \startitemize[n] % \item item 1.1 % \item item 1.2 % \startitemize[n] \item item 1.2.1 \item item 1.2.2 \stopitemize % \item item 1.3 % \stopitemize % \item % \startitemize[n] \item item 2.1 \item item 2.2 \stopitemize % \item item 3 % \startitemize[n] \item item 3.1 \item item 3.2 \stopitemize % \item % \startitemize[n] \item item 4.1 \item item 4.2 \stopitemize % \stopbuffer % % \startitemize[n,repeat,6*broad,packed] \getbuffer \stopitemize \blank[3*big] % \startitemize[n,repeat,packed] \getbuffer \stopitemize \blank[3*big] % \setupitemize[each][atmargin][width=3em] % \startitemize[n,repeat,packed] \getbuffer \stopitemize Aditya
Thanks, Aditya, I have adapted this as follows— \startbuffer \item item 1 \startitemize[n,stopper={},width=1em] \item item 1.1 \item item 1.2 \item item 1.3 \stopitemize \item item 2 \startitemize[n,stopper={},width=1em] \item item 2.1 \item item 2.2 \item item 2.3 \stopitemize \item item 3 \startitemize[n,stopper={},width=1em] \item item 3.1 \item item 3.2 \stopitemize \stopbuffer % \setupitemize[n,serried,packed,joinedup] \startitemize[repeat]\getbuffer\stopitemize and everything works, except that I cannot seems get the subitems indented. Right now they fall directly beneath the main items. All best, Alan On Sep 30, 2007, at 12:28 PM, Aditya Mahajan wrote:
On Sun, 30 Sep 2007, Alan Bowen wrote:
I need to produce an lengthy itemization of the form: 1.AAAA 1.1 aaaa 1.2 bbbb 2.BBBB 2.1 cccc
I can get: 1.AAAA 1 aaaa 2 bbbb 2.BBBB 1 cccc easily enough, but how can I get the main division number to repeat in the subitem numeration?
From core-itm.tex
% \startbuffer % \item % \startitemize[n] % \item item 1.1 % \item item 1.2 % \startitemize[n] \item item 1.2.1 \item item 1.2.2 \stopitemize % \item item 1.3 % \stopitemize % \item % \startitemize[n] \item item 2.1 \item item 2.2 \stopitemize % \item item 3 % \startitemize[n] \item item 3.1 \item item 3.2 \stopitemize % \item % \startitemize[n] \item item 4.1 \item item 4.2 \stopitemize % \stopbuffer % % \startitemize[n,repeat,6*broad,packed] \getbuffer \stopitemize \blank[3*big] % \startitemize[n,repeat,packed] \getbuffer \stopitemize \blank[3*big] % \setupitemize[each][atmargin][width=3em] % \startitemize[n,repeat,packed] \getbuffer \stopitemize
Aditya ______________________________________________________________________ _____________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ______________________________________________________________________ _____________
On Sun, 30 Sep 2007, Alan Bowen wrote:
Thanks, Aditya, I have adapted this as follows— \startbuffer \item item 1 \startitemize[n,stopper={},width=1em] \item item 1.1 \item item 1.2 \item item 1.3 \stopitemize \item item 2 \startitemize[n,stopper={},width=1em] \item item 2.1 \item item 2.2 \item item 2.3 \stopitemize \item item 3 \startitemize[n,stopper={},width=1em] \item item 3.1 \item item 3.2 \stopitemize \stopbuffer % \setupitemize[n,serried,packed,joinedup] \startitemize[repeat,4*borad]\getbuffer\stopitemize ^^^^^^^ (add this)
and everything works, except that I cannot seems get the subitems indented. Right now they fall directly beneath the main items.
Aditya
Am 2007-09-30 um 23:29 schrieb Aditya Mahajan:
\startitemize[repeat,4*borad]\getbuffer\stopitemize ^^^^^^^ (add this)
been too much to the movies, eh? ;-) I guess that should be "broad"... Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
Hi, Aditya— Many thanks. That works and looks quite good. I experimented and find that \startitemize[repeat,broad]\getbuffer\stopitemize looks best. The only downside is that there is still largish a gap between the stopper and the text of the main item as in 1. History 1.1 Pre-Greek (Babylonian and Egyptian) sundials 1.2 Greek and Roman sundials 1.3 Byzantine sundials when 1. History 1.1 Pre-Greek (Babylonian and Egyptian) sundials 1.2 Greek and Roman sundials 1.3 Byzantine sundials is the goal. Sadly, adding “serried” destroys the indentation of the subitems. Alan On Sep 30, 2007, at 5:29 PM, Aditya Mahajan wrote:
On Sun, 30 Sep 2007, Alan Bowen wrote:
Thanks, Aditya, I have adapted this as follows— \startbuffer \item item 1 \startitemize[n,stopper={},width=1em] \item item 1.1 \item item 1.2 \item item 1.3 \stopitemize \item item 2 \startitemize[n,stopper={},width=1em] \item item 2.1 \item item 2.2 \item item 2.3 \stopitemize \item item 3 \startitemize[n,stopper={},width=1em] \item item 3.1 \item item 3.2 \stopitemize \stopbuffer % \setupitemize[n,serried,packed,joinedup] \startitemize[repeat,4*borad]\getbuffer\stopitemize ^^^^^^^ (add this)
and everything works, except that I cannot seems get the subitems indented. Right now they fall directly beneath the main items.
Aditya ______________________________________________________________________ _____________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ______________________________________________________________________ _____________
Hi Alan, On Mon, 1 Oct 2007, Alan Bowen wrote:
1. History 1.1 Pre-Greek (Babylonian and Egyptian) sundials 1.2 Greek and Roman sundials 1.3 Byzantine sundials
is the goal. Sadly, adding “serried” destroys the indentation of the subitems.
I could not find a clean way to do this. So, I redefined ¥checkforrepeatedlistitem. Hans, isn't there a clean way to do this? ¥setupitemize[1][fit,broad] ¥setupitemize[2][width=2em] ¥setupitemize[each][n] ¥def¥checkforrepeatedlistitem {¥ifnum¥itemlevel=¥plusone ¥initializeboxstack{item}% ¥fi ¥ifconditional¥repeatlistitem ¥savebox{item}{¥itemlevel}{¥hbox{¥copy8}}% ¥setbox8¥hbox %to ¥wd8 {¥setbox¥scratchbox¥hbox {¥scratchcounter¥itemlevel ¥advance¥scratchcounter¥minusone ¥dorecurse¥scratchcounter{¥foundbox{item}{¥recurselevel}}}% ¥ifnum¥itemlevel>¥plusone ¥ifdim¥wd¥scratchbox>¥zeropoint %¥hskip-¥dimen2 ¥box¥scratchbox ¥fi ¥fi ¥box8 }% ¥fi} ¥starttext ¥startitemize[repeat] ¥item item 1 ¥startitemize ¥item item 1.1 ¥item item 1.2 ¥item item 1.3 ¥stopitemize ¥item item 2 ¥startitemize ¥item item 2.1 ¥item item 2.2 ¥item item 2.3 ¥stopitemize ¥item item 3 ¥startitemize ¥item item 3.1 ¥item item 3.2 ¥stopitemize ¥stopitemize ¥stoptext Aditya
participants (4)
-
Aditya Mahajan
-
Alan Bowen
-
Henning Hraban Ramm
-
Wolfgang Schuster