Il 12/06/2012 11:31, Guenter Milde ha scritto:
a) use the "sh" lexer, give a class value to the input and use a custom
style (CSS rule with class selector with HTML, tricky or maybe
impossible with LaTeX/PDF)::
.. code:: sh
:class: user
python program.py
.. code:: sh
:class: root
python setup.py install
(The "code" directive is new in reStructuredText (docutils 0.9
(2012-05-02). Use the Sphinx extension "sourcecode" with earlier
Docutils versions.)
Did you really mean "sourcecode"?
I can't find it in the builtin directives neither in the community
extensions:
https://bitbucket.org/birkenfeld/sphinx-contrib/src
Currently I have docutils 0.8 on my debian system.
I've tried installing latest svn version but code is not recognized:
ERROR: Unknown directive type "code".
.. code:: sh
aptitude install package
The new docutils installation is in /usr/local, so it should have
priority over debian package in /usr:
# ls -l /usr/local/bin/rst*
-rwxr-xr-x 1 root staff 546 giu 13 00:38 /usr/local/bin/rst2html.py
-rwxr-xr-x 1 root staff 744 giu 13 00:38 /usr/local/bin/rst2latex.py
-rwxr-xr-x 1 root staff 600 giu 13 00:38 /usr/local/bin/rst2man.py
-rwxr-xr-x 1 root staff 188 mar 19 2011 /usr/local/bin/rst2newlatex.py
-rwxr-xr-x 1 root staff 1639 giu 13 00:38
/usr/local/bin/rst2odt_prepstyles.py
-rwxr-xr-x 1 root staff 716 giu 13 00:38 /usr/local/bin/rst2odt.py
-rwxr-xr-x 1 root staff 548 giu 13 00:38 /usr/local/bin/rst2pseudoxml.py
-rwxr-xr-x 1 root staff 591 giu 13 00:38 /usr/local/bin/rst2s5.py
-rwxr-xr-x 1 root staff 739 giu 13 00:38 /usr/local/bin/rst2xetex.py
-rwxr-xr-x 1 root staff 555 giu 13 00:38 /usr/local/bin/rst2xml.py
-rwxr-xr-x 1 root staff 619 giu 13 00:38 /usr/local/bin/rstpep2html.py
--
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.