[Grok-dev] To a multipage html tutorial

Darryl Cousins darryl at darrylcousins.net.nz
Fri Apr 6 22:57:12 EDT 2007


Hey all. 

I've had a go at scripting the generation of a multi-page html version
of the grok tutorial.

Firstly I tried digging into docutils internals which didn't get me very far
(though I've learnt some). I found 2 references from docutils mailing list which
appeared to advise preprocessing the restructured text document. That did get me
part of the way and I have posted the result of this attempt [1]_

What is missing here however is a contents listing of the entire multipage
document. Back into the docutils internals but without success.

The second attempt I made with ``latex2html``. This actually looks a little more
hopeful although I've made no attempt at styling. [2]_

Although I produced ``tutorial.tex`` using ``rst2latex`` (also borrowing
from ``grok2pdf.sh``) I found I needed to do some editing of tutorial.tex to get
rid of some errors and warnings when running ``latex2html``. The sidenotes are
lost at this stage (I did get ``\fbox`` to work in a separate text.tex file but
the resulting image was not very pretty). I think they will need to be rendered
with inline tex markup rather than use the ``\fbox`` markup.

Finally, the latex generated tutorial will need to be styled. As far as I can
figure this would be best done with a post-processing script (extracting the
body and selected head tags and then using template.pt).

.. [1] http://zope.grok.tfws.org.nz/documentation/tutorial/index.html
.. [2] http://zope.grok.tfws.org.nz/tutorial/tutorial.html

All source code is posted at http://zope.grok.tfws.org.nz/src/

I hope this all helps. I've got other work bidding for my attention so I'll
leave it here for now and await comments.

Regards,
Darryl



More information about the Grok-dev mailing list