Johann Birnick schrieb am 26.11.2020 um 19:26:
I didn't want to copy paste it :D Just add [option=XML] to \starttext like this:

Why do pass a option for the typing environment to \starttext?

\definetextbackground[code][background=color, backgroundcolor=lightgray,
frame=off, location=paragraph]

\setuptyping[before={\startbackground[code]}, after={\stopbackground}]

\starttext[option=XML]
\starttyping
This is some code
a second line
\stoptyping
\stoptext

When I use \definetyping[Mytyping][option=XML] and then use \startMytyping ...
\stopMytyping nothing changes.
???

\definetextbackground
  [Code]
  [          frame=off,
        background=color,
   backgroundcolor=lightgray,
          location=paragraph]

\definetyping
  [Mytyping]
  [option=XML]

\setuptyping
 %[Mytyping]
  [before={\blank\starttextbackground[Code]},
    after={\stoptextbackground\blank}]

\starttext

\startMytyping
<empty/>
\stopMytyping

\starttyping[option=XML]
<empty/>
\stoptyping

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to