[XeTeX] TEI XML and XeTeX

Yves Codet ycodet at club-internet.fr
Tue Nov 8 20:18:06 CET 2005


Hello.

Le 8 nov. 05, à 15:33, Herbert Schulz a écrit :

> I can see what to set to false but I'm not sure where you place the 
> preamble items. I suppose it's between that <xd:detail> and 
> </xd:detail>.

<xd:detail> is to document the stylesheet ; what you must edit is
--- line 72:
	<xsl:param name="reencode">true</xsl:param>
which becomes:
	<xsl:param name="reencode">false</xsl:param>
--- line 40:
	<xsl:template name="latexPreambleHook"/>
which becomes something like:
	<xsl:template name="latexPreambleHook"> (without the slash)
	<xsl:text>
	\usepackage{fontspec}
	\setromanfont{Lucida Grande}
	</xsl:text>
	</xsl:template>

> As you can tell I know virtually nothing about xml no less the docbook 
> or tei ``dialects'' (isn't that what they really are? --- well maybe 
> not) but I'd like to learn.

I'm a naive user myself. As I understand it, XML is a metalanguage 
which allows to define as many languages, or dialects, as you like, 
according to certain rules. TEI and DocBook are two such languages. TEI 
is rather meant for literary texts, and DocBook rather for sciences.

> For me, seeing something happen (transform, etc.) would go a long way 
> to getting some grasp of how things happen.

I wouldn't say it's simple, but it's not that hard since I could do it 
:)

> Ok... suppose I've got a tei document; how do I process it to end up 
> with a XeLaTeX document?

There are two versions of TEI: P4 which belongs to the past, and P5 to 
the future. If you're new to TEI you'll probably choose P5. Supposing 
you have a *valid* TEI P5 document, you need an XML processor. The 
simplest is to install "xalanj" with Fink, since Fink automatically 
sets your CLASSPATH. Suppose you want to process file "myFile.xml" in 
your working directory and that directory "tei-xsl-5.2.9" is also in 
that directory, you must type in a terminal window:
	java org.apache.xalan.xslt.Process -in myFile.xml -xsl 
./tei-xsl-5.2.9/p5/latex/tei.xsl -out myFile.tex
If you choose a different setup, you simply have to add the suitable 
paths. For instance, I prefer not to have XML and LaTeX files in the 
same directory, so for me the last part of the command would be:
	-out ./xetex/myFile.tex

> Can you recommend a good xml editor? I've heard of Oxygen and XMLEdit. 
>  Can they easily become ``tei aware?'' How do I do that?

"Java virtual machine + Oxygen" is a too heavy load for my computer (G4 
400), so I use general purpose text editors (it's also because I love 
code, though I'm no computer scientist). Most of the time I use 
SubEthaEdit, and sometimes TextEdit, for very large files which 
SubEthaEdit can't handle. To make Oxygen TEI aware, there are 
instructions on this page:
	http://www.tei-c.org/Software/
For XMLEdit, I'm afraid I don't know.

Best wishes,

Yves



More information about the XeTeX mailing list