From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: numbered subitems
Date: Mon, 1 Oct 2007 20:11:13 -0400 (EDT) [thread overview]
Message-ID: <alpine.WNT.0.9999.0710011920470.2384@nqvgln> (raw)
In-Reply-To: <5F6A7C3F-AE0A-4EC4-ACDE-4EAD4D98BC89@princeton.edu>
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
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2007-10-02 0:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-30 14:59 Alan Bowen
2007-09-30 16:11 ` Wolfgang Schuster
2007-09-30 20:19 ` Alan Bowen
2007-09-30 16:28 ` Aditya Mahajan
2007-09-30 20:19 ` Alan Bowen
2007-09-30 21:29 ` Aditya Mahajan
2007-10-01 9:54 ` Henning Hraban Ramm
2007-10-01 13:16 ` Alan Bowen
2007-10-02 0:11 ` Aditya Mahajan [this message]
[not found] ` <4DDF8044-6E42-40AB-94EF-3FCF49ED1F08@princeton.edu>
[not found] ` <alpine.WNT.0.9999.0710030926370.1620@nqvgln>
2007-10-04 12:55 ` Alan Bowen
2007-10-23 16:02 Numbered subitems WN
2007-10-24 13:25 ` Wolfgang Schuster
2007-10-24 15:58 ` WN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.WNT.0.9999.0710011920470.2384@nqvgln \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).