From: Nick M. <ni...@zo...> - 2007-12-09 21:28:59
|
I am running the python-docutils package version 0.4-4 on Ubuntu 7.10. Perceived problem: substitutions appear to not function as expected in `phrase reference`_ links. Expected behavior: In one of my documents, I have a number of section headings that contain utf-8 sigils to provide a quick means of visual categorization. An illustration of what I am trying to do: .. contents:: |GEAR| Technology ================= Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. .. |GEAR| unicode:: 0x2699 Something Else ============== See `|GEAR| Technology`_ In the above, I expect the link in the Something Else section to have the text "⚙ Technology" and link to the #gear-technology anchor in a similar manner to the one generated in the table of contents. Actual Behavior: (ERROR/3) Unknown target name: "|gear| technology". Workarounds: Defining a reference with the substitution in it does not work as expected, as the substitution does not happen in the reference text (leaving you with the "|GEAR|" literal visible in the resulting link text). At the moment my only functioning workaround is to refer to Technology_ and define that as a link to "gear technology" each time. I suspect that there are probably very good reasons why it's near-impossible to handle these substitution references inside phrase references. That said, there appears to be some logic present to form the links for the table of contents. Am I perhaps using the wrong syntax? Is there a way to do this that uses some context where substitution references are still parsed in the desired ways? -- "There should be a homonym exam before people are Nick Moffitt issued keyboards." -- George Moffitt ni...@zo... |