|
From: David G. <go...@py...> - 2003-01-20 23:26:10
|
[David Goodger] >> I wasn't aware of this feature of Setext. I thought ~tildes~ simply >> indicated italics... [Mark Nodine] > Yes, the typotags documentation simply says that tildes > produce italics. However, in private correspondence I had > with Ian Feldman, the originator of structure-enhanced text:: Thanks for the reference. >> An _`inline target` does the trick >> >> And you can make it italic with a stylesheet entry. The above is rendered >> as ``<a class="target" ...>``. > > I could live with this if I could tell the difference between an > inline target and other targets; otherwise if everything is > class="target", I can't sufficiently target the index entries. Only inline targets contain text. So a style making ``<a class="target"...>`` italic should have the desired effect. > What about the possibility of extending the inline target syntax > to allow a role:: > > An _`inline target`:index: would do the trick > > since the parser could keep the role attribute and the writer could > use the role attribute to determine the class. Correction: the writer doesn't know anything about interpreted text. Interpreted text is simply a syntax construct, not an end in itself (there's no "interpreted" element in the DTD anymore; I ripped it out). For more background, see my Jan 5 post "Re: Handling interpreted text". As for the proposal, it's unnecessary. The "index" role will make its text into an inline target if that is part of its semantics (which it probably is). No need to complicate the markup. >> If you want a solution that doesn't resort to stylesheet trickery, then an >> interpreted text role would be appropriate. The role could simply wrap the >> text with both emphasis and target elements. > > This wrapping would be done by the writer? No, by the parser, or by a transform if the parser doesn't have enough information. > If so, does it need to insert the <system_message> if there's a > duplicate target? The hyperlink resolution transform would, yes. > I'd rather keep the name registration stuff in the parser if > possible. In the Docutils model, the parser registers most names, and the tranformer/transforms handle the rest of the bookkeeping. This is because all of the names need to be known to form links. If you haven't yet, please read PEP 258, which outlines the Docutils model. -- David Goodger http://starship.python.net/~goodger Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv |