From: David G. <go...@py...> - 2017-06-21 15:26:33
|
On Wed, Jun 21, 2017 at 8:57 AM, Luis Gomez <lui...@gm...> wrote: > Hello, > > I'm using substitutions to insert images in section headings, but it's less > than ideal when I have to link to those sections > > Take, for example, the following ReST: > > |icon1| My Section > ================ > > This will result in a section link of "icon1-my-section". To refer to this > section elsewhere in the document, I have to write `icon1 My Section`_. > > I would like a way to allow that same section to be referred by `My > Section`_, and the resulting link to be "my-section", as if the substitution > text wasn't there. Is it possible to omit the text content of a substitution > in a section heading? Not currently. Workaround that will give you what you want: .. _My Section: |icon1| My Section ================ If your output is HTML, you could also add an icon via CSS styling. > If not, could this be considered for a future feature? Please add a feature request, else it will be forgotten: https://sourceforge.net/p/docutils/feature-requests/ David Goodger <http://python.net/~goodger> |