# [luatex] setupbackend in lualatex?

Khaled Hosny khaledhosny at eglug.org
Wed Jul 20 11:57:20 CEST 2011

On Wed, Jul 20, 2011 at 11:31:48AM +0200, Patrick Gundlach wrote:
>
> Am 20.07.2011 um 11:22 schrieb Ulrike Fischer:
>
> > Am Tue, 19 Jul 2011 21:57:08 -0700 schrieb Johannes Wilm:
> >
> >> Hey,
> >> I have had issues with converting latex to epub/html/mobipocket for years. I
> >> started using lualatex some months ago and it works quite well for all my
> >> other purposes.
> >>
> >> Today I then stumbled over the \setupbackend which is available in Context
> >> and which allows for HTML/epub to be produced easily by using some lua code.
> >> Now as I understand it, given that lualatex uses the same binary and hat the
> >> conversion likely happens by first letting the binary read the entire DOM
> >> and then exporting it, it seems that the same scripts really should work for
> >> lualatex as well, right?
> >
> > Theoretically: yes.
>
> There is a little bit more to it, though it can be simulated
> otherwise. For example with ConTeXt you have more structured
> sectioning commands. I don't remember what it was but something like
>
> \startsection
> ...
> \stopsection
>
> where in LaTeX you have \section{...}, but when does the section end?
> Is it always clear?

Simple, define a \begin{section}...\end{section} etc. and tells the
users who want the export feature to use it.

Regards,
Khaled

--
Khaled Hosny
Egyptian
Arab