error with definestartstop and startmode

Hi, I get an "runaway error" with the following example: --8<---------------cut here---------------start------------->8--- \definestartstop[H][color=blue, before={\startmode[h]}, after={\stopmode}] \starttext test \startH TEST \stopH \stoptext --8<---------------cut here---------------end--------------->8--- How could I create such start-stop pair please? TIA for any hints, -- Peter

On 12/16/2023 9:17 AM, Peter Münster wrote:
Hi,
I get an "runaway error" with the following example:
--8<---------------cut here---------------start------------->8--- \definestartstop[H][color=blue, before={\startmode[h]}, after={\stopmode}] \starttext test \startH TEST \stopH \stoptext --8<---------------cut here---------------end--------------->8---
How could I create such start-stop pair please? doesn't work because \stopmode is a delimiter when shipped
\usemodule[abbreviations-logos] \defineblock [H] [before=\startcolor[blue],after=\stopcolor] \keepblocks[H] \starttext test \beginH TEST \endH test \stoptext 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 Sat, Dec 16 2023, Hans Hagen via ntg-context wrote:
\usemodule[abbreviations-logos] \defineblock [H] [before=\startcolor[blue],after=\stopcolor] \keepblocks[H]
Thanks for this solution. Is there also something for inline-mode? Example: test \beginH TEST\endH test TIA, -- Peter

Peter Münster schrieb am 17.12.2023 um 10:09:
On Sat, Dec 16 2023, Hans Hagen via ntg-context wrote:
\usemodule[abbreviations-logos] \defineblock [H] [before=\startcolor[blue],after=\stopcolor] \keepblocks[H] Thanks for this solution.
Is there also something for inline-mode? Example:
test \beginH TEST\endH test
You can create different versions of your environment and let context choose one whether the mode is enabled or disabled. %\enablemode[H] \startmode [H] \definestartstop [H] [color=blue] \stopmode \startnotmode [H] \define\startH{\ignoreupto\stopH} \stopnotmode \starttext xxx \startH yyy \stopH zzz \stoptext Wolfgang

On Sun, 17 Dec 2023, Wolfgang Schuster wrote:
Peter Münster schrieb am 17.12.2023 um 10:09:
On Sat, Dec 16 2023, Hans Hagen via ntg-context wrote:
\usemodule[abbreviations-logos] \defineblock [H] [before=\startcolor[blue],after=\stopcolor] \keepblocks[H] Thanks for this solution.
Is there also something for inline-mode? Example:
test \beginH TEST\endH test
You can create different versions of your environment and let context choose one whether the mode is enabled or disabled.
%\enablemode[H]
\startmode [H] \definestartstop [H] [color=blue] \stopmode
\startnotmode [H] \define\startH{\ignoreupto\stopH} \stopnotmode
\starttext
xxx \startH yyy \stopH zzz
\stoptext
I do something similar: \definebuffer[H] \startmode[H] \definestartstop[H][color=blue] \stopmode Aditya
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Peter Münster
-
Wolfgang Schuster