[drupal-devel] Re: [drupal.org] LaTeX content

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Sat Apr 23 10:59:37 UTC 2005

On Fri, 22 Apr 2005, puregin wrote:

> On 20 Apr 2005, at 8:47 PM, Matt Schwartz wrote:
> > Djun,
> >
> > My goal is to eventually have drupal books exportable in a variety of
> > formats, including LaTeX.  I haven't had time to look into the LaTeX
> > exporting yet.  Since I want to literally output a book from generic
> > drupal nodes I'm not sure how we'd handle mathematics.  I don't want to
> > have to rely on a special input format (i.e. drupal filter).
>       If I understand you,  your intention to store source as HTML, and
> convert to your export formats on the fly.  Is this correct?
>       I don't know what kind of applications you actually have in mind.
> In my experience, though, if you want to produce a high quality printed
> book
> that works as a book, you need to start with markup that supports print
> intentions.

Right, everything else is pretty useless. html is not for typesetting
(if you take typesetting a little bit more serious than just getting
letters on paper).

>       This isn't a problem if you intend to take an existing Drupal book,
> export it, and edit it heavily in the exported format.   Probably life
> will
> be easier for the editor with this task if certain conventions can be
> enforced on the source text, either explicitly by the book module or
> implicitly through the cooperation of your contributors.

One could try to develop some smart filters, but you will never be able
to avoid handiwork.

> > So unfortunately I don't currently have any code that can help you.
>       I'm interested in a slightly different problem, namely having
> nodes contain LaTeX (to start with, perhaps later also MathML and
> other sources.)

That should be much easier. You could develop a filter that calls detex
or something similar (latex2html?) on the node content. Math formulae
would be converted to images with latex2html or what its name was.

>  There's a certain amount of interest in using
> DocBook XML as a native format for Drupal Documentation, so perhaps
> there will be some overlap with this project, if it gets off of the
> ground.

I doubt that. There has been talk about that for at least two years.


More information about the drupal-devel mailing list