[Grok-dev] Re: zc.buildout tutorial
Uli Fouquet
uli at gnufix.de
Sat Aug 4 09:48:10 EDT 2007
Hi,
On Sat, 04.08.2007, 16:22 +1200, Darryl Cousins wrote
> I've altered grok2html to use urllib to grab tutorial.txt from
> svn.zope.org/zc.buildout/trunk/doc/tutorial.txt.
Cool, Darryl!
> This still doesn't support highlighting because Jim uses::
>
> code-block: Python
>
> and pygments expects::
>
> code-block: python # (lower-case P)
Following the dicussions of the docutils-SIG, the latter will be the
standard way to do it. So I think this is fine.
> Furthermore to have highlighting additional css directives are necessary to
> colourise the code block. I haven't implemented this either.
I just added the pygments-default.css to the ressources directory and
added an @import in the grok.css. Now code-highlighting is available for
all mini-tutorials.
In short for the other tutorial authors: You can now use
.. code-block: python
in front of a code fragment to enable source-highlighting. The macros
tutorial is already using this.
> I'm happy with the hack as it is because we may hope and expect code
> highlighting to be included in stock docutils in the future.
I'm happy too. Thank you, Darryl!
--
Uli
More information about the Grok-dev
mailing list