ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] error with definestartstop and startmode
@ 2023-12-16  8:17 Peter Münster
  2023-12-16 18:33 ` [NTG-context] " Hans Hagen via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Münster @ 2023-12-16  8:17 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: error with definestartstop and startmode
  2023-12-16  8:17 [NTG-context] error with definestartstop and startmode Peter Münster
@ 2023-12-16 18:33 ` Hans Hagen via ntg-context
  2023-12-17  9:09   ` Peter Münster
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen via ntg-context @ 2023-12-16 18:33 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: error with definestartstop and startmode
  2023-12-16 18:33 ` [NTG-context] " Hans Hagen via ntg-context
@ 2023-12-17  9:09   ` Peter Münster
  2023-12-17  9:31     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Münster @ 2023-12-17  9:09 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: error with definestartstop and startmode
  2023-12-17  9:09   ` Peter Münster
@ 2023-12-17  9:31     ` Wolfgang Schuster
  2023-12-18  8:11       ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2023-12-17  9:31 UTC (permalink / raw)
  To: ntg-context

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: error with definestartstop and startmode
  2023-12-17  9:31     ` Wolfgang Schuster
@ 2023-12-18  8:11       ` Aditya Mahajan
  0 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2023-12-18  8:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 917 bytes --]

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2023-12-18 16:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-16  8:17 [NTG-context] error with definestartstop and startmode Peter Münster
2023-12-16 18:33 ` [NTG-context] " Hans Hagen via ntg-context
2023-12-17  9:09   ` Peter Münster
2023-12-17  9:31     ` Wolfgang Schuster
2023-12-18  8:11       ` Aditya Mahajan

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