ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* index issues
@ 2020-11-06 11:22 Henning Hraban Ramm
  2020-11-06 11:51 ` Jano Kula
       [not found] ` <A06B878B-653F-42E8-95A9-09B6868E6EDC@fiee.net>
  0 siblings, 2 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2020-11-06 11:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello again,

still struggling with indexes.

(1)
\setupregister’s before and after go around the indicator.
e.g. \setupregister[][indicator=no,after={XX}]
never shows that XX, since after is only used after the indicator, while before also works without.

I was hoping for a hook at the end of a section (to add \testcolumn, \blank etc. to work around no.2). Is there any?


(2)
Page/column breaking is odd in that the preferred breaking point seems to be one entry too early, i.e. the last entry of one letter end up in the next column and the previous column is one line too short.
It doesn’t change with balance=yes/no.

E.g.

p.1
A   A
A   A
A
A   B
A   B
A   B
A      <<<< !?

p.2
B   C
B   C
B   C
    C
C   
C   D
C   D


(3)
(How) can I otherwise influence page/column breaking? E.g.
- always keep multi line entries together
- break before or after some entry


(4)
Is it possible to combine entries from \index and \startregister[index]?

If I use \start/stopregister and have the same index entry within the range or on the same page, I get duplicate pages or page ranges, like 10-12 from \startregister and additionally 11, 12-13 from \index entries, makes at the moment 10-12, 11, 12-13 instead of just 10-13.



I’ll prepare MWEs, but maybe you can answer some of these without?

Thank you in advance,

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] 9+ messages in thread

* Re: index issues
  2020-11-06 11:22 index issues Henning Hraban Ramm
@ 2020-11-06 11:51 ` Jano Kula
  2020-11-06 11:54   ` Duncan Hothersall
       [not found] ` <A06B878B-653F-42E8-95A9-09B6868E6EDC@fiee.net>
  1 sibling, 1 reply; 9+ messages in thread
From: Jano Kula @ 2020-11-06 11:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Fri, 6 Nov 2020 at 12:24, Henning Hraban Ramm <texml@fiee.net> wrote:

> Hello again,
>
> still struggling with indexes.
>
> I’ll prepare MWEs, but maybe you can answer some of these without?
>

Hello Hraban!

Without MWE try \showinjector
<https://wiki.contextgarden.net/Command/showinjector> and \setinjector
<https://wiki.contextgarden.net/Command/setinjector>.

Jano

[-- Attachment #1.2: Type: text/html, Size: 953 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] 9+ messages in thread

* Re: index issues
  2020-11-06 11:51 ` Jano Kula
@ 2020-11-06 11:54   ` Duncan Hothersall
  2020-11-06 14:03     ` Henning Hraban Ramm
  2020-11-06 14:30     ` Henning Hraban Ramm
  0 siblings, 2 replies; 9+ messages in thread
From: Duncan Hothersall @ 2020-11-06 11:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Fri, 6 Nov 2020 at 11:52, Jano Kula <jano.kula@gmail.com> wrote:

>
> On Fri, 6 Nov 2020 at 12:24, Henning Hraban Ramm <texml@fiee.net> wrote:
>
>> Hello again,
>>
>> still struggling with indexes.
>>
>> I’ll prepare MWEs, but maybe you can answer some of these without?
>>
>
> Hello Hraban!
>
> Without MWE try \showinjector
> <https://wiki.contextgarden.net/Command/showinjector> and \setinjector
> <https://wiki.contextgarden.net/Command/setinjector>.
>
> Jano
>
> I would add to that that when experimenting with \showinjector you need to
have at least one \setinjector as well otherwise it doesn't show the
numbers.

Duncan

[-- Attachment #1.2: Type: text/html, Size: 1737 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] 9+ messages in thread

* Re: index issues
  2020-11-06 11:54   ` Duncan Hothersall
@ 2020-11-06 14:03     ` Henning Hraban Ramm
  2020-11-06 14:30     ` Henning Hraban Ramm
  1 sibling, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2020-11-06 14:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> Am 06.11.2020 um 12:54 schrieb Duncan Hothersall <dh@capdm.com>:
> 
> 
> 
> On Fri, 6 Nov 2020 at 11:52, Jano Kula <jano.kula@gmail.com> wrote:
> 
> On Fri, 6 Nov 2020 at 12:24, Henning Hraban Ramm <texml@fiee.net> wrote:
> Hello again,
> 
> still struggling with indexes.
> 
> I’ll prepare MWEs, but maybe you can answer some of these without?
> 
> Hello Hraban!
> 
> Without MWE try \showinjector and \setinjector.
> 
> Jano
> 
> I would add to that that when experimenting with \showinjector you need to have at least one \setinjector as well otherwise it doesn't show the numbers.
> 
> Duncan 


Jano, Duncan, thank you!

Injectors were mentioned recently, of course I forgout about them... Will try.

Best, 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] 9+ messages in thread

* Re: index issues
  2020-11-06 11:54   ` Duncan Hothersall
  2020-11-06 14:03     ` Henning Hraban Ramm
@ 2020-11-06 14:30     ` Henning Hraban Ramm
  2020-11-06 14:48       ` Duncan Hothersall
  1 sibling, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2020-11-06 14:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> Am 06.11.2020 um 12:54 schrieb Duncan Hothersall <dh@capdm.com>:
> 
> Without MWE try \showinjector and \setinjector.
> 
> I would add to that that when experimenting with \showinjector you need to have at least one \setinjector as well otherwise it doesn't show the numbers.
> 

It doesn’t work for me:

lua error       > lua error on line 24 in file inhalt/99anhang.tex:

registered function call [421]: ...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:63: attempt to index a nil value (field '?')
stack traceback:
	...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:63: in function <...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:57>
	(...tail calls...)

23     \setinjector[Person][10][{\column}]
24 >>  \showinjector[Person]


Regardless what I try as parameter of \showinjector (e.g. register, index, my own registers, one or a list) and where (in the environment or before \placeregister), I always get this error.

Bug?

LMTX version: 2020.09.20 23:02

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] 9+ messages in thread

* Re: index issues
  2020-11-06 14:30     ` Henning Hraban Ramm
@ 2020-11-06 14:48       ` Duncan Hothersall
  2020-11-06 14:54         ` Henning Hraban Ramm
  0 siblings, 1 reply; 9+ messages in thread
From: Duncan Hothersall @ 2020-11-06 14:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Fri, 6 Nov 2020 at 14:31, Henning Hraban Ramm <texml@fiee.net> wrote:

>
>
> > Am 06.11.2020 um 12:54 schrieb Duncan Hothersall <dh@capdm.com>:
> >
> > Without MWE try \showinjector and \setinjector.
> >
> > I would add to that that when experimenting with \showinjector you need
> to have at least one \setinjector as well otherwise it doesn't show the
> numbers.
> >
>
> It doesn’t work for me:
>
> lua error       > lua error on line 24 in file inhalt/99anhang.tex:
>
> registered function call [421]:
> ...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:63: attempt to
> index a nil value (field '?')
> stack traceback:
>         ...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:63: in
> function <...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:57>
>         (...tail calls...)
>
> 23     \setinjector[Person][10][{\column}]
> 24 >>  \showinjector[Person]
>
>
> Regardless what I try as parameter of \showinjector (e.g. register, index,
> my own registers, one or a list) and where (in the environment or before
> \placeregister), I always get this error.
>
> Bug?
>
> LMTX version: 2020.09.20 23:02
>
> Hraban
>
>
I don't think \showinjector needs an argument. My MWE when I was looking at
this has just \showinjector after the register definition but before the
\setinjector[...] commands.

Duncan

[-- Attachment #1.2: Type: text/html, Size: 2122 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] 9+ messages in thread

* Re: index issues
  2020-11-06 14:48       ` Duncan Hothersall
@ 2020-11-06 14:54         ` Henning Hraban Ramm
  0 siblings, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2020-11-06 14:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> Am 06.11.2020 um 15:48 schrieb Duncan Hothersall <dh@capdm.com>:
> 
> I don't think \showinjector needs an argument. My MWE when I was looking at this has just \showinjector after the register definition but before the \setinjector[...] commands.

Docs say otherwise.
Without argument, I don’t get an error, but also nothing happens.

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] 9+ messages in thread

* Re: index issues
       [not found] ` <A06B878B-653F-42E8-95A9-09B6868E6EDC@fiee.net>
@ 2020-11-06 14:55   ` Henning Hraban Ramm
  0 siblings, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2020-11-06 14:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

> Am 06.11.2020 um 12:22 schrieb Henning Hraban Ramm <texml@fiee.net>:
> 
> (2)
> Page/column breaking is odd in that the preferred breaking point seems to be one entry too early, i.e. the last entry of one letter end up in the next column and the previous column is one line too short.
> It doesn’t change with balance=yes/no.

If one of the \index{D...} lines is commented in the following example, the last D entry goes into the second column, the columns get balanced, and the second line of the last K entry is broken to the next page.
If you uncomment that line, it looks as intended (no balancing, full left column).
What’s wrong? Can I influence this e.g. with penalties?

(Screenshots were too big...)

Hraban


\setuppapersize[A6]
\setupbodyfont[16pt]
\setupregister[index][balance=no,indicator=no]
\showframe

\starttext

%\setinjector[index][10][{\column}]
%\showinjector[index] % ERROR!
\index{Danold}
\index{Drum}
%\index{Dapper} % uncomment to test
\index{Kankra}
\index{Kookaburra}

\placeregister[index][criterium=all]
\page

\startregister[index][test]{Knuth}
  \input tufte
  \index{Donald}\index{Drom}\index{Divine}
  \page\index{Dummy}
  \input knuth
  \index{Donald}\index{Dom}\index{Dunno}
  \page
\stopregister[index][test]

\input darwin\index{Darwin}
\page

\dorecurse{5}{
\input knuth
\index{Knuth}\index{Donald}\index{Dixit}
\page\index{Knothing}
}

\stoptext

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

* index issues
@ 2020-10-14 12:45 Henning Hraban Ramm
  0 siblings, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2020-10-14 12:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

(1)
If I get the same index entry two or more times on a page, sometimes with processor formatting, sometimes not, how can I control which version takes precedence?

Actual use case: index entries from footnotes should be italics, while those from the main text stay upright.
Now, if there is an entry from the main text, the entry from the footnote doesn’t matter. Is it possible to control that?
I wouldn’t like to sort out the cases manually and remove the entries from the footnotes – there are 981 footnotes in this book, and there are 15 pages of index entries.

I’m using a macro (I suppose you’ll remember; I left out the Lua table lookup for unified entries):

\defineprocessor[kursiv][style=italicface]

\define[1]\nIndex{\doifmodeelse{*footnote}{%
  \expanded{\index[kursiv->]{#1}}}%
}{%
  \expanded{\index{#1}}}%
}}


(2)
Can I avoid linebreaking of page ranges in \placeindex?

E.g. in

Knuth, Don   23, 35-
  37, 40

I’d like to keep 35–37 together (break before 35).


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] 9+ messages in thread

end of thread, other threads:[~2020-11-06 14:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 11:22 index issues Henning Hraban Ramm
2020-11-06 11:51 ` Jano Kula
2020-11-06 11:54   ` Duncan Hothersall
2020-11-06 14:03     ` Henning Hraban Ramm
2020-11-06 14:30     ` Henning Hraban Ramm
2020-11-06 14:48       ` Duncan Hothersall
2020-11-06 14:54         ` Henning Hraban Ramm
     [not found] ` <A06B878B-653F-42E8-95A9-09B6868E6EDC@fiee.net>
2020-11-06 14:55   ` Henning Hraban Ramm
  -- strict thread matches above, loose matches on Subject: below --
2020-10-14 12:45 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).