From: David G. <go...@py...> - 2017-05-04 01:42:25
|
On Wed, May 3, 2017 at 8:26 PM, Suzanne Hillman <wi...@gm...> wrote: > Hello everyone! > > I'm back again. Again, please cc me on replies. :) > > In looking at the substitution definitions > (http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#substitution-definitions), > I see that they include images and replacement text. As far as I can tell, > they do not include the possibility of substituting for figures. > > Is this accurate? Yes, by definition. Substitutions are a phrase-level (within text) construct, e.g. in the middle of a sentence. From the reST spec: "Substitution definitions allow the power and flexibility of block-level directives to be shared by inline text." Figures are block-level elements (consisting of an image, and optionally a caption and/or a legend), and thus cannot occur inside text. > Do substitutions not yet allow you to substitute for > figures? Correct, however they won't be added in future. One can't put a figure inside a sentence. > I also tried using replace for figures, but it didn't like that. Only a subset of directives can be used in substitutions: image, unicode, replace, date. http://docutils.sourceforge.net/docs/ref/rst/directives.html#directives-for-substitution-definitions > I couldn't figure out how to add a feature request, if in fact that's not > yet available. https://sourceforge.net/p/docutils/feature-requests/ If you want to request this as a feature, you'll first have to demonstrate how it would work. Please show an example of the reST source, as well as indicate what the result would be. What do you want to do in your document? Perhaps there's another way. David Goodger <http://python.net/~goodger> |