[webgen-users] Pipeline for LaTeX files
Vincent Beffara
vbeffara at ens-lyon.fr
Wed Feb 16 09:50:21 EST 2011
Hi Thomas, and thanks for the advice !
It already gives quite acceptable results after just a few tries. I'm
glad I chose webgen for my website.
TL> * First you need to provide a content processor for your tex files
TL> that parses the .tex files and converts them to HTML. webgen has
TL> no built-in content processor to do that - you will need to code
TL> it yourself.
Mkay, that step will be the longest because of all the tweaking
necessary, but at least I can manage. Transforming LaTeX into markdown
is not too difficult in first aproximation, and then kramdown will do
the rest.
TL> * Then you need to tell the source handler 'page' to use the .tex
TL> files together with your new content processor (I'll call it
TL> `texproc`).
Great. This works as expected.
TL> * Drop in a .tex anywhere in your src/ directory and have it
TL> processed via the source handler 'page' like any .page file.
That works very well. Only thing is, the generated page is still named
whatever.tex, how can I have it renamed whatever.html instead ?
TL> * Set the `template` meta information like with normal .page
TL> files. Or, for that matter, any other meta information you need
TL> (like `in_menu).
This I could not figure out how to do. I know how to parse the file to
extract the title, but how do I tell webgen that this is it? Probably
something like context['title']="Whatever" in the content processor, but
I couldn't figure it out.
TL> * And, since webgen assumes that .tex files are in Webgen Page
TL> Format, you can add a meta information block at the beginning with
TL> needed meta information. Or just use a meta information file for
TL> this purpose so that the .tex files don't need to be edited.
I would rather not touch the .tex file in that way, and have webgen
extract the relevant info automatically instead.
Thanks again !
Cheers,
/vincent
--
| | UMPA - ENS Lyon | Mél: vbeffara at ens-lyon.fr |
| Vincent Beffara | 46 allée d'Italie | Tél: (+33) 4 72 72 85 25 |
| | 69364 Lyon Cedex 07 | Fax: (+33) 4 72 72 84 80 |
More information about the webgen-users
mailing list