OK after reading Guenter's note I see my misunderstanding of this piece of code:
On 2013-05-13, Michael Prisant wrote:For specific adwise, we need a specific task. Otherwise, I could just
> Thanks for this reply but I was looking for more specific advice with
> regard to coding rest custom directives (as opposed to using the "raw:
> approach) which are properly translated to both html and latex (like
> non-custom directives).
copy one of the standard directive classes (all of them are good examples
and (almost) all or them are properly translated to all output formats
that Docutils supports.
The problem I have with your example is, that it uses "raw" without any
> Admittedly, I tried to pare my actual python code snippet to a bare
> minimum more or else working example. (This eliminated my actual bibtex
> processing which is what actually necessitated python code as opposed
> to just using "raw". †So some confusion seems to stem from the example
> given which doesn't do very much) On this basis I was hoping that one
> of the experienced coders could offer an *explicit* but *simple* python
> example to the group based on the very *simple* code snippets that I
need. I don't know for certain, but I don't think "raw" is required for
the real task either. Therefore, a solution to the stated problem of
providing two raw nodes -- one for latex one for html -- is just going
further in the wrong direction, away from a generic solution to the real
problem behind the example.
Did you already try to let the directive class return a list of "raw"
> The question here is really to help users who are attempting to code simple
> extensions to reST for their own specific uses as opposed to general
> development which would be folded into the software. †I want to translate a
> custom reST directive into just html and latex (as opposed to also
> translating into every possible output format) 
nodes (one for each supported output format)? AFAIK, "raw" nodes of the
"wrong" format are just ignored by the writers. Caveat: I did not test
this approach nor do I know whether it works this way.
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
Docutils-users mailing list
Please use "Reply All" to reply to the list.