From: David G. <go...@py...> - 2008-08-06 14:16:39
|
On Wed, Aug 6, 2008 at 09:55, Matthew Leingang <lei...@ci...> wrote: > I got this far reading source; now I need some help. I would rather > the html be written to the output file surrounded by a <span>...</ > span> element for further styling opportunities. I gather I need a > different node type for that, or at least another attribute passed to > the constructor. What would be best? Since you're already outputting raw HTML, why not just add some more HTML? That's the simplest way. To do it within Docutils, wrap the raw HTML with nodes.inline(classes=['docutils-tth']) (i.e., append the inline node to the_nodes, and append the raw node to the inline node). > Also, I would like to embed the tex source in the HTML document, > perhaps as the title attribute to the containing span element. How > would I do that? You'd have to do it with raw HTML. The Docutils HTML writer currently doesn't support title attributes. > Oh, one more thing: sometimes an author wants an equation displayed > (block-level) rather than inline. So perhaps the latex *directive* > should use a div rather than a span? Sure. It's great that you're doing all this, but please realize that an HTML-only math directive has zero chance of being added to core Docutils. Any addition to the core has to work with all output formats, current and future. Single-purpose extensions like this will stay in the sandbox. If you'd like write access to the repository, send me your SourceForge.net and BerliOS.de account names, and read http://docutils.sourceforge.net/docs/dev/policies.html -- David Goodger <http://python.net/~goodger> |