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