[NTG-context] XML Processing with Verbatim (VIM-Typing)

Andreas Schneider aksdb at gmx.de
Tue Feb 10 17:59:17 CET 2015


as a few other topics on this Mailing List already discussed, it's not 
(easily?) possible to use \starttyping\stoptyping within XML setups. If 
it was "simple" verbatim, there would be a few workarounds.
However, I want to provide formatted verbatim (i.e. \startJSON 
\stopJSON, after having \definevimtyping[JSON][syntax=javascript]). That 
typing environment will be further customized (by adding text background 
with border, etc.).

I don't see a simple way to work around this without manually 
typesetting the code highlighting (which I don't want. I simply want 
<json>{someCode}</json> inside the XML file).

Is there anything I can do to make this work? Maybe with preparing a 
buffer? (with Lua?)

Thanks in advance, for any help you can provide :-)

-- Minimal Example:


   function xml.functions.processJSON(t)
     lxml.verbatim(t, "\\startJSON", "\\stopJSON")


\startxmlsetups xml:initialize


\startxmlsetups xml:test

\startxmlsetups xml:description

\startxmlsetups xml:json



More information about the ntg-context mailing list