I've tried UTS, I swear, but I'm drowning in a sea of classes :-)
Is there a way to access the <head> part to add some content,
=66rom inside a directive?
I'm trying to implement a new directive (even if it's for my own use
only, although I think it can be useful to others):
=2E.. etc, with parameters as specified by the HTML 4.0 spec.
(If you were to implement said directive, how would you specify the
*title* for each of these URLs? I thought that
:prev: <url> , "Title of previous page"
would do, but after that I notice that almost every punctuation symbo=
may be part of an URL. What would you use?)
o-=3D< Marcelo >=3D-o
Lea Axx=F3n: Ciencia ficci=F3n en bits. http://axxon.com.ar
Ahora tambi=E9n para Palm: http://axxon.com.ar/c-Palm.htm
From: David Goodger <goodger@py...> - 2003-10-12 15:04:13
Marcelo Huerta wrote:
> Is there a way to access the <head> part to add some content,
> from inside a directive?
Short answer: no. Directives are handled at parse time, before output
There is a workaround in the "raw" directive though. Processing is
delayed until the Writer is in control (via a "raw" element in the doc
Nicolas Chauveau recently submitted a patch to access the various
sections of HTML, and it applies directly to this issue. I haven't
had a chance to review the patch yet:
> I'm trying to implement a new directive (even if it's for my own use
> only, although I think it can be useful to others):
> .. links
> :prev: <url>
> :next: <url>
> :start: <url>
> ... etc, with parameters as specified by the HTML 4.0 spec.
I'd be wary about this, it seems HTML-centric, and simplistic (the
HTML spec has many attributes with complex relationships: href,
hreflang, type, rel, rev, etc.). Is there an HTML-agnostic
specification of this functionality?
If this is only applicable to HTML output, the raw HTML approach may
> (If you were to implement said directive, how would you specify the
> *title* for each of these URLs? I thought that
> .. links
> :prev: <url> , "Title of previous page"
> would do, but after that I notice that almost every punctuation
> symbol may be part of an URL. What would you use?)
Spaces may not be part of URLs, and neither may double quotes and
angle brackets. However, the parser does accept whitespace to break
up long URLs across lines. So it would just be a matter of parsing
the parts out, not a big problem. But I'd question whether it's worth
the pain, when a raw HTML approach is available.
David Goodger http://starship.python.net/~goodger
For hire: http://starship.python.net/~goodger/cv
(includes reStructuredText: http://docutils.sf.net/rst.html)
El 12/10/2003 a las 12:03, David Goodger <goodger@...> dijo, en
su mensaje "[Docutils-develop] [HTML] Access to <head> from a
> But I'd question whether it's worth
> the pain, when a raw HTML approach is available.
Ok, I've tested the patch and it seems to work as advertised, at least
for the 'head' value of :dest:. My intent was to keep the source
document as clean as possible. However, your objections related to the
HTML-centredness are valid.
o-=< Marcelo >=-o