Hi Hans, the following sample: \starttext \startTEXpage[offset=1em] \doifinsetelse{i7}{i4, i5, i7} {yes}{no} \stopTEXpage \stoptext outputs "yes" with latest from 2020.05.18 16:50, but "no" with latest from 2020.05.25 23:39. I think this may be a bug, since the sample above would only get "yes" with { i7}. Many thanks for your help, Pablo -- http://www.ousia.tk
Pablo Rodriguez schrieb am 27.05.2020 um 22:31:
Hi Hans,
the following sample:
\starttext \startTEXpage[offset=1em] \doifinsetelse{i7}{i4, i5, i7} {yes}{no} \stopTEXpage \stoptext
outputs "yes" with latest from 2020.05.18 16:50, but "no" with latest from 2020.05.25 23:39.
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.
Wolfgang
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). Many thanks for your help, Pablo -- http://www.ousia.tk
On Wed, May 27, 2020 at 11:28 PM Pablo Rodriguez
Without commas, lists are harder both to read and to write (at least, to me).
what about \starttext \startTEXpage[offset=1em] \doifinsetelse{i7}{% i4,% i5,% i7,% } {yes}{no} \stopTEXpage \stoptext here seems to work. -- luigi
On 5/27/20 11:58 PM, luigi scarso wrote:
On Wed, May 27, 2020 at 11:28 PM Pablo Rodriguez wrote: Without commas, lists are harder both to read and to write (at least, to me).
what about
\starttext \startTEXpage[offset=1em] \doifinsetelse{i7}{% i4,% i5,% i7,% } {yes}{no} \stopTEXpage \stoptext
here seems to work.
Many thanks for your reply, Luigi. This is a better approach for me. Many thanks for help, Pablo -- http://www.ousia.tk
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
On 5/27/2020 10:39 PM, Wolfgang Schuster wrote:
Pablo Rodriguez schrieb am 27.05.2020 um 22:31:
Hi Hans,
the following sample:
\starttext \startTEXpage[offset=1em] \doifinsetelse{i7}{i4, i5, i7} {yes}{no} \stopTEXpage \stoptext
outputs "yes" with latest from 2020.05.18 16:50, but "no" with latest from 2020.05.25 23:39.
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. we can use the old one, so only the raw variants then ignore the space; best to be downward compatible, even if this was never the formal spec (more a side effect)
it's only 20% slower and internally we we often use the raw one Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 5/28/20 12:23 AM, Hans Hagen wrote:
On 5/27/2020 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.
we can use the old one, so only the raw variants then ignore the space; best to be downward compatible, even if this was never the formal spec (more a side effect)
Just in case it might be relevant. I have been using \doifinsetelse for two months now. Backwards compatibility is not an issue for me (after Luigi provided a better approach to the issue) Pablo -- http://www.ousia.tk
participants (4)
-
Hans Hagen
-
luigi scarso
-
Pablo Rodriguez
-
Wolfgang Schuster