ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: WN <wneimeijer@tiscali.nl>
To: schuster.wolfgang@googlemail.com
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Numbered subitems
Date: Wed, 24 Oct 2007 17:58:54 +0200	[thread overview]
Message-ID: <471F6BBD.4090600@tiscali.nl> (raw)
In-Reply-To: <115224fb0710240625x491b0272u81a666d82326b551@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3075 bytes --]

Hi Wolfgang

In the meantime I found another way of getting the desired result. I am 
now using
enumerations out of the box, without needing extra counters.
After a bit of experimenting, this is what I did

% test code
\defineenumeration[artikel][location=left,text=Artikel,headstyle=bold,stopper=.,distance=5pt,width=broad,number=yes]
\setupenumerations[subartikel][text=,location=left,stopper=.,width=broad,distance=5pt]
\starttext
\startartikel First artikel \stopartikel
\startsubartikel Text for item 1.1. \stopsubartikel
\startsubartikel Text for item 1.2 \stopsubartikel

\startartikel Second artikel \stopartikel
\startsubartikel Text for item 2.1 \stopsubartikel
\startsubartikel Text for item 2.2 \stopsubartikel
\stoptext

Anyways, thanks for your help
Kind regards
Wim Neimeijer
>
> 2007/10/23, WN <wneimeijer@tiscali.nl <mailto:wneimeijer@tiscali.nl>>:
>
>     Hi,
>
>     I want to make a numbered list as follows
>
>     *Artikel 1. First artikel
>
>     *1.1. Text for item 1.1.
>     1.2. Text for item 1.2
>
>     *Artikel 2. Second artikel*
>
>     2.1.  Text for item 2.1
>     2.2.  Text for item 2.2
>
>     etc.
>
>     I am trying to accomplish this with \setupitemgroup and
>     \defineitemgroup as
>     follows, but the second level start also with Artikel and is indented.
>     I looked at the some of the emails relating to numbered subitems
>     but could not find a working example.
>
>     Thanks for any help
>     Wim
>
>
>     % test code
>
>
> \def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1}
> \defineconversion[firstlevelnumber][\firstlevelnumber]
>
> \def\secondlevelnumber#1{\thefirstlevelnumber.#1}
> \defineconversion[secondlevelnumber][\secondlevelnumber]
>
>     \defineitemgroup[mylist][levels=2]
>     \setupitemgroup[mylist][1][atmargin][n,repeat]
>
>
> \setupitemgroup[mylist][1][atmargin][n,firstlevelnumber]
>
>     \setupitemgroup[mylist][1][width=5em,stopper=.,headstyle=bold,left=Artikel
>     ]
>     \setupitemgroup[mylist][2][atmargin][n,repeat]
>
>
> \setupitemgroup[mylist][2][atmargin][n,secondlevelnumber]
>
>     \setupitemgroup[mylist][2][width=2em,stopper=.,left=]
>
>     \startext
>     \startmylist
>     \head First artikel
>
>     \startmylist
>     \item Text for item 1.1.
>     \item Text for item 1.1.
>     \stopmylist
>
>     \head Second artikel
>
>     \startmylist
>     \item Text for item 2.1
>     \item Text for item 2.2
>     \stopmylist
>
>     \stopmylist
>     \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
> ___________________________________________________________________________________
>   


[-- Attachment #1.2: Type: text/html, Size: 4965 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2007-10-24 15:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-23 16:02 WN
2007-10-24 13:25 ` Wolfgang Schuster
2007-10-24 15:58   ` WN [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-09-30 14:59 numbered subitems 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
     [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

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=471F6BBD.4090600@tiscali.nl \
    --to=wneimeijer@tiscali.nl \
    --cc=ntg-context@ntg.nl \
    --cc=schuster.wolfgang@googlemail.com \
    /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).