ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: bug in \doifinset
Date: Thu, 28 May 2020 00:17:52 +0200	[thread overview]
Message-ID: <6fb85c21-1a8e-4739-9e71-c4b50ed9e801@gmail.com> (raw)
In-Reply-To: <5f07a61f-b4a1-211e-861a-c7ba9f63329b@gmx.es>

Pablo Rodriguez schrieb am 27.05.2020 um 23:28:
> On 5/27/20 10:39 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez schrieb am 27.05.2020 um 22:31:
>>> [...]
>>> I think this may be a bug, since the sample above would only get "yes"
>>> with { i7}.
>> No spaces are allowed in these lists. Older versions of the command
>> removed the spaces before the entries but the current version is stricter.
> 
> Many thanks for your reply, Wolfgang.
> 
> Without commas, lists are harder both to read and to write (at least, to
> me).

The \doifinset etc. commands are used for internal checks when a key 
accepts multiple values with the same result and none of the existing 
mechanism has a space after the comma. As a result of this I saw no 
problem with this limitation and without a more detailed example from 
you there is no reason to change this.

As Luigi already has shown there are ways to format your code in a way 
to create readable lists, below is another one but in the end it depends 
on your use case.

%%%% begin example
\starttext

\startsetups [check]

     \doifelseinset
         {
             i7
         }
         {
             i4,
             i5,
             i7,
         }
         {yes}
         {no}

\stopsetups

\directsetup{check}

\stoptext
%%%% end example

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2020-05-27 22:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 20:31 Pablo Rodriguez
2020-05-27 20:39 ` Wolfgang Schuster
2020-05-27 21:28   ` Pablo Rodriguez
2020-05-27 21:58     ` luigi scarso
2020-05-28 19:08       ` Pablo Rodriguez
2020-05-27 22:17     ` Wolfgang Schuster [this message]
2020-05-27 22:23   ` Hans Hagen
2020-05-28 19:12     ` Pablo Rodriguez

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=6fb85c21-1a8e-4739-9e71-c4b50ed9e801@gmail.com \
    --to=wolfgang.schuster.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).