ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Indexing redux
@ 2021-08-26  1:14 Rik Kabel via ntg-context
  2021-08-26  7:26 ` Taco Hoekwater via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Rik Kabel via ntg-context @ 2021-08-26  1:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Rik Kabel


[-- Attachment #1.1: Type: text/plain, Size: 1408 bytes --]

List,

I am trying to create an index with both "see" and "see also" 
cross-reference entries.[1] At this point, ConTeXt provides basic 
support for "see" entries via the \seeREGISTER command (it does not 
properly support references to sub-entries) and it provides no support 
at all for "see also" entries.

Can somebody suggest a way to generate these entries? Perhaps a way of 
inserting entries into the index before it is formatted, in the manner 
of \writetolist or \writebetweenlist? (MkII has \writetoregister, but 
that did not carry forward and I do not know if it would have helped here.)

I had brought this up to no response a couple of years ago.[2] I am 
hopeful that LMTX may offer a chance to get support for improved 
indexing, and in particular for "see" and "see also" entries.

[1] For definitions and usage of "see" entries, see 
https://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/index-see.html. 
For "see also" entries, see 
https://docs.oasis-open.org/dita/v1.1/OS/langspec/langref/index-see-also.html. 
For a deeper dive, see the publicly available University of Chicago 
Manual of Style version 15 guide, chapter 18, available at 
https://press.uchicago.edu/Misc/Chicago/CHIIndexingComplete.pdf, or more 
recent versions not yet freely available online.

[2] See "Possible seeindex enhancement" at 
https://www.mail-archive.com/ntg-context@ntg.nl/msg89470.html.

-- 
Rik



[-- Attachment #1.2: Type: text/html, Size: 2454 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Indexing redux
  2021-08-26  1:14 Indexing redux Rik Kabel via ntg-context
@ 2021-08-26  7:26 ` Taco Hoekwater via ntg-context
  2021-08-26 20:46   ` Rik Kabel via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Taco Hoekwater via ntg-context @ 2021-08-26  7:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater

Hi Rik,

> On 26 Aug 2021, at 03:14, Rik Kabel via ntg-context <ntg-context@ntg.nl> wrote:
> 
> List,
> 
> I am trying to create an index with both "see" and "see also" cross-reference entries.[1] At this point, ConTeXt provides basic support for "see" entries via the \seeREGISTER command (it does not properly support references to sub-entries) and it provides no support at all for "see also" entries.
> 
> Can somebody suggest a way to generate these entries? Perhaps a way of inserting entries into the index before it is formatted, in the     manner of \writetolist or \writebetweenlist? (MkII has \writetoregister, but that did not carry forward and I do not know if it would have helped here.)


Since strc-reg.mkiv starts with a number of ’todo’ comments, I think your best bet is to create an
actual functional example along with an explanation of what you want the typeset result to look 
like in the cases where it is not doing what you want.

Generally, explicit examples / test files are the best way to get replies to questions 
(either by Hans or anyone else).

Best wishes,
Taco

>  
Taco Hoekwater              E: taco@bittext.nl
genderfluid (all pronouns)



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Indexing redux
  2021-08-26  7:26 ` Taco Hoekwater via ntg-context
@ 2021-08-26 20:46   ` Rik Kabel via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Rik Kabel via ntg-context @ 2021-08-26 20:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Rik Kabel


[-- Attachment #1.1: Type: text/plain, Size: 6442 bytes --]


On 8/26/2021 03:26, Taco Hoekwater wrote:
> Hi Rik,
>
>> On 26 Aug 2021, at 03:14, Rik Kabel via ntg-context<ntg-context@ntg.nl>  wrote:
>>
>> List,
>>
>> I am trying to create an index with both "see" and "see also" cross-reference entries.[1] At this point, ConTeXt provides basic support for "see" entries via the \seeREGISTER command (it does not properly support references to sub-entries) and it provides no support at all for "see also" entries.
>>
>> Can somebody suggest a way to generate these entries? Perhaps a way of inserting entries into the index before it is formatted, in the     manner of \writetolist or \writebetweenlist? (MkII has \writetoregister, but that did not carry forward and I do not know if it would have helped here.)
>
> Since strc-reg.mkiv starts with a number of ’todo’ comments, I think your best bet is to create an
> actual functional example along with an explanation of what you want the typeset result to look
> like in the cases where it is not doing what you want.
>
> Generally, explicit examples / test files are the best way to get replies to questions
> (either by Hans or anyone else).

The following produces what I am looking for, and a bit more. Page 3 of 
the output shows what I would like to see, page 4 is the generated 
index. I don't really need the "see under" and "see also under" 
variants, but they would be nice to have. I am indifferent to having 
stops before "see also"s. I would like to be able to turn checking on or 
off, so that generic directives (in the example, see also specific 
breeds) will not generate an error, while the Ford Prefect example will 
generate an error.


        \defineprocessor[also][color=blue]
        \defineprocessor[under][color=green]
        \defineprocessor[alsounder][color=orange]
        \define\seealsoindex\seeindex
        \define\seealsounderindex\seeindex
        \define\seeunderindex\seeindex
        \setupinteraction [state=start]
        \setupregister    [index][balance=no,check=no]

    %% seeindex entries may start on the same line as their head entry
        \seeindex         {dog breeds+Wiener dog}{dog breeds+Dachshund}
    %%  The next example should not work,
    %%    since there is no main entry /Adams, Douglas/
        \seeindex         {Prefect, Ford}{Adams, Douglas}

    %%  When referring to a subentry, the target must be a subentry,
    %%    but should display as if a main entry. The next example
    %%    should point to the /Adams+Douglas/ subentry, but it
    %%    should be formatted as if it were /Adams, Douglas/
        \seeindex         {Dent, Arthur}{Adams+Douglas}

    %% The following two work as expected
        \seeindex         {Matilda effect}{obliteration}
        \seeindex         {Marut, Ret}{Traven, B.}

    %% seealso should be placed after as a subentry after real page
    references
    %% seealso should have an appropriate label (default English /see also/)
        \seealsoindex     {pseudepigraphy}{also->obliteration}
        \seealsoindex     {dog breeds}{also->breeding programs}
        \seealsoindex     {dog breeds}{also->specific breeds}
    %% seealsounder is like seealso except that it refers to a main entry
        \seealsounderindex{Coton de Tulear}{alsounder->dog breeds}
    %% seeunder also is like seealso except that it refers to a main entry
        \seeunderindex    {Weimaraner}{under->dog breeds}
        \starttext
          Stuff
          \index{obliteration}
          \index{Adams+Douglas}\index{Adams+John}
          \index{Beagle}
          \index{dog breeds+Beagle}
          \index{dog breeds+Coton de Tulear}
          \index{dog breeds+Dachshund}
          \index{dog breeds+Weimaraner}
        \page
          More stuff
          \index{Adams+John Quincy}
          \index{misquotation}
          \index{pseudepigraphy}
          \index{Traven, B.}
          \index{Beagle}
          \index{Coton de Tulear}
          \index{breeding programs}
        \page
    \definedescription[Index][headstyle=bold,alternative=top,inbetween=]
        \startIndex{a}
          Adams\par
          \quad \reference[AdamsDouglas]{Adams, Douglas}Douglas\quad 1\par
          \quad John\quad 1\par
          \quad John Quincy\quad 2\par
        \stopIndex
        \startIndex{b}
          Beagle\quad 1, 2\par
          \reference[breedingprograms]{breeding programs}breeding
    programs\quad 2
        \stopIndex
        \startIndex{c}
          Coton de Tulear\quad 2.\par
          \quad {\em See also under} \in[dogbreeds]
        \stopIndex
        \startIndex{d}
          \reference[DentArthur]{Dent, Arthur}Dent, Arthur {\em see}
    \in[AdamsDouglas]\par
          \reference[dogbreeds]{dog breeds}dog breeds\par
          \quad \reference[dbBeagle]{dog breeds, Beagle}Beagle\quad 1\par
          \quad \reference[dbCoton]{dog breeds, Coton}Coton de
    Tulear\quad 1\par
          \quad \reference[dbDachshund]{dog breeds,
    Dachshund}Dachshund\quad 1\par
          \quad \reference[dbWeimaraner]{dog breeds,
    Weimaraner}Weimaraner\quad 1\par
          \quad Wiener dog\quad {\em see} \in[dbDachshund]\par
          \quad{\em See also} \in[breedingprograms] {\em and specific
    breeds}
        \stopIndex
        \startIndex{m}
          Marut, Ret\quad {\em see} \in[TravenB]\par
          Matilda effect\quad {\em see} \in[obliteration]\par
          \reference[misquotation]{misquotation}misquotation\quad 2
        \stopIndex
        \startIndex{o}
          \reference[obliteration]{obliteration}obliteration\quad 1\par
          \quad{\em See also} \in[misquotation] {\em and}
    \in[pseudepigraphy]
        \stopIndex
        \startIndex{p}
          Prefect, Ford\quad {\em see Adams, Douglas}\par
    \reference[pseudepigraphy]{pseudepigraphy}pseudepigraphy\quad 2\par
          \quad {\em See also} \in[obliteration]
        \stopIndex
        \startIndex{t}
          \reference[TravenB]{Traven, B.}Traven, B.\quad 2
        \stopIndex
        \startIndex{w}
          Weimaraner\quad {\em see under} \in[dogbreeds]
        \stopIndex
        \page
        \placeindex
        \stoptext

-- 
Rik

[-- Attachment #1.2: Type: text/html, Size: 8458 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-26 20:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26  1:14 Indexing redux Rik Kabel via ntg-context
2021-08-26  7:26 ` Taco Hoekwater via ntg-context
2021-08-26 20:46   ` Rik Kabel via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).