[XeTeX] (no subject)

Mike Maxwell mmaxwell at umd.edu
Fri May 26 05:48:50 CEST 2023


On 5/25/2023 9:52 AM, BPJ wrote:
> I'm looking for advice from people who have used LaTeX, preferably 
> XeLaTeX but LuaLaTeX is interesting too,[1] to write a (“traditional”) 
> reference grammar 

Between five and ten years ago, we published several book-length 
reference grammars through Mouton that used XeLaTeX for typesetting. 
The grammars themselves were written in a version of DocBook XML 
(leaving out lots of irrelevant DocBook structures, and adding in 
interlinear texts and in-line examples).  We converted this XML to 
XeLaTeX using dblatex.  We used XMLmind's XML editor to have a 
close-to-wysiwyg view of the DocBook XML.  (There are other editors that 
have similar capabilities.)

Our reason for using XML was to enable extraction of examples from the 
documents, and input/output of morphology rules written in XML, although 
the latter was never quite implemented.  (We did write our morphology 
and phonology rules in XML, and built a converter to output them in 
various FST formats, but never got around to writing the pieces that 
would have been needed to typeset the morphology rules.)

Our code is still laying around, although I fear bitrot.  And you may 
not be interested in using XML anyway.

A similar system is Andy Black's XLingPaper 
(https://software.sil.org/xlingpaper/), which has its own XML format 
(rather than DocBook's) using XMLmind's editor, but which similarly 
converts this to XeLaTeX for typesetting.  (I stole Andy's code for 
interlinear texts, but that's ok--he was a student of mine back in 1980.)

If you're just interested in (Xe)LaTeX, I can say that it worked 
extremely well for us.  The languages of our grammars used various 
"exotic" writing systems like Arabic script (some in Naskh, some in 
Nasta'liq), Bengali script, and Thaana script (the latter for Dhivehi). 
Unicode was obviously essential for this.  And the typeset grammars came 
out well if I do say so.

Cross-references worked fine, and were updated automagically when we 
typeset--of course that's only true of the PDF version, hard to do 
clickable xrefs on paper :).  We attached the section numbers to section 
titles, but if you wanted the numbers attached to ordinary paragraphs, I 
guess you could do that too.  We did not put section numbers in the page 
headers, but I think that should be possible.  Our indices referred to 
page numbers, not section numbers; I'm sure there must be an indexing 
package out there in LaTeX-land that does that.  Indeed, I would *guess* 
that most of your requirements would be met by using the appropriate 
package with the appropriate parameters.  (BTW, almost any LaTeX package 
works out of the box with XeLaTeX.)

     Mike Maxwell
     University of Maryland


More information about the XeTeX mailing list.