atelier.sphinxconf.refstothis

A Sphinx extension which adds the refstothis directive.

Thanks to Tomasz Czyż who inspired me to write this. His sphinxcontrib-taglist module uses a different approach, based on the idea that every “reference” to a tag also specifies a text to appear in the list of references. refstothis is for people who don’t want to specify their own text for each tag directive.

TODO:

  • When I do fab fab clean followed by fab docs, then e.g. the refstothis in Baz does not mention all other documents. But when I then touch the baz.rst file and run fab docs, then they are all there. I guess this is because not all documents have been loaded when the rst is being generated.

(This module’s source code is available here.)

Functions

py2rst(x)

setup(app)

Classes

RefsToThis(name, arguments, options, …)

Implements the rst:dir:refstothis directive.

class atelier.sphinxconf.refstothis.RefsToThis(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

Bases: atelier.sphinxconf.insert_input.InsertInputDirective

Implements the rst:dir:refstothis directive.