* where to place \index (again)
@ 2011-06-26 12:54 Thomas A. Schmitz
2011-06-26 16:35 ` Steffen Wolfrum
2011-06-26 17:47 ` Hans Hagen
0 siblings, 2 replies; 10+ messages in thread
From: Thomas A. Schmitz @ 2011-06-26 12:54 UTC (permalink / raw)
To: mailing ConTeXt users list for
Hi all,
I'm in the final phase of editing a scholarly book with a pretty big index. What follows is less a question than an observation: no matter where I place the \index command, there can always be unwanted side effects:
foo\index{bar}: here, the entry may point to the page following the name, if the page break falls at this position. Moreover, when this is followed by punctuation or footnotes, there may be a line break between the word and the punctuation/footnote mark. Placing it at the end of a long footnote is asking for even more trouble, because there's a real risk that a page break may occur.
\index{bar}foo: the book is typeset with character protrusion, and this seems to introduce additional material which can disturb line endings, so that lines before such an indexed word appear to be missing one character at the end.
So this is what I observe. Working around this is possible, but painful - I have to check every page for such bad linebreaks or misplaced punctuation marks. My question then is: will it be possible, at one point in luatex development, to find a more robust solution for this? This would be wonderful, I think!
All best
Thomas
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: where to place \index (again)
2011-06-26 12:54 where to place \index (again) Thomas A. Schmitz
@ 2011-06-26 16:35 ` Steffen Wolfrum
2011-06-26 17:47 ` Hans Hagen
1 sibling, 0 replies; 10+ messages in thread
From: Steffen Wolfrum @ 2011-06-26 16:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 26.06.2011 um 14:54 schrieb Thomas A. Schmitz:
> Hi all,
>
> I'm in the final phase of editing a scholarly book with a pretty big index. What follows is less a question than an observation: no matter where I place the \index command, there can always be unwanted side effects:
>
> foo\index{bar}: here, the entry may point to the page following the name, if the page break falls at this position. Moreover, when this is followed by punctuation or footnotes, there may be a line break between the word and the punctuation/footnote mark. Placing it at the end of a long footnote is asking for even more trouble, because there's a real risk that a page break may occur.
>
> \index{bar}foo: the book is typeset with character protrusion, and this seems to introduce additional material which can disturb line endings, so that lines before such an indexed word appear to be missing one character at the end.
>
> So this is what I observe. Working around this is possible, but painful - I have to check every page for such bad linebreaks or misplaced punctuation marks. My question then is: will it be possible, at one point in luatex development, to find a more robust solution for this? This would be wonderful, I think!
So do I ... Below is a minimal showing both unhappy cases.
Steffen
-------
Anfang der weitergeleiteten E-Mail:
> Von: Steffen Wolfrum <context@st.estfiles.de>
> Datum: 24. Mai 2011 11:28:03 MESZ
> An: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Betreff: where to put an \index{foo} ?
>
> ...
>
> \showframe
>
> \setupbodyfont[times,10pt]\setupinterlinespace[line=12pt]
>
> \definetolerancemethod
> [horizontal]
> [MySpace]
> {\spaceskip3.02pt plus1.99998pt minus1.0pt\relax}
>
> \setupalign[line,block,hanging]
> \setuptolerance[MySpace]
>
> \setupindenting[10pt,yes]
>
> \definepapersize[stw][width=14.7cm,height=22.3cm]
> \setuppapersize[stw][stw]
>
> \setuplayout
> [width=113mm,height=572pt,
> backspace=17mm,topspace=17mm,
> header=12pt,headerdistance=6pt,
> footer=36pt,footerdistance=0pt,
> location=middle,marking=off]
>
>
> \starttext
>
> {\em Case 1: line wrap before dot}
>
> \noindent dieses ist dabei typisch für den Bereich der Architekten- oder
> Ingenieurleistungen\index{Ingenieurleistungen}. Warum?
>
> \blank
>
> {\em Case 2: line wrap after visible space}
>
> Bei den Grünen werden neben den beiden Fraktionsvorsitzenden, Renate \index{Künast}Künast und Jürgen Trittin ...
> \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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: where to place \index (again)
2011-06-26 12:54 where to place \index (again) Thomas A. Schmitz
2011-06-26 16:35 ` Steffen Wolfrum
@ 2011-06-26 17:47 ` Hans Hagen
2011-06-26 19:13 ` Steffen Wolfrum
1 sibling, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2011-06-26 17:47 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz
On 26-6-2011 2:54, Thomas A. Schmitz wrote:
> Hi all,
>
> I'm in the final phase of editing a scholarly book with a pretty big index. What follows is less a question than an observation: no matter where I place the \index command, there can always be unwanted side effects:
>
> foo\index{bar}: here, the entry may point to the page following the name, if the page break falls at this position. Moreover, when this is followed by punctuation or footnotes, there may be a line break between the word and the punctuation/footnote mark. Placing it at the end of a long footnote is asking for even more trouble, because there's a real risk that a page break may occur.
>
> \index{bar}foo: the book is typeset with character protrusion, and this seems to introduce additional material which can disturb line endings, so that lines before such an indexed word appear to be missing one character at the end.
>
> So this is what I observe. Working around this is possible, but painful - I have to check every page for such bad linebreaks or misplaced punctuation marks. My question then is: will it be possible, at one point in luatex development, to find a more robust solution for this? This would be wonderful, I think!
\index is connected to the next word or when on a line on it own as in
\chapter{x} \index{x} <emptyline> text to the next paragraph
concerning the character protrusion: that looks like a bug so if we can
have a small example demonstrating it ... esp the disappearing character
is weird
(I can introduce a couple of processing modes if needed, but then you
have to check if an index entry points to a word starting on a previous
page. In any case, changing the default behaviour might have other side
effects for existing documents.)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: where to place \index (again)
2011-06-26 17:47 ` Hans Hagen
@ 2011-06-26 19:13 ` Steffen Wolfrum
2011-06-26 19:29 ` Wolfgang Schuster
0 siblings, 1 reply; 10+ messages in thread
From: Steffen Wolfrum @ 2011-06-26 19:13 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen, Thomas A. Schmitz
Am 26.06.2011 um 19:47 schrieb Hans Hagen:
> On 26-6-2011 2:54, Thomas A. Schmitz wrote:
>> Hi all,
>>
>> I'm in the final phase of editing a scholarly book with a pretty big index. What follows is less a question than an observation: no matter where I place the \index command, there can always be unwanted side effects:
>>
>> foo\index{bar}: here, the entry may point to the page following the name, if the page break falls at this position. Moreover, when this is followed by punctuation or footnotes, there may be a line break between the word and the punctuation/footnote mark. Placing it at the end of a long footnote is asking for even more trouble, because there's a real risk that a page break may occur.
>>
>> \index{bar}foo: the book is typeset with character protrusion, and this seems to introduce additional material which can disturb line endings, so that lines before such an indexed word appear to be missing one character at the end.
>>
>> So this is what I observe. Working around this is possible, but painful - I have to check every page for such bad linebreaks or misplaced punctuation marks. My question then is: will it be possible, at one point in luatex development, to find a more robust solution for this? This would be wonderful, I think!
>
> \index is connected to the next word or when on a line on it own as in \chapter{x} \index{x} <emptyline> text to the next paragraph
>
> concerning the character protrusion: that looks like a bug so if we can have a small example demonstrating it ... esp the disappearing character is weird
Sure, the minimal example that I posted already twice shows exactly this case:
The line before an indexed word appears to be missing one character at the end.
See "Case 2" in attached example, please.
Steffen
-------
\showframe
\setupbodyfont[times,10pt]\setupinterlinespace[line=12pt]
\definetolerancemethod
[horizontal]
[MySpace]
{\spaceskip3.02pt plus1.99998pt minus1.0pt\relax}
\setupalign[line,block,hanging]
\setuptolerance[MySpace]
\setupindenting[10pt,yes]
\definepapersize[stw][width=14.7cm,height=22.3cm]
\setuppapersize[stw][stw]
\setuplayout
[width=113mm,height=572pt,
backspace=17mm,topspace=17mm,
header=12pt,headerdistance=6pt,
footer=36pt,footerdistance=0pt,
location=middle,marking=off]
\starttext
{\em Case 1: line wrap before dot}
\noindent dieses ist dabei typisch für den Bereich der Architekten- oder
Ingenieurleistungen\index{Ingenieurleistungen}. Warum?
\blank
{\em Case 2: line wrap after visible space}
Bei den Grünen werden neben den beiden Fraktionsvorsitzenden, Renate \index{Künast}Künast und Jürgen Trittin ...
\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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: where to place \index (again)
2011-06-26 19:13 ` Steffen Wolfrum
@ 2011-06-26 19:29 ` Wolfgang Schuster
2011-06-26 20:18 ` Thomas Schmitz
0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2011-06-26 19:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
Cc: Hans Hagen, Steffen Wolfrum, Thomas A. Schmitz
Am 26.06.2011 um 21:13 schrieb Steffen Wolfrum:
>> concerning the character protrusion: that looks like a bug so if we can have a small example demonstrating it ... esp the disappearing character is weird
>
> Sure, the minimal example that I posted already twice shows exactly this case:
> The line before an indexed word appears to be missing one character at the end.
You should try to make shorter examples ;)
\setuplayout[width=6.3cm]\showframe
%\let\forcecolorhack\relax
\starttext
This is a short sentence to check \index{test}the \tex{index} command.
This is another sentence for the test\index{test}.
\stoptext
The problem when you put the \index command before a word is that
it can end in a visible space at the end of the previous line.
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: where to place \index (again)
2011-06-26 19:29 ` Wolfgang Schuster
@ 2011-06-26 20:18 ` Thomas Schmitz
2011-06-26 20:52 ` Wolfgang Schuster
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Thomas Schmitz @ 2011-06-26 20:18 UTC (permalink / raw)
To: mailing list for ConTeXt users, Wolfgang Schuster
Cc: Hans Hagen, Steffen Wolfrum
On Sun, 26 Jun 2011 21:29:47 +0200
Wolfgang Schuster <schuster.wolfgang@googlemail.com>
wrote:
>
> Am 26.06.2011 um 21:13 schrieb Steffen Wolfrum:
>
>>> concerning the character protrusion: that looks like a
>>>bug so if we can have a small example demonstrating it
>>>... esp the disappearing character is weird
>>
>> Sure, the minimal example that I posted already twice
>>shows exactly this case:
>> The line before an indexed word appears to be missing
>>one character at the end.
>
>
> You should try to make shorter examples ;)
>
> \setuplayout[width=6.3cm]\showframe
> %\let\forcecolorhack\relax
> \starttext
> This is a short sentence to check \index{test}the
>\tex{index} command.
>
> This is another sentence for the test\index{test}.
> \stoptext
>
> The problem when you put the \index command before a
>word is that
> it can end in a visible space at the end of the previous
>line.
>
> Wolfgang
>
Thanks, Wolfgang. Just to confirm: yes, this short test
does indeed show exactly the effects I was referring to.
So question to Taco: could some lua trickery somehow get
around these nasty effects? Because they really make
finishing a long project somewhat difficult...
Thomas
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: where to place \index (again)
2011-06-26 20:18 ` Thomas Schmitz
@ 2011-06-26 20:52 ` Wolfgang Schuster
2011-06-27 18:01 ` Hans Hagen
2011-06-27 7:38 ` Steffen Wolfrum
2011-06-27 16:01 ` Hans Hagen
2 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2011-06-26 20:52 UTC (permalink / raw)
To: Thomas Schmitz
Cc: mailing list for ConTeXt users, Hans Hagen, Steffen Wolfrum
Am 26.06.2011 um 22:18 schrieb Thomas Schmitz:
>> \setuplayout[width=6.3cm]\showframe
>> %\let\forcecolorhack\relax
>> \starttext
>> This is a short sentence to check \index{test}the \tex{index} command.
>> This is another sentence for the test\index{test}.
>> \stoptext
>> The problem when you put the \index command before a word is that
>> it can end in a visible space at the end of the previous line.
>> Wolfgang
> Thanks, Wolfgang. Just to confirm: yes, this short test does indeed show exactly the effects I was referring to. So question to Taco: could some lua trickery somehow get around these nasty effects? Because they really make finishing a long project somewhat difficult...
The effect is caused by \forcecolorhack and when uncomment
my redefinition you can see that the output is as expected
but there has to be a reason why Hans use it.
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: where to place \index (again)
2011-06-26 20:18 ` Thomas Schmitz
2011-06-26 20:52 ` Wolfgang Schuster
@ 2011-06-27 7:38 ` Steffen Wolfrum
2011-06-27 16:01 ` Hans Hagen
2 siblings, 0 replies; 10+ messages in thread
From: Steffen Wolfrum @ 2011-06-27 7:38 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz
Am 26.06.2011 um 22:18 schrieb Thomas Schmitz:
> On Sun, 26 Jun 2011 21:29:47 +0200
> Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
>> Am 26.06.2011 um 21:13 schrieb Steffen Wolfrum:
>>>> concerning the character protrusion: that looks like a bug so if we can have a small example demonstrating it ... esp the disappearing character is weird
>>> Sure, the minimal example that I posted already twice shows exactly this case: The line before an indexed word appears to be missing one character at the end.
>> You should try to make shorter examples ;)
>> \setuplayout[width=6.3cm]\showframe
>> %\let\forcecolorhack\relax
>> \starttext
>> This is a short sentence to check \index{test}the \tex{index} command.
>> This is another sentence for the test\index{test}.
>> \stoptext
>> The problem when you put the \index command before a word is that
>> it can end in a visible space at the end of the previous line.
>> Wolfgang
> Thanks, Wolfgang. Just to confirm: yes, this short test does indeed show exactly the effects I was referring to. So question to Taco: could some lua trickery somehow get around these nasty effects? Because they really make finishing a long project somewhat difficult...
For the first case you describe theres is already a tracker item:
http://tracker.luatex.org/view.php?id=381
Steffen
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: where to place \index (again)
2011-06-26 20:18 ` Thomas Schmitz
2011-06-26 20:52 ` Wolfgang Schuster
2011-06-27 7:38 ` Steffen Wolfrum
@ 2011-06-27 16:01 ` Hans Hagen
2 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2011-06-27 16:01 UTC (permalink / raw)
To: Thomas Schmitz; +Cc: mailing list for ConTeXt users, Steffen Wolfrum
On 26-6-2011 10:18, Thomas Schmitz wrote:
> Thanks, Wolfgang. Just to confirm: yes, this short test does indeed show
> exactly the effects I was referring to. So question to Taco: could some
> lua trickery somehow get around these nasty effects? Because they really
> make finishing a long project somewhat difficult...
you can't blame taco for that -)
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: where to place \index (again)
2011-06-26 20:52 ` Wolfgang Schuster
@ 2011-06-27 18:01 ` Hans Hagen
0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2011-06-27 18:01 UTC (permalink / raw)
To: Wolfgang Schuster
Cc: mailing list for ConTeXt users, Thomas Schmitz, Steffen Wolfrum
On 26-6-2011 10:52, Wolfgang Schuster wrote:
>
> Am 26.06.2011 um 22:18 schrieb Thomas Schmitz:
>
>>> \setuplayout[width=6.3cm]\showframe
>>> %\let\forcecolorhack\relax
>>> \starttext
>>> This is a short sentence to check \index{test}the \tex{index} command.
>>> This is another sentence for the test\index{test}.
>>> \stoptext
>>> The problem when you put the \index command before a word is that
>>> it can end in a visible space at the end of the previous line.
>>> Wolfgang
>> Thanks, Wolfgang. Just to confirm: yes, this short test does indeed show exactly the effects I was referring to. So question to Taco: could some lua trickery somehow get around these nasty effects? Because they really make finishing a long project somewhat difficult...
>
> The effect is caused by \forcecolorhack and when uncomment
> my redefinition you can see that the output is as expected
> but there has to be a reason why Hans use it.
the colorhack is needed to getsomething with a reference; i'll change it
to a signal (let's see where that fails)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-06-27 18:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-26 12:54 where to place \index (again) Thomas A. Schmitz
2011-06-26 16:35 ` Steffen Wolfrum
2011-06-26 17:47 ` Hans Hagen
2011-06-26 19:13 ` Steffen Wolfrum
2011-06-26 19:29 ` Wolfgang Schuster
2011-06-26 20:18 ` Thomas Schmitz
2011-06-26 20:52 ` Wolfgang Schuster
2011-06-27 18:01 ` Hans Hagen
2011-06-27 7:38 ` Steffen Wolfrum
2011-06-27 16:01 ` Hans Hagen
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).