PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
266 stars 208 forks source link

mention examples for referring to a division #1070

Closed kcrisman closed 5 years ago

kcrisman commented 5 years ago

After nearly posting a long new issue here after Pilar W.'s very helpful exposition yesterday, I discovered there are indeed examples like this where a whole section is indexed. I didn't know this syntax was legal:

        <section xml:id="section-interactive-authored">
            <title>
                <line>Interactive Elements</line>
                <line>Authored in Javascript</line>
            </title>
            <shorttitle>Interactive Elements, Authored</shorttitle>
            <idx><h>interactive elements</h><h>authored</h></idx>
            <idx><h>embedded interactive elements</h><h>authored</h></idx>

But I don't think this is mentioned explicitly anywhere in plain text. Probably should be both here and in the indexing guide as examples for what to do. Obviously fairly low priority issue.

davidfarmer commented 5 years ago

But in many cases index entries pointing to a section are not really what the author intended. So yes, this works. But it requires some thought and knowledge to use it properly.

We definitely need to make a few updates to the indexing advice. Feel free to add to this issue: https://github.com/rbeezer/mathbook/issues/1055

Also, there is (or was) a bug that made index entries in an assemblage point to the parent section. Probably still "is", because the issue is still open: https://github.com/rbeezer/mathbook/issues/753

After nearly posting a long new issue here after Pilar W.'s very helpful exposition yesterday, I discovered there are indeed examples like this where a whole section is indexed. I didn't know this syntax was legal:

    <section xml:id="section-interactive-authored">
        <title>
            <line>Interactive Elements</line>
            <line>Authored in Javascript</line>
        </title>
        <shorttitle>Interactive Elements, Authored</shorttitle>
        <idx><h>interactive elements</h><h>authored</h></idx>
        <idx><h>embedded interactive elements</h><h>authored</h></idx>

But I don't think this is mentioned explicitly anywhere in plain text. Probably should be both here and in the indexing guide as examples for what to do. Obviously fairly low priority issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute thethread.[AABTULAIJA5RJEXRSUZRYXLPZFPUJA5CNFSM4HVH2AL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GYDIASQ .gif]

kcrisman commented 5 years ago

But in many cases index entries pointing to a section are not really what the author intended. So yes, this works. But it requires some thought and knowledge to use it properly.

Fair enough; I guess I just wanted to make sure it was more evident. If we think that #1055 is appropriate I can add it there.