Ampersand in \unprotect fails in LMTX
![](https://secure.gravatar.com/avatar/57c17c28c61c03706efc4a9112fad09b.jpg?s=120&d=mm&r=g)
Hi! the following example compiles with MkIV but fails in LMTX: \unprotect \setupinteraction [\c!author={Foo & Bar}] %% {Foo \& Bar} works for MkIV and LMTX \protect \starttext\null\stoptext LMTX: 1 \unprotect 2 \setupinteraction 3 [\c!author={Foo & Bar}] 4 >> \protect 5 6 \starttext\null\stoptext 7 I can't figure out why you would want to use a tab mark here. If some right brace up above has ended a previous alignment prematurely, you're probably due for more error messages. mtx-context | fatal error: return code: 256 As \& works for MkIV as well as LMTX, there's an easy workaround. But maybe this isn't intended behaviour and needs checking. ConTeXt ver: 2021.07.06 18:49 LMTX Marco
![](https://secure.gravatar.com/avatar/46562c7d27388490d62e8d7a5bc960dd.jpg?s=120&d=mm&r=g)
On 7/9/2021 12:56 PM, Marco Patzer wrote:
Hi!
the following example compiles with MkIV but fails in LMTX:
\unprotect \setupinteraction [\c!author={Foo & Bar}] %% {Foo \& Bar} works for MkIV and LMTX \protect
\starttext\null\stoptext
LMTX:
1 \unprotect 2 \setupinteraction 3 [\c!author={Foo & Bar}] 4 >> \protect 5 6 \starttext\null\stoptext 7 I can't figure out why you would want to use a tab mark here. If some right brace up above has ended a previous alignment prematurely, you're probably due for more error messages. mtx-context | fatal error: return code: 256
As \& works for MkIV as well as LMTX, there's an easy workaround. But maybe this isn't intended behaviour and needs checking. intended ... author passes different through the system in lmtx (better)
\starttext \unprotect \setupinteraction [\c!author=\detokenize{Foo & Bar}] \protect \input ward \stoptext shows the difference but why unprotect and not just \setupinteraction [author={Foo & Bar}] of course \& also works ok. ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/57c17c28c61c03706efc4a9112fad09b.jpg?s=120&d=mm&r=g)
On Fri, 9 Jul 2021 14:29:20 +0200
Hans Hagen
As \& works for MkIV as well as LMTX, there's an easy workaround. But maybe this isn't intended behaviour and needs checking. intended ... author passes different through the system in lmtx (better)
Apparently not only author. Also title, subtitle, …
\starttext
\unprotect \setupinteraction [\c!author=\detokenize{Foo & Bar}] \protect
That works as well.
but why unprotect and not just
\setupinteraction [author={Foo & Bar}]
That's just an MWE to demonstrate the problem. The actual code is part of a module (therefore it's \unprotect'ed).
of course \& also works ok.
I'll convert to \&. Thanks for the quick reply. Marco
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Marco Patzer schrieb am 09.07.2021 um 14:46:
On Fri, 9 Jul 2021 14:29:20 +0200 Hans Hagen
wrote: As \& works for MkIV as well as LMTX, there's an easy workaround. But maybe this isn't intended behaviour and needs checking. intended ... author passes different through the system in lmtx (better) Apparently not only author. Also title, subtitle, …
\starttext
\unprotect \setupinteraction [\c!author=\detokenize{Foo & Bar}] \protect That works as well.
but why unprotect and not just
\setupinteraction [author={Foo & Bar}] That's just an MWE to demonstrate the problem. The actual code is part of a module (therefore it's \unprotect'ed).
1. While most modules use \unprotect there is often no need for it. 2. You can stop and restart protected mode in a module. Wolfgang
participants (3)
-
Hans Hagen
-
Marco Patzer
-
Wolfgang Schuster