* \index{…} causes space
@ 2010-12-24 10:48 Andreas Harder
2010-12-24 10:54 ` Taco Hoekwater
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Harder @ 2010-12-24 10:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
Hi all,
is it possible to make \index{…} more robust, so that one could set a space between command an followed word?
\startTEXpage[offset=1ex]
test test\vl \crlf
test \index{test}test\vl \crlf % OK
test \index{test} test\vl % not OK
\stopTEXpage
But more important, even if there isn’t a space, the \index-command spoils the output.
\setuplayout[width=middle,backspace=40mm]
\starttext \showframe[text][text]
\dorecurse{100}{test }
\blank
\dorecurse{100}{\index{test}test }
\stoptext
[-- Attachment #2: test-index-space.pdf --]
[-- Type: application/pdf, Size: 14810 bytes --]
[-- Attachment #3: Type: text/plain, Size: 57 bytes --]
I hope this can be fixed soon …
Greeting
Andreas
[-- Attachment #4: Type: text/plain, Size: 486 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \index{…} causes space
2010-12-24 10:48 \index{…} causes space Andreas Harder
@ 2010-12-24 10:54 ` Taco Hoekwater
2010-12-24 11:53 ` Alan BRASLAU
0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2010-12-24 10:54 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 12/24/2010 11:48 AM, Andreas Harder wrote:
> \startTEXpage[offset=1ex]
> test test\vl \crlf
> test \index{test}test\vl \crlf % OK
> test \index{test} test\vl % not OK
> \stopTEXpage
\ignorespaces could be possibly be added to \index in your case,
but that does not solve this conceptual problem: what is actually
being indexed in that second line? Not the word on the left
(as that could be on a different page), neither the word on the
right (as that could also be on a different page).
So basically, you are indexing the spot between two spaces.
Therefore it seems justified that ConTeXt conveniently keeps
both spaces ...
Best wishes,
Taco
___________________________________________________________________________________
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] 5+ messages in thread
* Re: \index{…} causes space
2010-12-24 10:54 ` Taco Hoekwater
@ 2010-12-24 11:53 ` Alan BRASLAU
2010-12-24 11:57 ` Andreas Harder
0 siblings, 1 reply; 5+ messages in thread
From: Alan BRASLAU @ 2010-12-24 11:53 UTC (permalink / raw)
To: ntg-context; +Cc: Taco Hoekwater
On Friday 24 December 2010 11:54:17 Taco Hoekwater wrote:
> > On 12/24/2010 11:48 AM, Andreas Harder wrote:
> > \index{test}test
>
> \ignorespaces could be possibly be added to \index in your case,
> but that does not solve this conceptual problem: what is actually
> being indexed in that second line? Not the word on the left
> (as that could be on a different page), neither the word on the
> right (as that could also be on a different page).
I have understood that the correct use of \index{}
is immediately following the word to be indexed, as in:
test\index{test}
In the case of indexing a multiple-word item, one should
probably place \index{} immediately following the first word, as in:
merry\index{merry christmas} christmas!
(so that the reference points to the page featuring "merry",
even if "christmas" wraps the the following page).
Alan
___________________________________________________________________________________
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] 5+ messages in thread
* Re: \index{…} causes space
2010-12-24 11:53 ` Alan BRASLAU
@ 2010-12-24 11:57 ` Andreas Harder
2010-12-25 10:18 ` Alan BRASLAU
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Harder @ 2010-12-24 11:57 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 763 bytes --]
Am 24.12.2010 um 12:53 schrieb Alan BRASLAU:
> On Friday 24 December 2010 11:54:17 Taco Hoekwater wrote:
>>> On 12/24/2010 11:48 AM, Andreas Harder wrote:
>>> \index{test}test
>>
>> \ignorespaces could be possibly be added to \index in your case,
>> but that does not solve this conceptual problem: what is actually
>> being indexed in that second line? Not the word on the left
>> (as that could be on a different page), neither the word on the
>> right (as that could also be on a different page).
>
> I have understood that the correct use of \index{}
> is immediately following the word to be indexed, as in:
> test\index{test}
The wiki (http://wiki.contextgarden.net/Registers#Example) suggests it the other way round …?
Andreas
[-- Attachment #1.2: Type: text/html, Size: 1522 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \index{…} causes space
2010-12-24 11:57 ` Andreas Harder
@ 2010-12-25 10:18 ` Alan BRASLAU
0 siblings, 0 replies; 5+ messages in thread
From: Alan BRASLAU @ 2010-12-25 10:18 UTC (permalink / raw)
To: ntg-context
On Friday 24 December 2010 12:57:26 Andreas Harder wrote:
> Am 24.12.2010 um 12:53 schrieb Alan BRASLAU:
> > On Friday 24 December 2010 11:54:17 Taco Hoekwater wrote:
> >>> On 12/24/2010 11:48 AM, Andreas Harder wrote:
> >>> \index{test}test
> >>
> >> \ignorespaces could be possibly be added to \index in your case,
> >> but that does not solve this conceptual problem: what is actually
> >> being indexed in that second line? Not the word on the left
> >> (as that could be on a different page), neither the word on the
> >> right (as that could also be on a different page).
> >
> > I have understood that the correct use of \index{}
> >
> > is immediately following the word to be indexed, as in:
> > test\index{test}
>
> The wiki (http://wiki.contextgarden.net/Registers#Example) suggests it the
> other way round …?
>
I don't know about the wiki. Maybe it is correct, maybe not.
I suppose that I should be able to figure this out looking at the source code.
As Taco points out (see below):
test \index{test}
is no good, as the page can possibly be broken before the index entry;
\index{test}test
is no good either, as "test" may appear on the page following the index entry.
I had always understood the correct usage to be:
test\index{test}
On Friday 24 December 2010 11:54:17 Taco Hoekwater wrote:
> On 12/24/2010 11:48 AM, Andreas Harder wrote:
> > \startTEXpage[offset=1ex]
> > test test\vl \crlf
> > test \index{test}test\vl \crlf % OK
> > test \index{test} test\vl % not OK
> > \stopTEXpage
>
> \ignorespaces could be possibly be added to \index in your case,
> but that does not solve this conceptual problem: what is actually
> being indexed in that second line? Not the word on the left
> (as that could be on a different page), neither the word on the
> right (as that could also be on a different page).
>
___________________________________________________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2010-12-25 10:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-24 10:48 \index{…} causes space Andreas Harder
2010-12-24 10:54 ` Taco Hoekwater
2010-12-24 11:53 ` Alan BRASLAU
2010-12-24 11:57 ` Andreas Harder
2010-12-25 10:18 ` Alan BRASLAU
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).