[XeTeX] (no subject)

Zdenek Wagner zdenek.wagner at gmail.com
Fri May 26 13:10:41 CEST 2023


I do not deal with grammars bu I have published a photo book in Czech
with texts also in Hindi and Urdu:
The source is in XML with my own scheme in Relax NG and my own XSLT to
XeLaTeX. I had a lecture on it but the slides are in Czech.

Numbering with cross references is not a problem. LaTeX has two macros
for advancing the counter value, \stepcounter just increments the
value, \refstepcounter creates also the internal macros for cross
references. The definition of counters can optionall instruct LaTeX
that the counter should be reset to zero whenever the value of a
counter in the higher hierarchy changes, this is done for
chapter/section/subsection etc. If you do not request resetting, the
counter will be independent. It is useful to read the section on
counters in the LaTeX source to understand how it is done and you will
see that you just have to define a few macros.

Zdeněk Wagner

pá 26. 5. 2023 v 5:49 odesílatel Mike Maxwell <mmaxwell at umd.edu> napsal:
> 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.