ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jorge Manuel <desdechaves@gmail.com>
To: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Issue with Custom Conversion Code in Latest Version of ConTeXt
Date: Sat, 12 Oct 2024 11:59:37 +0100	[thread overview]
Message-ID: <95005a33-5c13-4e0a-8cb9-da33b86fa5be@Spark> (raw)
In-Reply-To: <d9779a2a-55d2-aac4-2e7a-f07eabcfcbae@gmail.com>


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

To achieve a norepeat in a specific itemize block, I need to introduce the norepeat at a higher level. This affects all the children of that itemize. See the example below, please. In the multiple-choice block, I want to avoid repetition, but afterward, I want to restore the default behavior.

\define[1]\BoxedNumber{\inframed[width=3ex]{\convertnumber{n}{#1}}}

\defineconversion [BoxedNumber] [\BoxedNumber]

\starttext

\startitemize[BoxedNumber,fit,repeat][stopper=,distance=\spaceamount]
   \item xxx
   \startitemize[BoxedNumber,fit, norepeat][stopper=,distance=\spaceamount]
     \item multiple choice
 \startitemize[A, columns, two, random, fit][stopper={)},style=bold] %%
 \item choice 1
 \item choice 2
 \item choice 3
 \item choice 4
 \stopitemize

 \item normal question 1
 \startitemize[BoxedNumber, repeat] %%
 \item question 1 \par\thinrules[n=2]
 \item question2 \par\thinrules[n=2]

 \stopitemize


   \stopitemize
\stopitemize

\stoptext

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

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

___________________________________________________________________________________
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-10-12 11:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c162a633-8188-4fdb-bce9-2304c4823943@Spark>
2024-10-06 15:44 ` [NTG-context] " Jorge Manuel
2024-10-07 19:51   ` [NTG-context] " Wolfgang Schuster
2024-10-07 21:16   ` Wolfgang Schuster
2024-10-11 11:41     ` desdechaves
2024-10-11 17:15       ` Wolfgang Schuster
2024-10-12  9:40         ` Jorge Manuel
2024-10-12 10:12           ` Wolfgang Schuster
2024-10-12 10:59             ` Jorge Manuel [this message]
2024-10-12 11:24               ` Jorge Manuel
2024-10-12 11:58                 ` Wolfgang Schuster

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=95005a33-5c13-4e0a-8cb9-da33b86fa5be@Spark \
    --to=desdechaves@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.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).