On 2010-04-06, Georg Brandl wrote:
> Am 06.04.2010 20:05, schrieb Roberto Alsina:

>> I can't claim to know LateX but the latest docutils has a different 
>> visit_inline than Sphinx:
...

Yes, because the issue of "classified" inline nodes was fixed after
the fork of Sphinx and this fix (like many others) is not yet ported.

So, the "generic" approach for code-block works for LaTeX with Docutils
but not with Sphinx.

>> As far as I can follow the explanation from 
>> http://docutils.sourceforge.net/docs/user/latex.html that means it calls a 
>> macro called \DUroleCLASSARGUMENT{} which can then do things like setting a 
>> bold font and whatnot.

Exactly.

>> If LaTex is capable of setting bold, italic, monospaced font and
>> foreground colour, then a set of such macros could be autogenerated
>> from the pygment stylesheets (I create rst2pdf's stylesheets that way)
>> thus allowing the LaTeX writer to process the output of the proposed
>> codeblock directive.

This is doable. Alternatively, this could be left to the user (or a
set of semi-automatically generated sample styles be provided).

> You are right, I would say.  But the fact remains that this would be
> quite a few hours of work to get right, and to test that everything
> works as it did before, including the somewhat hairy issue of fallback
> for token types whose parents are styled.  Therefore, and because I
> have like seventy-six other items on my todo and wish list for Sphinx,
> it is unlikely I will do that rewrite any time soon :)

There is a GSOC project/plan with the aim to add code highlighting to
Docutils which (hopefully) will go this "generic" way. If successfull,
this could be ported to Sphinx, hopefully.

Günter

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to