On 8/30/2025 12:23 AM, Thangalin wrote:
\startbuffer[test]
<?xml version="1.0"?>
<document><pre>
|aaa|bbb|ccc|
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
</pre></document>
\stopbuffer
\startxmlsetups xml:setup
\xmlsetsetup{\xmldocument}{*}{-}
\xmlsetsetup{\xmldocument}{document|pre}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:setup}
\startxmlsetups xml:document
\startdocument \xmlflush{#1} \stopdocument
\stopxmlsetups
\define[2]\Verbatim{
\startxmldisplayverbatim
\setupbodyfont[#1]
\xmlflushspacewise{#2}
\stopxmldisplayverbatim
}
\startxmlsetups xml:pre
\Verbatim{TextFontIN}{#1}
\Verbatim{TextFontRM}{#1}
\Verbatim{TextFontSP}{#1}
\Verbatim{TextFontFC}{#1}
\Verbatim{TextFontLM}{#1}
\stopxmlsetups
\definefontfamily [TextFontSP] [tt] [Source Code Pro]
\definefontfamily [TextFontRM] [tt] [Roboto Mono]
\definefontfamily [TextFontIN] [tt] [Inconsolata]
\definefontfamily [TextFontFC] [tt] [Fira Code]
\definefontfamily [TextFontLM] [tt] [Luxi Mono]
\usetypescript[TextFont]
\xmlprocessbuffer{main}{test}{}
You can try with:
\define[2]\Verbatim{
\start
\showglyphs
\startxmldisplayverbatim
\obeyspaces
\xmlflushspacewise{#2}
\stopxmldisplayverbatim
\stop
}
\definefont[TestFont][inconsolata-regular.ttf]
until Wolfgang gives you the perfect answer wrt \definefontfamily.
Maybe we need some extra 'space/glue hack'.
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
___________________________________________________________________________________