[drupal-devel] Re: [drupal.org] LaTeX content
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. 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.
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.) 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. The LaTeX input would then be transformed into various output formats including HTML, which would be put back into a Drupal 'proxy' node for the source. This gives a kind of 'WYSIWYG' arrangement. A bit kludgy, but hopefully good enough.
What are your thoughts on how it might work? How would you like authors to input their mathematical content into drupal?
I think that there's a number of projects which attempt to convert HTML to LaTeX. I've not looked closely at these - search for html2tex and you'll be on your way. Unfortunately, this transformation is basically 'just guessing'. Still, it's probably a good way to start. 'Better than nothing!' . And certainly an interesting problem/process. I've been doing some work trying to go directly from HTML to PDF, and this might be a way to achieve more control, so I'm keen to look into it further. Regarding mathematical input, TeX/LaTeX is pretty standard among people with serious mathematics editing / publishing requirements.' MathML is intended for machine generation/transformation. It's way too painful to type much of this. However, there's some tools for MathML to TeX/LaTeX, so supporting some kind of import is probably a good idea. This would allow people to edit in a convenient GUI on their desktop, and upload to Drupal via MathML.
- Matt
puregin@puregin.org wrote:
Salve Veridicus,
How is your work on LaTeX content management coming along? What are your envisioned use cases? Do you have a prototype or demo page? I'm interested in community authorship of mathematics. I'd like to have TeX/LaTeX content with full versioning, merging and diffs, chapters and section structures handled via Drupal books.
Looking forward to hearing from you...
Djun
-- Djun M. Kim, Director djun.kim@cielosystems.com Cielo Systems Inc. http://www.cielosystems.com Strategic Software Research Tel: (604) 739-3941 302 - 1298 10th Avenue West FAX: (604) 739-3943 Vancouver, BC, V6H 1J4 Mobile:(778) 895-1379
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. Cheers, Gerhard
participants (2)
-
Gerhard Killesreiter -
puregin