ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: enumerated lists
Date: Thu, 07 Jul 2005 22:32:02 +0200	[thread overview]
Message-ID: <42CD9142.2070801@gmail.com> (raw)
In-Reply-To: <42CCDA63.8000204@online-resourcen.de>

Frank Grieshaber wrote:
> Hello all (esp. the ConTeXt-Developers),
> 
> some time ago I sent the following email to this list and got no reply 
> so I'm resending it.
> 
> Is there any possibility that this feature will be part of the next/one 
> of the next ConTeXt-versions?
> 
> Frank

I'm affraid that despite the huge amount of features that "itemize" 
offers, it should be rewritten one day. Sometimes it doesn't really work 
as expected (some comments can be found in my post 
"\setupitemize[packed,paragraph]") and the features you are mentioning 
here are missing, although they would be sensible.

>> Dear all,
>> I have a manuscript with long nested numbered enumerations and I want 
>> the numbers of all levels to be printed automatically like:
>>
>> 1. one
>> 1.1 one-one
>> 1.2 one-two
>> 2. two
>> 2.1 two-one
>> 2.2.1 two-two-one
>> ...
>>
>> Using the following prints only the current level's number, not all 
>> levels:
>>
>> \startitemize[n,packed]
>> \item
>> \item
>>   \startitemize[m,packed]
>>   \item
>>   \item
>>   \stopitemize
>> \item
>> \item
>> \stopitemize
>>
>>
>> For Latex there is the package paralist.sty for doing the desired 
>> numbering, how can this be done with ConTeXt?
>>
>> Frank

Here's a solution that:
- doesn't work (well, it's actually not far away from working)
- may not be taken as an example of nice programming habits:
   so use it at your own risk!!! (You have been warned!)
- if someone can help me to define this command, it will work:

% the command to be defined:
\def\deleteeverythingbehindthelastdot#1{#1}
\def\MyCommand{\deleteeverythingbehindthelastdot{\itemreference}}

\starttext

\setupitemize[1][n][indentnext=no]

% what should indentnext do?
%
% I thought it would not try to indent further
% Is there a way to itemize like
% 1. one
% 1.1. one-one
% 1.2. one-two
% 2. two
%
% instead of
% 1. one
%    1.1. one-one
%    1.2. one-two
% 2. two

\setupitemize[2][n,3*broad][left={\MyCommand}]
\setupitemize[3][n,4*broad][left={\MyCommand}]
\startitemize
   \item bla
   \item blabla
   \startitemize
     \item bla
     \item blabla
     \startitemize
       \item bla
       \item blabla
     \stopitemize
     \item bla
     \item bla
     \item bla
     \startitemize
       \item bla
       \item blabla
     \stopitemize
     \item bla
     \item bla
     \item bla
   \stopitemize
   \item bla
   \startitemize
     \item bla
     \item blabla
     \startitemize
       \item bla
       \item blabla
     \stopitemize
     \item bla
   \stopitemize
   \item bla
   \item bla
\stopitemize

\stoptext


Mojca


PS: But once again - If anyone will be reading this post in the mail 
archive: please, don't use this trick!!! Please check first if this 
feature has been added in the meantime.

  parent reply	other threads:[~2005-07-07 20:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-01 19:40 Frank Grieshaber
2005-07-07  7:31 ` Frank Grieshaber
2005-07-07  8:15   ` Taco Hoekwater
2005-07-07 20:32   ` Mojca Miklavec [this message]
2005-07-08  8:05     ` Hans Hagen
2005-07-08 12:13   ` Radhelorn
2005-08-04 18:14   ` Brooks Moses

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=42CD9142.2070801@gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --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).