Hi -
First I want to say thanks for Sphinx; it looks great and I think it
is going to become our default python documentation tool.
Now my request - I'd like to use substitutions to cut down on the
noise of :class:, :meth: etc. specifications, but I can't find any way
to use the sphinx roles in substitution definitions.
The simple rst file:
--------------------
|Structure| and |substructure|
.. |Structure| replace:: :class:`Structure`
.. |substructure| replace:: :sub:`Structure`
--------------------
Gives the following errors when processed with 'make html'.
/home/beachy/tmp/tmp/index.rst:3: (WARNING/2) Substitution definition
"Structure" empty or invalid.
.. |Structure| replace:: :class:`Structure`
/home/beachy/tmp/tmp/index.rst:1: (ERROR/3) Undefined substitution
referenced: "Structure".
The built-in 'sub' role works fine, the sphinx 'class' role does
nothing.
This is with Sphinx 0.6.1 and the current (sometime last week)
docutils snapshot.
I saw the thread at
http://groups.google.com/group/sphinx-dev/browse_frm/thread/0851d2bcca16350d/d91ffc7ea06b576d?#d91ffc7ea06b576d,
and am currently planning to use obj as my default role as a
workaround, but think I would prefer to just have the ability to
explicitly define these on a per-document basis.
I can file a bug if this is one or look into creating a patch if you
can point me to the right place. I got lost in a sea of state machines
when I briefly tried to debug.
Thanks,
Mike