|
From: Aahz <aa...@py...> - 2002-10-08 06:00:50
|
On Mon, Oct 07, 2002, David Goodger wrote: > Aahz wrote: >> >> What I'm trying to figure out is how to handle the case where two different >> blocks both get attached to a preceding paragraph:: > > The literal block isn't "attached" to the paragraph at all. One > merely follows the other. Perhaps the "::" being at the end of > the paragraph gives the illusion of attachment, but it's only a > convenience; no relationship is implied. That's true for the DOM, but my perception is different WRT the reST syntax itself. And conceptually, the code block *is* attached to the preceding paragraph (generally, if the paragraph gets moved, the code block goes with it). >> Should the order of the code block and index directive be swapped? Does >> it make any difference? Do I need to do something special to handle >> this? (The index terms should be attached to the paragraph, not the >> code block.) > > I'd suggest that your "index" directive *precede* the paragraph they're > targeting. That makes more sense to me, and it's more in keeping with the > hyperlink target construct: > > .. _name: > > The "name" above targets this paragraph. <grimace> That's what I was thinking, and for some reason it offends my sense of esthetics. I think of index entries as being like footnote entries, and footnote contents generally follow their references. I may just create a "code" directive (if one doesn't already exist), so the order becomes paragraph, index directive, code directive. > Do you actually have an "index" directive, or is it just a > placeholder? Have you thought further on details of indexing that we > discussed some time ago? I'm currently planning to use "index" as a directive, with the block following the directive containing one index entry per line. It turns out that OpenOffice doesn't support "see" and "see also" entries AFAICT, so while there will be some annoyance, my formatting code can also be less complex. I haven't actually started coding it yet; I'll probably finally do some code this week, but I'm not sure where I'm going to start first -- most likely just hacking together some skeletal writer. WRT to indexing in general, I'm not likely to think about it until I see how my needs work in the Real World [tm]. > On an editorial note, shouldn't it be "built-in scope"? "builtin" may > be a Python identifier, but it's not a word. I'll let my real editors complain if they don't like it. ;-) -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ Project Vote Smart: http://www.vote-smart.org/ |