ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Index
@ 2005-10-15 20:44 Olivier
  2005-10-15 22:11 ` Index Thomas A. Schmitz
  0 siblings, 1 reply; 20+ messages in thread
From: Olivier @ 2005-10-15 20:44 UTC (permalink / raw)


Hi,

is there a mechanism so that on is able to say
\index[start from here]{great+topic}  % we are on p3 
blabla much material
\index[stop there]{great+topic}       % we are on p7

and the index will advertise the topic as 
great
  topic 3-7

Of course I don't want to put an \index at every page
(I don't even know the page break when looking at the source file ;)

This feature is especially nice when defining a concept in a manual.

Many thanks in advance,
Olivier

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-10-15 20:44 Index Olivier
@ 2005-10-15 22:11 ` Thomas A. Schmitz
  2005-10-15 23:07   ` Index Olivier
  0 siblings, 1 reply; 20+ messages in thread
From: Thomas A. Schmitz @ 2005-10-15 22:11 UTC (permalink / raw)


In theory, you can say

\startregister[index]{great+topic} and \stopregister[index]{great+topic}

and this will do what you want. However, this is one of several bugs  
in the index module of ConTeXt: this will print just this range and  
gobble all other entries in the index for great/topic. I wrote a note  
to the list about these bugs about a week ago, but there were no  
replies. I guess if there are two of us and we yell loud enough, Hans  
will hear us eventually :-)

Best

Thomas

On Oct 15, 2005, at 10:44 PM, Olivier wrote:

> Hi,
>
> is there a mechanism so that on is able to say
> \index[start from here]{great+topic}  % we are on p3
> blabla much material
> \index[stop there]{great+topic}       % we are on p7
>
> and the index will advertise the topic as
> great
>   topic 3-7
>
> Of course I don't want to put an \index at every page
> (I don't even know the page break when looking at the source file ;)
>
> This feature is especially nice when defining a concept in a manual.
>
> Many thanks in advance,
> Olivier
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-10-15 22:11 ` Index Thomas A. Schmitz
@ 2005-10-15 23:07   ` Olivier
  2005-11-09 13:11     ` Index Hans Hagen
  0 siblings, 1 reply; 20+ messages in thread
From: Olivier @ 2005-10-15 23:07 UTC (permalink / raw)


Quoting  "Thomas A. Schmitz" :
> -- was thomas.schmitz@uni-bonn.de on Oct 16, 2005 at 12:11:31 --

> In theory, you can say
> 
> \startregister[index]{great+topic} and \stopregister[index]{great+topic}

Many thanks Thomas, that's what I was looking for :))

> and this will do what you want. However, this is one of several bugs  
> in the index module of ConTeXt: this will print just this range and  
> gobble all other entries in the index for great/topic.

You're right, a quick test demonstrated the bug.
However, the .tui contained 
 r f {index} {108} {} {great+topic} {2--0-9-1-1-0-0-0--101} {111}
 r t {index} {109} {} {great+topic} {2--0-9-1-1-0-0-0--102} {112}
 c \listentry{subsubsection}{110}{}{A section}{2--0-9-1-2-0-0-0--102}{112}
 c \mainreference{}{eq:aneq}{2--0-9-1-2-0-0-0--102}{112}{37}
 r e {index} {111} {} {great+topic} {2--0-9-1-2-0-0-0--103} {113}

and the .tuo
%
% TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 / Registers
%
\registerentry{index}{a}
\registerentrya{index}{astonishing}
\registerentryb{index}{bug}
\registerpage{index}{,}{113}{2--0-9-1-3-0-0-0--103}{113}
\registerentry{index}{g}
\registerentrya{index}{great}
\registerentryb{index}{topic}
\registerfrom{index}{,}{108}{2--0-9-1-1-0-0-0--101}{111}
\registerpage{index}{,}{111}{2--0-9-1-2-0-0-0--103}{113}
\registerto{index}{,}{109}{2--0-9-1-1-0-0-0--102}{112}


When swapping the two last lines in the .tuo and running 
 texexec --once 
make it print the index
 great
   topic 101-102, 103

which is not that nice (should have been merged into 101-103), 
but recovered the missing file.

In the texutil script there seems to be only sorting on entries' labels
and no further sorting with the page number because it sorts this string
  join($JOIN,$Class,$LCKey,$Key,$Entry,$TextHow,$RegStatus,
         $RealPageNumber,$Location,$Page,$PageHow,$SeeToo) 

What about using a hash instead of a string to handle the register
entries' information so that it will be easier to handle the page ranges
after having sorted the labels?

> I wrote a note 
> to the list about these bugs about a week ago, but there were no  
> replies. I guess if there are two of us and we yell loud enough, Hans  
> will hear us eventually :-)

I'm with you :))

By the way, this may benefit Taco's bibmodule when implementing the
backtracking referencing mechanism...


Greetings,
Olivier

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-10-15 23:07   ` Index Olivier
@ 2005-11-09 13:11     ` Hans Hagen
  2005-11-09 14:14       ` Index Thomas A. Schmitz
  0 siblings, 1 reply; 20+ messages in thread
From: Hans Hagen @ 2005-11-09 13:11 UTC (permalink / raw)


Olivier wrote:

>Quoting  "Thomas A. Schmitz" :
>  
>
>>-- was thomas.schmitz@uni-bonn.de on Oct 16, 2005 at 12:11:31 -
>>
>You're right, a quick test demonstrated the bug.
>
>In the texutil script there seems to be only sorting on entries' labels
>and no further sorting with the page number because it sorts this string
>  join($JOIN,$Class,$LCKey,$Key,$Entry,$TextHow,$RegStatus,
>         $RealPageNumber,$Location,$Page,$PageHow,$SeeToo) 
>
>What about using a hash instead of a string to handle the register
>entries' information so that it will be easier to handle the page ranges
>after having sorted the labels?
>  
>
newtexutil work different

>>I wrote a note 
>>to the list about these bugs about a week ago, but there were no  
>>replies. I guess if there are two of us and we yell loud enough, Hans  
>>will hear us eventually :-)
>>    
>>
not with headphones, which i normally wear when i'm in that kind of 
debugging mode -)

>
>I'm with you :))
>  
>
so, what was the test file?

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-09 13:11     ` Index Hans Hagen
@ 2005-11-09 14:14       ` Thomas A. Schmitz
  2005-11-09 15:53         ` Index Hans Hagen
  2005-11-09 16:07         ` Index Hans Hagen
  0 siblings, 2 replies; 20+ messages in thread
From: Thomas A. Schmitz @ 2005-11-09 14:14 UTC (permalink / raw)



On Nov 9, 2005, at 2:11 PM, Hans Hagen wrote:

> not with headphones, which i normally wear when i'm in that kind of  
> debugging mode -)

try a megaphone? ;-)

>
>>
>> I'm with you :))
>>
> so, what was the test file?
>
> Hans

Compile this with newtexexec:

\starttext

\index{This} This \index{and} and  \index{That} That.

\page

\placeindex

\stoptext

and This and That will be sorted under "h."

If you modify the file like so:

\starttext

\index{This} This \index{and} and  \seeindex{That}{This} That.

\page

\placeindex

\stoptext

it will give this error message:

! Argument of \@@filterlevelpart has an extra }.
<inserted text>
                 \par
<to be read again>
                    }
\doifprevlevelelse ...tor \@@filterlevelpart [#1]}
                                                   \edef  
\@@tocsectiontype {\...

\dosetpageregisterpage ...->\doifreglevelelse [#5]
                                                    
{\dodosetpageregisterpage ...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
0:0:0:0:0:0:0]
! Paragraph ended before \@@filterlevelpart was complete.
<to be read again>
                    \par
<to be read again>
                    }
\doifprevlevelelse ...tor \@@filterlevelpart [#1]}
                                                   \edef  
\@@tocsectiontype {\...

\dosetpageregisterpage ...->\doifreglevelelse [#5]
                                                    
{\dodosetpageregisterpage ...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

! Argument of \@@filterblockpart has an extra }.
<inserted text>
                 \par
<to be read again>
                    }
\doifprevlevelelse ...pe {\@@filterblockpart [#1]}
                                                   \ifcase  
\alltoclevels \ifn...

\dosetpageregisterpage ...->\doifreglevelelse [#5]
                                                    
{\dodosetpageregisterpage ...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
0:0:0:0:0:0:0]
! Paragraph ended before \@@filterblockpart was complete.
<to be read again>
                    \par
<to be read again>
                    }
\doifprevlevelelse ...pe {\@@filterblockpart [#1]}
                                                   \ifcase  
\alltoclevels \ifn...

\dosetpageregisterpage ...->\doifreglevelelse [#5]
                                                    
{\dodosetpageregisterpage ...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

! Argument of \@@filternumberpart has an extra }.
<inserted text>
                 \par
<to be read again>
                    }
\pageprefix ...stprefix {\@@filternumberpart [#2]}
                                                   \let  
\donexttrackcommando ...
<argument> ... {\??id \v!index }[2::0:0:0:0:0:0:0]
                                                   \translatednumber  
[2::0:0:...

\doregisterpagehowto ...??id #1\c!pagecommand }{#2
                                                   }\dostopattributes
<argument> ...erpage {\v!index }[2::0:0:0:0:0:0:0]
                                                   \ifnum 1=2\/\fi
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
0:0:0:0:0:0:0]
! Paragraph ended before \@@filternumberpart was complete.
<to be read again>
                    \par
<to be read again>
                    }
\pageprefix ...stprefix {\@@filternumberpart [#2]}
                                                   \let  
\donexttrackcommando ...
<argument> ... {\??id \v!index }[2::0:0:0:0:0:0:0]
                                                   \translatednumber  
[2::0:0:...

\doregisterpagehowto ...??id #1\c!pagecommand }{#2
                                                   }\dostopattributes
<argument> ...erpage {\v!index }[2::0:0:0:0:0:0:0]
                                                   \ifnum 1=2\/\fi
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
! Paragraph ended before \@@dofilterheadpart was complete.
<to be read again>
                    \par
\@@filterheadpart ... \@@dofilterheadpart \@EA [#1
                                                   :0]
<argument> ...ix {\@@filterheadpart [\postprefix ]
                                                   }\edef \postprefix  
{\@@fil...

\firstoftwoarguments #1#2->#1

\donexttrackcommando #1->\dodopageprefix {#1}
                                              \donexttracklevel {#1}
\pageprefix ...\donexttrackcommando \firstsection
                                                   \egroup
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
! Paragraph ended before \@@dofiltertailpart was complete.
<to be read again>
                    \par
\@@filtertailpart ... \@@dofiltertailpart \@EA [#1
                                                   :0]
<argument> ...ix {\@@filtertailpart [\postprefix ]
                                                   }\let \uchar  
\normaluchar ...

\firstoftwoarguments #1#2->#1

\donexttrackcommando #1->\dodopageprefix {#1}
                                              \donexttracklevel {#1}
\pageprefix ...\donexttrackcommando \firstsection
                                                   \egroup
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
! Paragraph ended before \@@dofiltertailpart was complete.
<to be read again>
                    \par
\postprefix ->\par
                    :0]
\@@filtertailpart ... \@@dofiltertailpart \@EA [#1
                                                   :0]
<argument> ...ix {\@@filtertailpart [\postprefix ]
                                                   }\let \uchar  
\normaluchar
\secondoftwoarguments #1#2->#2

\donexttrackcommando #1->\dodopageprefix {#1}
                                              \donexttracklevel {#1}
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
! Paragraph ended before \@@dofiltertailpart was complete.
<to be read again>
                    \par
\postprefix ->\par
                    :0]:0]
\@@filtertailpart ... \@@dofiltertailpart \@EA [#1
                                                   :0]
<argument> ...ix {\@@filtertailpart [\postprefix ]
                                                   }\let \uchar  
\normaluchar
\secondoftwoarguments #1#2->#2

\donexttrackcommando #1->\dodopageprefix {#1}
                                              \donexttracklevel {#1}
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
! Paragraph ended before \@@dofiltertailpart was complete.
<to be read again>
                    \par
\postprefix ->\par
                    :0]:0]:0]
\@@filtertailpart ... \@@dofiltertailpart \@EA [#1
                                                   :0]
<argument> ...ix {\@@filtertailpart [\postprefix ]
                                                   }\let \uchar  
\normaluchar
\secondoftwoarguments #1#2->#2

\donexttrackcommando #1->\dodopageprefix {#1}
                                              \donexttracklevel {#1}
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
! Paragraph ended before \@@dofiltertailpart was complete.
<to be read again>
                    \par
\postprefix ->\par
                    :0]:0]:0]:0]
\@@filtertailpart ... \@@dofiltertailpart \@EA [#1
                                                   :0]
<argument> ...ix {\@@filtertailpart [\postprefix ]
                                                   }\let \uchar  
\normaluchar
\secondoftwoarguments #1#2->#2

\donexttrackcommando #1->\dodopageprefix {#1}
                                              \donexttracklevel {#1}
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
! Paragraph ended before \@@dofiltertailpart was complete.
<to be read again>
                    \par
\postprefix ->\par
                    :0]:0]:0]:0]:0]
\@@filtertailpart ... \@@dofiltertailpart \@EA [#1
                                                   :0]
<argument> ...ix {\@@filtertailpart [\postprefix ]
                                                   }\let \uchar  
\normaluchar
\secondoftwoarguments #1#2->#2

\donexttrackcommando #1->\dodopageprefix {#1}
                                              \donexttracklevel {#1}
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
! Paragraph ended before \@@dofiltertailpart was complete.
<to be read again>
                    \par
\postprefix ->\par
                    :0]:0]:0]:0]:0]:0]
\@@filtertailpart ... \@@dofiltertailpart \@EA [#1
                                                   :0]
<argument> ...ix {\@@filtertailpart [\postprefix ]
                                                   }\let \uchar  
\normaluchar
\secondoftwoarguments #1#2->#2

\donexttrackcommando #1->\dodopageprefix {#1}
                                              \donexttracklevel {#1}
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

! Argument of \@@filterpagepart has an extra }.
<inserted text>
                 \par
<to be read again>
                    }
\doregisterpagehowto ...?id #1\c!pagecommand }{#2}
                                                   \dostopattributes
<argument> ...erpage {\v!index }[2::0:0:0:0:0:0:0]
                                                   \ifnum 1=2\/\fi
\showlocation ...iacolor ]{#1\presetgoto }\else #1
                                                   \fi
<argument> ...}[2::0:0:0:0:0:0:0]\ifnum 1=2\/\fi }
                                                   }\gotonextinternal  
{\s!ind...
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}

Runaway argument?
0:0:0:0:0:0:0]
! Paragraph ended before \@@filterpagepart was complete.
<to be read again>
                    \par
<to be read again>
                    }
\doregisterpagehowto ...?id #1\c!pagecommand }{#2}
                                                   \dostopattributes
<argument> ...erpage {\v!index }[2::0:0:0:0:0:0:0]
                                                   \ifnum 1=2\/\fi
\showlocation ...iacolor ]{#1\presetgoto }\else #1
                                                   \fi
<argument> ...}[2::0:0:0:0:0:0:0]\ifnum 1=2\/\fi }
                                                   }\gotonextinternal  
{\s!ind...
...
l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{}


and have this in the index:


see This, :0]–

After that, the .tuo file will be messed up, you have to delete it to  
make the document compile again.

For  the bug with ranges:

\starttext

\index{This} This

\page

\startregister[index]{This}

and

\page

that

\page

again \stopregister[index]{This}

\page

\index{This} This \index{and} and  \seeindex{That}{This} That.

\page

\placeindex

\stoptext

Will only have This 2-4 in the index, the other pages are ignored.

All best, and thanks so much Hans

Thomas

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-09 14:14       ` Index Thomas A. Schmitz
@ 2005-11-09 15:53         ` Hans Hagen
  2005-11-09 16:07         ` Index Hans Hagen
  1 sibling, 0 replies; 20+ messages in thread
From: Hans Hagen @ 2005-11-09 15:53 UTC (permalink / raw)


Thomas A. Schmitz wrote:

>
> On Nov 9, 2005, at 2:11 PM, Hans Hagen wrote:
>
>> not with headphones, which i normally wear when i'm in that kind of  
>> debugging mode -)
>
>
> try a megaphone? ;-)
>
>>
>>>
>>> I'm with you :))
>>>
>> so, what was the test file?
>>
>> Hans
>
>
> Compile this with newtexexec:
>
> \starttext
>
> \index{This} This \index{and} and  \index{That} That.
>
> \page
>
> \placeindex
>
> \stoptext


can you play a bit with the following: (patch context/ruby/base/texutil.rb)

        def preset(shortcuts=[],expansions=[],reductions=[],divisions=[])
            # maybe we should move this to sort-def.tex
            'a'.upto('z') do |c| expander(c) ; division(c) end
            'A'.upto('Z') do |c| expander(c) ; division(c) end # ! ! ! ! 
! ! ! added ! ! ! ! ! ! ! !
            expander('1','b') ; expander('2','c') ; expander('3','e') ; 
expander('4','f')
            expander('5','g') ; expander('6','h') ; expander('7','i') ; 
expander('8','i')
            expander('9','j') ; expander('0','a') ; expander('-','-') ;
            # end potential move
            shortcuts.each  do |s| shortcut(s[0],s[1]) end
            expansions.each do |e| expander(e[0],e[1]) end
            reductions.each do |r| reducer(r[0],r[1]) end
            divisions.each  do |d| division(d[0],d[1]) end
        end

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-09 14:14       ` Index Thomas A. Schmitz
  2005-11-09 15:53         ` Index Hans Hagen
@ 2005-11-09 16:07         ` Hans Hagen
  2005-11-09 17:32           ` Index Thomas A.Schmitz
  1 sibling, 1 reply; 20+ messages in thread
From: Hans Hagen @ 2005-11-09 16:07 UTC (permalink / raw)


Thomas A. Schmitz wrote:

> If you modify the file like so:
>
> \starttext
>
> \index{This} This \index{and} and  \seeindex{That}{This} That.
>
> \page
>
> \placeindex
>
> \stoptext
>
> it will give this error message:


add the "copied = false " to:

                                handle << 
"\\registersee{#{entry.type}}{#{entry.pagehowto},#{entry.texthowto}}{#{entry.seetoo}}{#{entry.page}}\n" 
;
                                lastpage, lastrealpage = entry.page, 
entry.realpage
                                copied = false # no page !

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-09 16:07         ` Index Hans Hagen
@ 2005-11-09 17:32           ` Thomas A.Schmitz
  2005-11-09 18:48             ` Index Hans Hagen
  0 siblings, 1 reply; 20+ messages in thread
From: Thomas A.Schmitz @ 2005-11-09 17:32 UTC (permalink / raw)


Excellent! As far as I can see, this takes care of the seeindex bug  
and of the sorting bug. On the negative side: ranges make the new  
texutil.rb bomb out. Two down, one to go!!!

Thanks a lot, Hans!

Thomas


On Nov 9, 2005, at 5:07 PM, Hans Hagen wrote:

> Thomas A. Schmitz wrote:
>
>> If you modify the file like so:
>>
>> \starttext
>>
>> \index{This} This \index{and} and  \seeindex{That}{This} That.
>>
>> \page
>>
>> \placeindex
>>
>> \stoptext
>>
>> it will give this error message:
>
>
> add the "copied = false " to:
>
>                                handle << "\\registersee{# 
> {entry.type}}{#{entry.pagehowto},#{entry.texthowto}}{# 
> {entry.seetoo}}{#{entry.page}}\n" ;
>                                lastpage, lastrealpage = entry.page,  
> entry.realpage
>                                copied = false # no page !
>
> Hans
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-09 17:32           ` Index Thomas A.Schmitz
@ 2005-11-09 18:48             ` Hans Hagen
  2005-11-09 22:42               ` Index Thomas A. Schmitz
  0 siblings, 1 reply; 20+ messages in thread
From: Hans Hagen @ 2005-11-09 18:48 UTC (permalink / raw)


Thomas A.Schmitz wrote:

> Excellent! As far as I can see, this takes care of the seeindex bug  
> and of the sorting bug. On the negative side: ranges make the new  
> texutil.rb bomb out. Two down, one to go!!!

send me a test file -)

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-09 18:48             ` Index Hans Hagen
@ 2005-11-09 22:42               ` Thomas A. Schmitz
  2005-11-09 23:35                 ` Index Hans Hagen
  2005-11-10  8:33                 ` Index Gerben Wierda
  0 siblings, 2 replies; 20+ messages in thread
From: Thomas A. Schmitz @ 2005-11-09 22:42 UTC (permalink / raw)


Correction: I goofed up; after correcting the file, I get exactly  
what I expected. AFAICS, index generation now works flawlessly with  
newtexexec! Great, wonderful, kudos to you!

I'm happy again! Thanks Hans

best

Thomas

On Nov 9, 2005, at 7:48 PM, Hans Hagen wrote:

> send me a test file -)
>
> Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-09 22:42               ` Index Thomas A. Schmitz
@ 2005-11-09 23:35                 ` Hans Hagen
  2005-11-10  9:03                   ` Index Thomas A. Schmitz
  2005-11-10  8:33                 ` Index Gerben Wierda
  1 sibling, 1 reply; 20+ messages in thread
From: Hans Hagen @ 2005-11-09 23:35 UTC (permalink / raw)


Thomas A. Schmitz wrote:

> Correction: I goofed up; after correcting the file, I get exactly  
> what I expected. AFAICS, index generation now works flawlessly with  
> newtexexec! Great, wonderful, kudos to you!
>
> I'm happy again! Thanks Hans

well, thanks for testing newtexexec -)

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-09 22:42               ` Index Thomas A. Schmitz
  2005-11-09 23:35                 ` Index Hans Hagen
@ 2005-11-10  8:33                 ` Gerben Wierda
  2005-11-10  9:16                   ` Index Thomas A. Schmitz
  2005-11-10 10:37                   ` Index Hans Hagen
  1 sibling, 2 replies; 20+ messages in thread
From: Gerben Wierda @ 2005-11-10  8:33 UTC (permalink / raw)


> Correction: I goofed up; after correcting the file, I get exactly
> what I expected. AFAICS, index generation now works flawlessly with
> newtexexec! Great, wonderful, kudos to you!

Um, I just noticed. "newtexexec"? Has the command name changed? Please say
no. Because a command name change would mean that I have to redistribute
the binaries (where the command lives) and not just the context trees in
texmf.

G

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-09 23:35                 ` Index Hans Hagen
@ 2005-11-10  9:03                   ` Thomas A. Schmitz
  2005-11-10 12:58                     ` Index Hans Hagen
  0 siblings, 1 reply; 20+ messages in thread
From: Thomas A. Schmitz @ 2005-11-10  9:03 UTC (permalink / raw)


Alas, I spoke too soon... I tested again with a more complex document  
(the book project I'm working on), and I'm having problems again:  
page ranges still gobble up the other entries. If I insert a  
\seeindex command, the index is sorted according to page numbers  
instead of entries. The file is probably too big to send, but I can  
of course send logs, .tui or whatever might be useful...

Best

Thomas

On Nov 10, 2005, at 12:35 AM, Hans Hagen wrote:

> Thomas A. Schmitz wrote:
>
>> Correction: I goofed up; after correcting the file, I get exactly   
>> what I expected. AFAICS, index generation now works flawlessly  
>> with  newtexexec! Great, wonderful, kudos to you!
>>
>> I'm happy again! Thanks Hans
>
> well, thanks for testing newtexexec -)
>
> Hans
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-10  8:33                 ` Index Gerben Wierda
@ 2005-11-10  9:16                   ` Thomas A. Schmitz
  2005-11-10 12:59                     ` Index Hans Hagen
  2005-11-10 10:37                   ` Index Hans Hagen
  1 sibling, 1 reply; 20+ messages in thread
From: Thomas A. Schmitz @ 2005-11-10  9:16 UTC (permalink / raw)


Hans can give a more authoritative answer, of course, but as a  
provisional one: no, the command name hasn't changed, you don't need  
to worry. The way ConTeXt is organized is that the binary texexec  
(which resides in texmf/ARCH/bin/) is just a small shell-script, a  
stub, that calls the real script in turn. This has been texexec.pl  
(in texmf/scripts/context/perl/), but you can of course modify it so  
it runs another script. Hans has been toying with ruby lately, so we  
now have texmf/scripts/ruby/newtexexec.rb which, I suppose, will  
replace the "old" texexec in due time. But as you have seen, it's not  
yet quite ready for prime time, it's still missing a few features (I  
don't think it can post-process pdf-files yet) and has a few buglets...

So relax and vatch das blinkenlight!

All best

Thomas

On Nov 10, 2005, at 9:33 AM, Gerben Wierda wrote:

>> Correction: I goofed up; after correcting the file, I get exactly
>> what I expected. AFAICS, index generation now works flawlessly with
>> newtexexec! Great, wonderful, kudos to you!
>
> Um, I just noticed. "newtexexec"? Has the command name changed?  
> Please say
> no. Because a command name change would mean that I have to  
> redistribute
> the binaries (where the command lives) and not just the context  
> trees in
> texmf.
>
> G
>
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-10  8:33                 ` Index Gerben Wierda
  2005-11-10  9:16                   ` Index Thomas A. Schmitz
@ 2005-11-10 10:37                   ` Hans Hagen
  1 sibling, 0 replies; 20+ messages in thread
From: Hans Hagen @ 2005-11-10 10:37 UTC (permalink / raw)


Gerben Wierda wrote:

>>Correction: I goofed up; after correcting the file, I get exactly
>>what I expected. AFAICS, index generation now works flawlessly with
>>newtexexec! Great, wonderful, kudos to you!
>>    
>>
>
>Um, I just noticed. "newtexexec"? Has the command name changed? Please say
>no. Because a command name change would mean that I have to redistribute
>the binaries (where the command lives) and not just the context trees in
>texmf.
>  
>

no, for the moment stick to texexec

here, when i set TEXMFSTART_MODE=experimental I get newtexexec 
automatically; the idea is that the stub (sh sript) is as follows:

=== texexec =====

#!/bin/sh
texmfstart texexec $@

in that case texmfstart will locate the right script and do what is 
needed; no more hassle for distributers; basically only texmfstart needs 
to be copied to the bin path (texmfstart.rb -> texmfstart)  plus some 
stubs be made (i made that mechanism because of the occasional changes 
in the tree locations)

once newtexexec becomes texexec (the perl script will be replaced) i'll 
come back to it, so for the moment don't worry

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-10  9:03                   ` Index Thomas A. Schmitz
@ 2005-11-10 12:58                     ` Hans Hagen
  0 siblings, 0 replies; 20+ messages in thread
From: Hans Hagen @ 2005-11-10 12:58 UTC (permalink / raw)


Thomas A. Schmitz wrote:

> Alas, I spoke too soon... I tested again with a more complex document  
> (the book project I'm working on), and I'm having problems again:  
> page ranges still gobble up the other entries. If I insert a  
> \seeindex command, the index is sorted according to page numbers  
> instead of entries. The file is probably too big to send, but I can  
> of course send logs, .tui or whatever might be useful...

or make a dummy multipage doc with lots of entries

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-10  9:16                   ` Index Thomas A. Schmitz
@ 2005-11-10 12:59                     ` Hans Hagen
  2005-11-10 19:57                       ` Index Vit Zyka
  0 siblings, 1 reply; 20+ messages in thread
From: Hans Hagen @ 2005-11-10 12:59 UTC (permalink / raw)


Thomas A. Schmitz wrote:

> ... it's still missing a few features (I  don't think it can 
> post-process pdf-files yet) and has a few buglets...


it should at least i remember writing some code -)

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-10 12:59                     ` Index Hans Hagen
@ 2005-11-10 19:57                       ` Vit Zyka
  0 siblings, 0 replies; 20+ messages in thread
From: Vit Zyka @ 2005-11-10 19:57 UTC (permalink / raw)


Hans Hagen wrote:
> Thomas A. Schmitz wrote:
> 
>> ... it's still missing a few features (I  don't think it can 
>> post-process pdf-files yet) and has a few buglets...
> 
> 
> 
> it should at least i remember writing some code -)

Here is an old example:
------------------------------------
\defineregister[Name][Names]
\setupregister[Name][pagestyle=\it]
\setupregister[Name][bf][pagestyle=\bf]

\starttext
   Names:
   \Name[bf::]{Hans}
   \Name{Taco}
   \startregister[Name][bf::]{Patrick}

   \page[yes]
   \Name{Hans}
   \stopregister[Name][bf::]{Patrick}

   \page[yes]
   \Name{Patrick}
   \placeregister[Name]
\stoptext
--------------------------------------

Regrettably, I have now no time to install and check the new version of 
newtexexec.rb, so perhaps it is already done. Please, for quick check 
focus on 'Patrick' entry, it should have "1--2, 3" page numbers.

Or more complex example:
------------------------------------
\defineregister[Name][Names]
\setupregister[Name]
\setupregister[Name][bf][pagestyle=\bf]

\starttext
   Names:
   \Name{Patrick}
   \Name[bf::]{Hans}
   \Name{Taco}
   \startregister[Name][bf::]{Patrick}

   \page[yes]
   \Name{Patrick}

   \page[yes]
   \Name{Hans}
   \stopregister[Name][bf::]{Patrick}

   \placeregister[Name]
\stoptext
--------------------------------------

Possible variants:
1) Patrick 1, 2, {\bf 1--3}
2) Patrick {\bf 1--3}, 1, 2
3) Patrick 1--2, {\bf 1--3}
4) Patrick {\bf 1--3}, 1--2

in case of variants 1 v. 2 and 3 v. 4 I am not sure how the categories 
'empty_string' and "bf" are sorted. But it does not matter since user 
can set any category name.

variants 3, 4 should be set if some register option (coupling?) is set on

vit

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
  2005-11-14 13:13 ` Index Duncan Hothersall
@ 2005-11-14 14:22   ` Hans Hagen
  0 siblings, 0 replies; 20+ messages in thread
From: Hans Hagen @ 2005-11-14 14:22 UTC (permalink / raw)


Duncan Hothersall wrote:

>Hans, many thanks for the recent fixes on index sorting in the new ruby
>scripts. Can I offer another test file in which some errors still show
>up, in the hope that these too can be ironed out?
>
>The following shows two problems, culled from a much bigger project. It
>should be clear from the output what the problems are, but basically
>  
>

i'll send you a patch (your example code is part of the problem -)

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Index
       [not found] <20051110221209.7525512828@ronja.ntg.nl>
@ 2005-11-14 13:13 ` Duncan Hothersall
  2005-11-14 14:22   ` Index Hans Hagen
  0 siblings, 1 reply; 20+ messages in thread
From: Duncan Hothersall @ 2005-11-14 13:13 UTC (permalink / raw)


Hans, many thanks for the recent fixes on index sorting in the new ruby
scripts. Can I offer another test file in which some errors still show
up, in the hope that these too can be ironed out?

The following shows two problems, culled from a much bigger project. It
should be clear from the output what the problems are, but basically

1. there are three separate spans (\startregister...\stopregister pairs)
with the same term content ("these three separate spans coalesce") which
get coalesced into one strange a-b-c-d span, despite having been given
different sort keys (I added numbers to the end of the sort keys to
differentiate them).

2. there are three refs and a span all with the same term content
("these mixed refs and spans are in the wrong order"), and they get
sorted into the wrong order in the output (the span comes before the
refs, despite coming after in page order).

So in my output, my index page at the back has the following content:

these mixed refs and spans are in the
wrong order 1/12–1/13, 1/2, 1/10,
1/14
these three separate spans coalesce
1/1–1/2–1/5–1/7

whereas what I'd hope to see is:

these mixed refs and spans are in the
wrong order 1/2, 1/10, 1/12–1/13,
1/14
these three separate spans coalesce
1/1–1/2, 1/3–1/5, 1/6–1/7

Really hope you can hammer out these two bugs, it would really help me!

Thanks,

Duncan

----
\defineregister[Index][Indices]
\setupregister[Index][2,balance=no,distance=1em,partnumber=no,chapternumber=yes,pagestyle=,separator=/,indicator=no]

\starttext
\startbodymatter
\setuppagenumbering[state=start,alternative={singlesided,doublesided},
	location=bottom,way=bychapter,partnumber=no,
	chapternumber=yes,numberseparator={/}]

\chapter{Economic Concepts, Issues and Tools}
\input knuth\par {\bf ttssc span 1 starts}
\startregister[Index][these three separate spans coalesce1]{these three
separate spans coalesce}%
\dorecurse{4}{\input knuth\par} {\bf ttssc span 1 stops}
\stopregister[Index][these three separate spans coalesce1]%
\input knuth {\bf tmrasaitwo ref 1}
\Index[these mixed refs and spans are in the wrong order1]{these mixed
refs and spans are in the wrong order}%
\dorecurse{4}{\input knuth\par} {\bf ttssc span 2 starts}
\startregister[Index][these three separate spans coalesce2]{these three
separate spans coalesce}%
\dorecurse{8}{\input knuth\par} {\bf ttssc span 2 stops}
\stopregister[Index][these three separate spans coalesce2]%
\dorecurse{4}{\input knuth\par} {\bf ttssc span 3 starts}
\startregister[Index][these three separate spans coalesce3]{these three
separate spans coalesce}%
\dorecurse{5}{\input knuth\par} {\bf ttssc span 3 stops}
\stopregister[Index][these three separate spans coalesce3]%
\dorecurse{8}{\input knuth\par}
\input knuth {\bf tmrasaitwo ref 2}
\Index[these mixed refs and spans are in the wrong order2]{these mixed
refs and spans are in the wrong order}%
\dorecurse{8}{\input knuth\par} {\bf tmrasaitwo span 1 starts}
\startregister[Index][these mixed refs and spans are in the wrong
order3]{these mixed refs and spans are in the wrong order}%
\dorecurse{4}{\input knuth\par} {\bf tmrasaitwo span 1 stops}
\stopregister[Index][these mixed refs and spans are in the wrong order3]%
\dorecurse{4}{\input knuth\par}
\input knuth {\bf tmrasaitwo ref 3}
\Index[these mixed refs and spans are in the wrong order4]{these mixed
refs and spans are in the wrong order}%
\dorecurse{3}{\input knuth\par}
\stopbodymatter
\startbackmatter
\chapter{Index}
\setuppagenumbering[numberseparator=/]\placeIndex\page[yes]
\stopbackmatter
\stoptext

----

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2005-11-14 14:22 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-15 20:44 Index Olivier
2005-10-15 22:11 ` Index Thomas A. Schmitz
2005-10-15 23:07   ` Index Olivier
2005-11-09 13:11     ` Index Hans Hagen
2005-11-09 14:14       ` Index Thomas A. Schmitz
2005-11-09 15:53         ` Index Hans Hagen
2005-11-09 16:07         ` Index Hans Hagen
2005-11-09 17:32           ` Index Thomas A.Schmitz
2005-11-09 18:48             ` Index Hans Hagen
2005-11-09 22:42               ` Index Thomas A. Schmitz
2005-11-09 23:35                 ` Index Hans Hagen
2005-11-10  9:03                   ` Index Thomas A. Schmitz
2005-11-10 12:58                     ` Index Hans Hagen
2005-11-10  8:33                 ` Index Gerben Wierda
2005-11-10  9:16                   ` Index Thomas A. Schmitz
2005-11-10 12:59                     ` Index Hans Hagen
2005-11-10 19:57                       ` Index Vit Zyka
2005-11-10 10:37                   ` Index Hans Hagen
     [not found] <20051110221209.7525512828@ronja.ntg.nl>
2005-11-14 13:13 ` Index Duncan Hothersall
2005-11-14 14:22   ` Index 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).