ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: vm via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: vm <vm@klankschap.nl>
Subject: [NTG-context] Re: How can a macro check how many items are in a list?
Date: Sun, 3 Nov 2024 12:04:17 +0100	[thread overview]
Message-ID: <e0e40ad4-9be8-4eca-8baf-2cf7f7f68751@klankschap.nl> (raw)
In-Reply-To: <6e210335-ab71-2a6e-b80d-2b13b1559e33@gmail.com>

and/or add the number of items to be expected:


\starttexdefinition protected thisiymylist [#1]

   \getcommalistsize[#1]
   \doifelse{\commalistsize}{1}
     {Read the prompt below:\par}
   {Read {\em all} the \the\numexpr \commalistsize -1\relax\ prompts 
below:\par}
   \startitemize[n]
   \doloopoverlist{#1}{\startitem\recursestring\stopitem}
   \stopitemize

\stoptexdefinition


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2024-11-03 11:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <692582251.5119511.1730577725919.ref@mail.yahoo.com>
2024-11-02 20:02 ` [NTG-context] " Joel via ntg-context
2024-11-03  7:19   ` [NTG-context] " Wolfgang Schuster
2024-11-03 11:04     ` vm via ntg-context [this message]
2024-11-03 16:53   ` Bruce Horrocks
2024-11-04 17:52     ` Hans Hagen via ntg-context
2024-11-05 18:21       ` Bruce Horrocks

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=e0e40ad4-9be8-4eca-8baf-2cf7f7f68751@klankschap.nl \
    --to=ntg-context@ntg.nl \
    --cc=vm@klankschap.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).