On Wed, Nov 10, 2010 at 4:08 AM, qx guy <qx0mons...@googlemail.com> wrote: > I have the exact same issue using |version|. I want to include it in > links (which e.g. point from the documentation to online demos which > follow the same version scheme). > > I think there is a general issue with inline markup, where the > contents of the markup is not interpreted, and as a consequence macros > are not expanded. This affects probably more than just links. I > wouldn't mind going to some effort to overcome this, e.g. by using > reST directives, I just can't think of how :-/. > > If anybody has an idea how to "splice" macros into other reST markup, > I would highly appreciate hearing about this. > > Thomas > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-dev" group. > To post to this group, send email to sphinx-...@googlegroups.com. > To unsubscribe from this group, send email to > sphinx-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sphinx-dev?hl=en. > >
Not sure if this is what you mean but since conf.py is just a Python file, you can do string substitutions in it. For example, for I happen to do: rst_prolog=""" .. |versionG| replace:: :guilabel:`%s` """ % (version,) because I sometimes need to include the version number in :guilabel: styled text and :guilabel:`blah-|version|` won't work. So now I can do: Right-click :guilabel:`blah-`\ |versionG| to do foo. As far as links go, you might try this technique in combination with the sphinx.ext.extlinks – Markup to shorten external links extension. See http://sphinx.pocoo.org/ext/extlinks.html for details. (Pretty sure this works for any links not just "external" ones). -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.