On 4/9/2010 2:34, malthe wrote:
In my document I have two types of text blocks corresponding to user's
text input and output. How do I tell Sphinx to assign a particular
HTML-class to each of them (e.g. "input", "output") such that I may
assign different colors in a CSS stylesheet?

As someone already mentioned, using the .. cssclass:: yourclass before the block will work.

Also, if your input/output formats follow an expected, parse-able format, you may want to consider writing a Pygments (pygments.org) lexer for the format, if one doesn't already exist. Writing a lexer is actually reasonably easy and there are plenty of examples to draw from in Pygments' source code. That can give you nice syntax highlighting of your input/output formats using the .. code-block:: yourlanguage directive.

--
--Max Battcher--
http://worldmaker.net

--
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