I fellows (and Hraban) !
I looked into how to use only the XML embedded by ConTeXt. And I found
the solution for a simple (and functional) MWE. Now I just need to apply
the principle to a slightly more complex example. Here are the two files
used to display the plain text, its translation, and the footnote.
1. the xml file 'cicero-sample-tei.xml' :
<?xml version="1.0" encoding="UTF-8"?>
<TEI>
<text>
<body>
<div type="edition" xml:lang="la">
<head>Exemplum Ciceronis</head>
<p>
<persName>Marcus Tullius Cicero</persName>
in
<placeName>Arpino</placeName>
natus est.
<note>Simple note.</note>
</p>
</div>
<div type="translation" xml:lang="fr">
<head>Traduction française</head>
<p>Cicéron naquit à Arpinum.</p>
</div>
</body>
</text>
</TEI>
2. The ConTeXt file, cicero-tei-setup.tex
% cicero-tei-setup.tex
\setuppapersize[A5]
\setupbodyfont[latin-modern]
% Load the TEI xml file
\xmlload{cicero}{cicero-sample-tei.xml}{}
\starttext
% 1. Title of edition (head of the "edition" part)
\chapter{\xmltext{cicero}{/TEI/text/body/div[@type='edition']/head}}
% 2. Paragraphe latin, with manual configuration
%
% <persName> -> petites capitales
% <placeName> -> italique
% <note> -> note de bas de page
%
\sc{\xmltext{cicero}{/TEI/text/body/div[@type='edition']/p/persName}}
\space in
\em{\xmltext{cicero}{/TEI/text/body/div[@type='edition']/p/placeName}}
\space natus est.\footnote{%
\xmltext{cicero}{/TEI/text/body/div[@type='edition']/p/note}%
}
\blank[2*big]
% 3. Translation tiltle
\subject{\xmltext{cicero}{/TEI/text/body/div[@type='translation']/head}}
% 4. Translation Paragraph
\xmltext{cicero}{/TEI/text/body/div[@type='translation']/p}
\stoptext
I'm trying to develop some documentation on processing multilingual
texts with XML-TEI... I hope I'll get somewhere!
JP
Le 29/11/2025 à 14:10, Henning Hraban Ramm a écrit :
Am 29.11.25 um 13:44 schrieb Jean-Pierre Delange via ntg-context:
local lom = require("lxp.lom")
|lua error: module'lxp.lom'notfound: no field
package.preload['lxp.lom'] no file '.../lua/lxp/lom.lua'... |
When ConTeXt can’t find your lua library, everything else makes no
sense to share (while I find your project interesting).
Where is this file? Why do you think ConTeXt should be able to find it
without a path?
If it’s within one of the texmf trees, did you run "mtxrun --generate"?
Mayybe try to delete the caches – in case you installed ConTeXt (or
TeX live) as root/Administrator, there might be a conflict with user
caches.
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry
to the Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________