Guenter Milde, el 26 de junio a las 07:37 me escribiste: > > Is there any way to do what I want? > > If I understand Docutils right, the "canonical" way would be to create a > pending node during the parsing step and define a `transform` to convert > this into an image node. The transform can find out which writer/builder > is in use [#]_ and set the URL accordingly.
Ok, this looks much cleaner. Thanks. > .. [#] It can, e.g. test document.settings for the existence of > writer-specific settings. Maybe there is an even better way. This point is crucial for me. Is there any way to identify which writer/builder is used when transforming? A setting is not good, because a single Sphinx document/config is used to render to to both HTML and LaTeX (and possibly more formats). Unless I can access to command line options (The format to render to is passed as a command line option). > > If not, will you be willing to accept patches to allow this? I think > > other extensions can benefit from this, like the official graphviz > > extension (in which I based the aafig extension) and my other > > graphviz-based extension: mscgen. > > Patches are fine -- even better if the match the `Docutils policies`__. > Did you have a look how the graphviz extension does it? It do it wrong =) I based my extension on that. It defines a new kind of node and add add new visit functions to render it. It generates the image file when rendering and use custom code to render (it writes it own HTML/LaTeX). If I find a solution for this, I plan to update the graphviz extension too. Thanks. -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Pa' ella cociné, pa' ella lavé, pa' ella soñe Paella completa, $2,50 Pero, la luz mala me tira, y yo? yo soy ligero pa'l trote La luz buena, está en el monte, allá voy, al horizonte --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en -~----------~----~----~----~------~----~------~--~---
