[luatex] setupbackend in lualatex?

Arthur Reutenauer arthur.reutenauer at normalesup.org
Wed Jul 20 13:24:15 CEST 2011

> So you are saying that the binary, after reading a latex file, isn't quite
> aware of the DOM-structure of the file, while after reading a Context-file
> it is?

  I would say there is no such thing as a "document object model" in TeX
processing.  The document is mostly read linearly, and TeX basically
forgets everything it has seen after outputting each single page (apart
for information like references, index elements and the like, that are
written to separate files).  Hence, TeX is not only not aware of the
"DOM-structure" of the file (I would rather say the document), but it's
in my opinion misleading to even think of a TeX document of having such
a structure, and to mention concepts like DOM.

  You can of course enforce a tree-like structure, and it is encouraged
in ConTeXt with commands such as \startchapter and \stopchapter (which
are easy to mimic in LaTeX, as Khaled said); but that's by no means
necessary (and \chapter also exists in ConTeXt, and will most likely
never disappear).

> It seems that this information is less needed when building an HTML-file
> instead of a PDF. I mean, it needs to do something like chapter-heading ->
> H1, but after that it couldn't care less about whether or not that chapter
> ends.

  That's also the case for a PDF.  You see the command \chapter, you set
the chapter heading, and move on.


More information about the luatex mailing list