ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* LMTX problem with doifmode in \setuplayout
@ 2021-06-08 16:14 Rik Kabel
  2021-06-08 20:11 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Rik Kabel @ 2021-06-08 16:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hello all,

Odd issue with LMTX (works fine with --luatex). \doifelsemode causes a 
failure if it is used to set a simple value such as on, off, yes, no, 
..., but works with a dimension. Perhaps better illustrated by an example:

    \definemode        [aaa]
                        [keep]
    \setuplayout       [
                         marking=\doifmodeelse{aaa}{off}{on},
    %                   marking=on,
                         grid=\doifmodeelse{aaa}{yes}{no},
    %                   grid=yes,
                         bottom=\doifmodeelse{aaa}{10mm}{20mm},
                        ]
    \starttext
        This is only a test.
    \stoptext

The problem occurs whether or not the mode is enabled. In the example, 
it fails with the mode test in the either the marking= or grid= keys, 
but has no problem with it in the bottom= key.

The error message says:

    The control sequence marked <to be read again> should not appear
    between \csname and \endcsname.

pointing to the enabled \doifmodeelse line.

The same issue occurs with the following, using \doifmode:

    \definemode        [aaa]
                        [keep]
    \setuplayout       [
                         marking=on,
                         marking=\doifmode{aaa}{off},
                        ]
    \starttext
        This is only a test.
    \stoptext

This did work without complaint a few months ago.

-- 
Rik Kabel


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

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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-08 22:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 16:14 LMTX problem with doifmode in \setuplayout Rik Kabel
2021-06-08 20:11 ` Wolfgang Schuster
2021-06-08 20:48   ` Hans Hagen
2021-06-08 21:01   ` Rik Kabel
2021-06-08 21:44     ` Wolfgang Schuster
2021-06-08 22:08       ` Hans Hagen
2021-06-08 22:16         ` Wolfgang Schuster

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).