[NTG-context] Re: error with definestartstop and startmode

2023-12-18 Thread Aditya Mahajan
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___
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
___


[NTG-context] Re: error with definestartstop and startmode

2023-12-17 Thread Wolfgang Schuster

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
___


[NTG-context] Re: error with definestartstop and startmode

2023-12-17 Thread Peter Münster
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
___


[NTG-context] Re: error with definestartstop and startmode

2023-12-16 Thread Hans Hagen via ntg-context

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
___