On 6/4/2024 9:21 PM, Christoph Edenhauser wrote:
Dear Pablo, dear list
That's great, thank you very much for your suggestion.
That seems to me to be a very elegant solution to the next two problems
that were actually still ahead of me.
And now to my initial question, which I didn't specify precisely enough.
I have the following workflow in mind:
1. I have an XML file (TEI-XML),
2. then, following your brilliant suggestion, I will create an
xml-analyze-template.tex file and customise it.
3. As you suggest, now one would actually use
context --environment xml-analyze-template.tex file.xml
to typeset in a pdf file.
But I would like to convert all the XML nodes into the ConTeXt
typesetting language, and then edit/correct the text and maybe some
structure in this *.tex file.
And here comes my question: Can I use context to convert my XML-file
'file.xml' into a ConTeXt-file 'file.tex' instead of typesetting it as a
'file.pdf'.
What do you want to tweak. HEre is the lowest level approach:
<?xml version='1.0'?>
<whatever>
<p>test 1</p>
<?context-tex-directive start ?>
<?context-tex-directive red ?>
<p>test 2</p>
<?context-tex-directive stop ?>
<p>test 3</p>
</whatever>
But quite some can be done when processing and there are mechanisms to
inject e.g. page breaks using processing instruction. Probablyh not all
is documented.
There is a xml-mkiv-tricks.tex file in the distribution (no pdf is seems
so I need to add that one.)
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
___________________________________________________________________________________