ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* force index entries without page number
@ 2020-09-03  8:17 Henning Hraban Ramm
  2020-09-03  8:56 ` mf
  2020-09-04  9:59 ` Wolfgang Schuster
  0 siblings, 2 replies; 10+ messages in thread
From: Henning Hraban Ramm @ 2020-09-03  8:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I’d like to have an (person) index entry like

Ramm, Hraban   passim

i.e. without actual page number.
How can I force that?

I also need to be able to refer to it like
\seeindex{Hraban}{Ramm, Hraban)


Hraban
___________________________________________________________________________________
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] 10+ messages in thread

* Re: force index entries without page number
  2020-09-03  8:17 force index entries without page number Henning Hraban Ramm
@ 2020-09-03  8:56 ` mf
  2020-09-03  9:09   ` mf
  2020-09-04  9:59 ` Wolfgang Schuster
  1 sibling, 1 reply; 10+ messages in thread
From: mf @ 2020-09-03  8:56 UTC (permalink / raw)
  To: ntg-context

Il 03/09/20 10:17, Henning Hraban Ramm ha scritto:
> Hi,
> 
> I’d like to have an (person) index entry like
> 
> Ramm, Hraban   passim
> 
> i.e. without actual page number.
> How can I force that?
> 
> I also need to be able to refer to it like
> \seeindex{Hraban}{Ramm, Hraban)
> 
> 

\starttext
\samplefile{ward}\index{Ward, Peter}

\samplefile{sapolsky}\index{Sapolsky, Robert}

\seeindex{Ramm, Hraban}{}
\seeindex{Hraban}{Ramm, Hraban}

\page

\placeindex[check=yes]

\page

\placeindex[check=no]

\stoptext


Massi
___________________________________________________________________________________
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] 10+ messages in thread

* Re: force index entries without page number
  2020-09-03  8:56 ` mf
@ 2020-09-03  9:09   ` mf
  2020-09-03  9:14     ` mf
  2020-09-03  9:38     ` Henning Hraban Ramm
  0 siblings, 2 replies; 10+ messages in thread
From: mf @ 2020-09-03  9:09 UTC (permalink / raw)
  To: ntg-context

This should be exactly what you asked for:

\defineprocessor[passim][right=\quad{\it passim}]
\starttext
\samplefile{ward}\index{Ward, Peter}

\samplefile{sapolsky}\index{Sapolsky, Robert}

\seeindex{passim->Ramm, Hraban}{}
\seeindex{Hraban}{Ramm, Hraban}

\page

\placeindex[check=yes]

\page

\placeindex[check=no]

\stoptext

Massi
___________________________________________________________________________________
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] 10+ messages in thread

* Re: force index entries without page number
  2020-09-03  9:09   ` mf
@ 2020-09-03  9:14     ` mf
  2020-09-03  9:38     ` Henning Hraban Ramm
  1 sibling, 0 replies; 10+ messages in thread
From: mf @ 2020-09-03  9:14 UTC (permalink / raw)
  To: ntg-context

Useful references I consulted to find a solution:

https://www.mail-archive.com/ntg-context@ntg.nl/msg88118.html
https://wiki.contextgarden.net/Registers#Processors

Massi
___________________________________________________________________________________
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] 10+ messages in thread

* Re: force index entries without page number
  2020-09-03  9:09   ` mf
  2020-09-03  9:14     ` mf
@ 2020-09-03  9:38     ` Henning Hraban Ramm
  2020-09-03 11:32       ` mf
  1 sibling, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2020-09-03  9:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Massi, thank you!

> Am 03.09.2020 um 11:09 schrieb mf <massifr@fastwebnet.it>:
> 
> This should be exactly what you asked for:
> 
> \defineprocessor[passim][right=\quad{\it passim}]

I didn’t think to use processors.

> \seeindex{passim->Ramm, Hraban}{}

No, this results in
"Ramm, Hraban passim see passim"

And
\index{passim->Ramm, Hraban}
results in
"Ramm, Hraban passim 1"

I.e. I’m still looking for an index entry without "see" or page number.


> \placeindex[check=no]

This is essential for references to not (exactly) existing entries, I forgot the option existed.

Hraban
___________________________________________________________________________________
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] 10+ messages in thread

* Re: force index entries without page number
  2020-09-03  9:38     ` Henning Hraban Ramm
@ 2020-09-03 11:32       ` mf
  2020-09-04  9:01         ` Henning Hraban Ramm
  0 siblings, 1 reply; 10+ messages in thread
From: mf @ 2020-09-03 11:32 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]

Il 03/09/20 11:38, Henning Hraban Ramm ha scritto:
> Hi Massi, thank you!
> 
>> Am 03.09.2020 um 11:09 schrieb mf <massifr@fastwebnet.it>:
>>
>> This should be exactly what you asked for:
>>
>> \defineprocessor[passim][right=\quad{\it passim}]
> 
> I didn’t think to use processors.

You need them to get the "passim"; if you include it in the name, then 
you should adapt also the \seeindex like this:

\seeindex{Ramm, Hraban\quad{\it passim}}{}
\seeindex{Hraban}{Ramm, Hraban\quad{\it passim}}

(i did not test it, i don't know if it works, and anyway i don't like it 
because it's not clean)

> 
>> \seeindex{passim->Ramm, Hraban}{}
> 
> No, this results in
> "Ramm, Hraban passim see passim"
>

Only with check=yes, otherwise it works right.

> And
> \index{passim->Ramm, Hraban}
> results in
> "Ramm, Hraban passim 1"
> 

No, see attachment page 2.

> I.e. I’m still looking for an index entry without "see" or page number.
> 
> 
>> \placeindex[check=no]
> 
> This is essential for references to not (exactly) existing entries, I forgot the option existed.
> 

Use check=yes

Massi

[-- Attachment #2: force-index-entries-without-pagenumber.pdf --]
[-- Type: application/pdf, Size: 18538 bytes --]

[-- Attachment #3: 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] 10+ messages in thread

* Re: force index entries without page number
  2020-09-03 11:32       ` mf
@ 2020-09-04  9:01         ` Henning Hraban Ramm
  2020-09-04  9:30           ` mf
  0 siblings, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2020-09-04  9:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> Am 03.09.2020 um 13:32 schrieb mf <massifr@fastwebnet.it>:
> 
> Use check=yes

But I need check=no, because my author has several entries like


Miller, Carolyne, born Princess of Sayn-Wittgenstein   123–125

Sayn-Wittgenstein, Carolyne of  see Miller, Carolyne


i.e. the reference target often has a different wording from the entry,
and thus \seeindex{Something}{} always inserts a "see".


I don’t know how common these "passim" entries are in scientific works; maybe I could use

Mainperson  firstpage–lastpage

instead to avoid the major hassle of tricking the index mechanisms.


Hraban
___________________________________________________________________________________
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] 10+ messages in thread

* Re: force index entries without page number
  2020-09-04  9:01         ` Henning Hraban Ramm
@ 2020-09-04  9:30           ` mf
  0 siblings, 0 replies; 10+ messages in thread
From: mf @ 2020-09-04  9:30 UTC (permalink / raw)
  To: ntg-context

Il 04/09/20 11:01, Henning Hraban Ramm ha scritto:
> 
> 
>> Am 03.09.2020 um 13:32 schrieb mf <massifr@fastwebnet.it>:
>>
>> Use check=yes
> 
> But I need check=no, because my author has several entries like
> 
> 
> Miller, Carolyne, born Princess of Sayn-Wittgenstein   123–125
> 
> Sayn-Wittgenstein, Carolyne of  see Miller, Carolyne
> 
> 
> i.e. the reference target often has a different wording from the entry,
> and thus \seeindex{Something}{} always inserts a "see".
Now I understand.
Since I'm working with XML, I'm using registers in an even stricter way: 
the text I'm indexing is actually the ID of a person in a database.
Something like this:

<person-ref idref="v18in231">Carolyne</person-ref>

in the main text results in a \index[miller_carolyne]{v18in231}

In another place of the XML there's a record like this:

<person id="v18in231" sort-key="miller_carolyne">Miller, Carolyne ... 
</person>

The deeptextcommand parameter of \setupregister is set to a macro that 
takes the ID and gives back the text of the person.

Maybe in the database there's also another record like this:

<see-person id="v18in242" idref="v18in231" 
sort-key="sayn_wittgenstein_carolyne">Sayn-Wittgenstein, Carolyne 
<see>Miller, Carolyne</see><see-person>

that results in a 
\seeindex[sayn_wittgenstein_carolyne]{Sayn-Wittgenstein, 
Carolyne}{Miller, Carolyne}

> 
> I don’t know how common these "passim" entries are in scientific works; maybe I could use
> 
> Mainperson  firstpage–lastpage
> 
> instead to avoid the major hassle of tricking the index mechanisms.
> 
in that case \startindex...\stopindex or \startregister...\stopregister 
could be your friends.

Massi
___________________________________________________________________________________
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] 10+ messages in thread

* Re: force index entries without page number
  2020-09-03  8:17 force index entries without page number Henning Hraban Ramm
  2020-09-03  8:56 ` mf
@ 2020-09-04  9:59 ` Wolfgang Schuster
  2020-11-07 10:11   ` Henning Hraban Ramm
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2020-09-04  9:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Henning Hraban Ramm schrieb am 03.09.2020 um 10:17:
> Hi,
> 
> I’d like to have an (person) index entry like
> 
> Ramm, Hraban   passim
> 
> i.e. without actual page number.
> How can I force that?
> 
> I also need to be able to refer to it like
> \seeindex{Hraban}{Ramm, Hraban)


You can use this when the entry appears only once which replaces the 
page number with "passim".

\define[1]\Passim
   {passim}

\defineprocessor [passim] [command=\Passim]

\starttext

xxx\index{First}

yyy\index[passim->]{Second}

zzz\seeindex{Third}{Second}

\placeindex

\stoptext

Wolfgang
___________________________________________________________________________________
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] 10+ messages in thread

* Re: force index entries without page number
  2020-09-04  9:59 ` Wolfgang Schuster
@ 2020-11-07 10:11   ` Henning Hraban Ramm
  0 siblings, 0 replies; 10+ messages in thread
From: Henning Hraban Ramm @ 2020-11-07 10:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> Am 04.09.2020 um 11:59 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
> 
> Henning Hraban Ramm schrieb am 03.09.2020 um 10:17:
>> Hi,
>> I’d like to have an (person) index entry like
>> Ramm, Hraban   passim
>> i.e. without actual page number.
>> How can I force that?
>> I also need to be able to refer to it like
>> \seeindex{Hraban}{Ramm, Hraban)
> 
> 
> You can use this when the entry appears only once which replaces the page number with "passim".
> 
> \define[1]\Passim
>  {passim}
> 
> \defineprocessor [passim] [command=\Passim]
> 
> \starttext
> 
> xxx\index{First}
> 
> yyy\index[passim->]{Second}
> 
> zzz\seeindex{Third}{Second}
> 
> \placeindex
> 
> \stoptext

Hi Wolfgang,

forgot to answer: This solution works for me, thank you!

Hraban
___________________________________________________________________________________
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] 10+ messages in thread

end of thread, other threads:[~2020-11-07 10:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03  8:17 force index entries without page number Henning Hraban Ramm
2020-09-03  8:56 ` mf
2020-09-03  9:09   ` mf
2020-09-03  9:14     ` mf
2020-09-03  9:38     ` Henning Hraban Ramm
2020-09-03 11:32       ` mf
2020-09-04  9:01         ` Henning Hraban Ramm
2020-09-04  9:30           ` mf
2020-09-04  9:59 ` Wolfgang Schuster
2020-11-07 10:11   ` Henning Hraban Ramm

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).