Substitutions inside Sphinx code blocks aren’t replaced
Use the “parsed-literal” directive. .. parsed-literal:: ./home/user/somecommand-|version| Source: https://groups.google.com/forum/?fromgroups=#!topic/sphinx-dev/ABzaUiCfO_8:
Use the “parsed-literal” directive. .. parsed-literal:: ./home/user/somecommand-|version| Source: https://groups.google.com/forum/?fromgroups=#!topic/sphinx-dev/ABzaUiCfO_8:
You need the unicode directive, but it can only be used in substitutions. So you need to define a substitution like this: .. |nbsp| unicode:: 0xA0 :trim: and then use it like this: xx |nbsp| xx :trim: is there to get rid of those spaces around the substitution.
Sadly I don’t think rst offers that ability… the table styling options are rather limited. That said, if you’re rendering to HTML, you could add a custom stylesheet with a css rule such as: table.right-align-right-col td:last-child { text-align: right } and then add the directive: .. rst-class:: right-align-right-col right above your table in the rst … Read more
Jon Waltman http://bitbucket.org/jonwaltman/sphinx-info has forked sphinx and written a texinfo builder, it can build the python documentation (I’ve yet done it). It seems that it will be merged soon into sphinx. Here’s the quick links for the downloads (temporary): http://dl.dropbox.com/u/1276730/python.info http://dl.dropbox.com/u/1276730/python.texi Steps to generate python doc in texinfo format: Download the python source code Download … Read more
Use the pipe vertical line key as shown below ==== John ==== | .. image:: _static/john.JPG :alt: John :height: 300px :width: 400px That should work.
Just add a blank line after the summary description of the method, before the description of the parameters: “”” Gtk.EventBox::button-release-event signal handler. :param widget: The clicked widget (The Gtk.EventBox). :param event: Gdk.EventButton object with information regarding the event. :param user_data: The Gtk.LinkButton that should be opened when the Gtk.EventBox is clicked. :return: None “”” Here … Read more
See the reStructuredText documentation. It can be done either with a named reference: Test hyperlink: SO_. .. _SO: https://stackoverflow.com/ Or with: Test hyperlink: `Stack Overflow home <SO>`_. .. _SO: https://stackoverflow.com/ Or with an embedded URI: Test hyperlink: `Stack Overflow home <https://stackoverflow.com/>`_.
reStructuredText supports implicit hyperlink targets. From the reStructuredText quick reference: Section titles, footnotes, and citations automatically generate hyperlink targets (the title text or footnote/citation label is used as the hyperlink name). So the following text (lifted from the reStructuredText quick reference, spelling mistakes and all): Titles are targets, too ======================= Implict references, like `Titles are … Read more
You don’t need a custom theme. Use the built-in directive container that allows you to add custom css-classes to blocks and override the existsting theme to add some javascript to add the show/hide-functionality. This is _templates/page.html: {% extends “!page.html” %} {% block footer %} <script type=”text/javascript”> $(document).ready(function() { $(“.toggle > *”).hide(); $(“.toggle .header”).show(); $(“.toggle .header”).click(function() … Read more
You can use vertical bars at the beginning of lines to produce blank lines in the output. Like this: Heading ——- | | Paragraph with text.