[pmwiki-users] Categories (and nested categories) in Action
John Rankin
john.rankin at affinity.co.nz
Mon May 4 18:50:19 CDT 2009
>Date: Mon, 4 May 2009 08:45:05 -0800
>From: Chris Lott <chris at chrislott.org>
>Subject: [pmwiki-users] Categories (and nested categories) in Action
>
>Can anyone point me to examples in "the wild" of categories and,
>particularly nested categories, in action? I'm trying to get my mind
>around how they might work in a real implementation...
I am bending my head around the same question at the moment, in
the context of using category markup to generate a book index
from the PublishPDF recipe. Nested categories are particularly
relevant, as in an index one often wishes to have entries like:
Italics, see Markup, emphasis
Markup
emphasis, ii
strong, jj
typewriter, kk
and so on. The physical form of a book index helped me to
understand the semantics of categories and how to use them.
After much experimentation, I found the following scheme worked
for nested categories (YMMV):
[[!(Markup) emphasis]] interprets "emphasis" as a sub-category
of [[!Markup]]. This structure allows the same term to appear
in 2 or more different parent categories, e.g.
[[!(Planet) Mercury]]
[[!(Element) Mercury]]
On page Category.ElementMercury one may wish to add [[!Element]]
markup, to make the relationship explicit.
Order is not important: [[!Recovery of (Kakapo)]] produces
"Kakapo, Recovery of" in the index.
So the title chosen for the post contains one answer to
the question!
If one needs 3 levels (e.g. Element - Metal - Mercury), it is
harder to know what's best. So far, I don't have a solution I'm
comfortable with.
I'm stil working on this, so don't have a live example as yet.
But if it helps, I'm happy to give more examples.
JR
--
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
021 RANKIN
john.rankin at affinity.co.nz
www.affinity.co.nz
More information about the pmwiki-users
mailing list