error with definestartstop and startmode
![](https://secure.gravatar.com/avatar/ce6f5c1fcc03b492f32be1f0c8e05325.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/ed6f43113e3f1cee031ebd13654fc703.jpg?s=120&d=mm&r=g)
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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/ce6f5c1fcc03b492f32be1f0c8e05325.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
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