|
From: David G. <go...@py...> - 2002-12-24 05:20:27
|
Bill Bumgarner wrote: > I have successfully modified aahz's OOwriter to produce HTML compliant > with O'Reilly's article spec. The end result is a writer that-- while > not yet feature complete-- produces a minimal, non-CSS, HTML > representation of REST input. In my opinion, it also provides a > relatively straightforward example of how to create a writer. > > If anyone is interested, ping me and I'll forward along a copy of what > I have now. Yes please. Let me know your SF user name and I'll add you as a developer too. > (1) what about support for <code></code> blocks. O'Reilly likes 'em in > about as much as they like <pre>. Are you sure about that? <code> is an inline HTML element (like <em>), and <pre> is a block/body-level element (like <p>). How does O'Reilly use them? The html4css1 writer produces <pre> for literal blocks and <tt> for ``inline literals``. I chose <tt> because it's neutral and generic, whereas <code> is more specific. It would be easy to use <code> instead of <tt> if required. > (2) within <pre></pre> blocks, things like <i></i> and <b></b> work > fine. How hard would it be to modify the existing literal block to > allow for additional markup via said formatting tags (or am I barking > up the wrong tree, here)? Check out the "parsed-literal" directive; it does what you're describing. For many examples, see the "Content Model" subsubsections of <http://docutils.sf.net/spec/doctree.html>. > I haven't though this stuff through outside of generating HTML for > O'Reilly. That is, generating output for other targets may change the > requirements/thinking???? A writer producing truly generic HTML, that doesn't rely on CSS, would be a useful addition to the project as an alternate HTML writer. -- David Goodger <go...@py...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |