Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Felix Wiemann <Felix.Wiemann <at> ososo.de>
Subject: Re: syntax highlight proposal
Newsgroups: gmane.text.docutils.user
Date: Tuesday 20th March 2007 01:54:32 UTC (over 10 years ago)
Dave Kuhlman wrote:

> One point to note is that your script uses the Pygments built-in
> formatter HtmlFormatter.  Pygments also has a built-in formatter
> for LaTeX, so we are covered there, too.

It might be better to generate a Docutils node tree instead of HTML or
LaTeX output.  See the attached pygments_with_docutils.py.  You could
use CSS to style the output as you see fit.

The big disadvantage is that the output becomes extremely verbose.

> Implementation -- Your sample script (rst2html-pygments) relies on adding
a new 
> Docutils directive.  So, it could perhaps be facilitated by the proposal
I 
> recently recommended in another post to this list -- see: "Proposal for
User 
> Plugins for Docutils Readers/Writers".

Sorry, I haven't gotten around to reading it and commenting on it...

// Felix

-- 
Felix Wiemann -- http://www.ososo.de/
 
CD: 4ms