ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* index entries postponed if sections are empty
@ 2020-10-31 16:56 Henning Hraban Ramm
  2020-10-31 20:33 ` Otared Kavian
  2020-11-01 16:06 ` Jano Kula
  0 siblings, 2 replies; 4+ messages in thread
From: Henning Hraban Ramm @ 2020-10-31 16:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,
I‘m despairing about my index – some sections contain only an image (\externalfigure), but I need to set several index entries for the image contents.
The index entries get postponed until after the next chapter.
I guess the problem is that there’s no (text) content, but \par and \strut didn’t help.

The MWE shows that index entries in empty sections are ignored, i.e. “Something” is supposedly only on p.6:


\usemodule[visual]

\starttext

\dorecurse{5}{%
\startchapter[title={\recurselevel}]

\dorecurse{5}{%
\startsection[title={\fakewords{3}{5}}]

\index{Something}\index{A\recurselevel}

}

\stopchapter
}

\completeindex

\stoptext


What can I do?

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

* Re: index entries postponed if sections are empty
  2020-10-31 16:56 index entries postponed if sections are empty Henning Hraban Ramm
@ 2020-10-31 20:33 ` Otared Kavian
  2020-11-01 16:06 ` Jano Kula
  1 sibling, 0 replies; 4+ messages in thread
From: Otared Kavian @ 2020-10-31 20:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hraban,

Maybe you can add some « virtual » text in the section with an invisible color such as
	\startcolor[white] a \stopcolor
I don't know whether the following can solve your problem, but the entries of the index appear correctly:

\usemodule[visual]

\starttext

\dorecurse{5}{%
\startchapter[title={\recurselevel}]

\dorecurse{5}{%
\startsection[title={\fakewords{3}{5}}]
\startcolor[white] a \stopcolor
\index{Something}\index{A\recurselevel}

}

\stopchapter
}

\completeindex

\stoptext

Best regards: OK

> On 31 Oct 2020, at 17:56, Henning Hraban Ramm <texml@fiee.net> wrote:
> 
> Hi,
> I‘m despairing about my index – some sections contain only an image (\externalfigure), but I need to set several index entries for the image contents.
> The index entries get postponed until after the next chapter.
> I guess the problem is that there’s no (text) content, but \par and \strut didn’t help.
> 
> The MWE shows that index entries in empty sections are ignored, i.e. “Something” is supposedly only on p.6:
> 
> 
> \usemodule[visual]
> 
> \starttext
> 
> \dorecurse{5}{%
> \startchapter[title={\recurselevel}]
> 
> \dorecurse{5}{%
> \startsection[title={\fakewords{3}{5}}]
> 
> \index{Something}\index{A\recurselevel}
> 
> }
> 
> \stopchapter
> }
> 
> \completeindex
> 
> \stoptext
> 
> 
> What can I do?
> 
> 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
> ___________________________________________________________________________________

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

* Re: index entries postponed if sections are empty
  2020-10-31 16:56 index entries postponed if sections are empty Henning Hraban Ramm
  2020-10-31 20:33 ` Otared Kavian
@ 2020-11-01 16:06 ` Jano Kula
  2020-11-02 16:17   ` Henning Hraban Ramm
  1 sibling, 1 reply; 4+ messages in thread
From: Jano Kula @ 2020-11-01 16:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hello Hraban!

On Sat, 31 Oct 2020 at 17:56, Henning Hraban Ramm <texml@fiee.net> wrote:

> Hi,
> I‘m despairing about my index – some sections contain only an image
> (\externalfigure), but I need to set several index entries for the image
> contents.
> The index entries get postponed until after the next chapter.
> I guess the problem is that there’s no (text) content, but \par and \strut
> didn’t help.
>
>
Add *\dontleavehmode*\index{Something}\index{A\recurselevel} before \index
command.

Regards,
Jano

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

* Re: index entries postponed if sections are empty
  2020-11-01 16:06 ` Jano Kula
@ 2020-11-02 16:17   ` Henning Hraban Ramm
  0 siblings, 0 replies; 4+ messages in thread
From: Henning Hraban Ramm @ 2020-11-02 16:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Otared, Jano, thank you for your answers – what finally helped was putting the image and the index entries in a vbox together.

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

end of thread, other threads:[~2020-11-02 16:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31 16:56 index entries postponed if sections are empty Henning Hraban Ramm
2020-10-31 20:33 ` Otared Kavian
2020-11-01 16:06 ` Jano Kula
2020-11-02 16:17   ` 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).