Re: [dev-context] [Fwd: Re: Debian Context Font problems]

2007-02-07 Thread Mike Bird
On Wednesday 07 February 2007 10:27, Taco Hoekwater wrote:
 Did anybody send a bug report to the kpdf maintainers yet? This looks
 suspiciously like a bug (aka optimization) in kpdf.

xpdf -t1lib no test.pdf gives the same display errors as kpdf, so
kpdf is ruled out.

I'm out of my depth here but does this mean that lm math font
and the freetype rasterizer don't get along?

--Mike Bird
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


[dev-context] Debian Context Font problems

2007-02-06 Thread Mike Bird
Hi Norbert,

Here's a simple test case illustrative of the reason why I don't
use Debian Context packages 2007.01.23-1 and 2007.01.23-2.

\starttext
\S1
\blank[big]
\S2\crlf\S3
\stoptext

In 2007.01.12.2-1 this works fine but in later contexts the
section symbols are so tall that those for 2 and 3 overlap.

Here's the pdffont output for the PDF generated by 01.12:
name type emb sub uni object ID
  --- --- --- -
JWRWBM+LMRoman12-Regular Type 1   yes yes yes  7  0
BRHVGD+CMSY10Type 1   yes yes no  10  0

And here's the pdffont output for the PDF generated by 01.23:
name type emb sub uni object ID
  --- --- --- -
EXKOFC+LMRoman12-Regular Type 1   yes yes yes  7  0
JRTCBR+LMMathSymbols10-ItalicType 1   yes yes no  10  0

The section symbols look OK once they reach print preview but the
mess in the PDF viewer from section symbols and other characters
means that I have to keep using 2007.01.12.2-1 for now.

My lmodern is 1.00-3 and my pdftex is pdfetex 1.30.5-2.2 from
texlive-base-bin 2005.dfsg.2-10.

Is this something you can reproduce or something I've messed up
in my configuration?

Thanks,

--Mike Bird
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] Debian Context Font problems

2007-02-06 Thread Mike Bird
Hi Norbert,

Thank you for responding so quickly and helpfully.  I've appended
a diff between your log and mine.  There are minor differences in
memory usage and yours has \write18 enabled. and mine does not.
I don't know the significance of that.  We're also picking up our
cont-sys.rme from dfferent places, which seems strange when we're
both using Debian packages.

I've attached a png showing the bad section symbols.

--Mike Bird

1c1
 This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5) (format=cont-en 
2007.2.5)  6 FEB 2007 23:41
---
 This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5) (format=cont-en 
2007.2.6)  6 FEB 2007 15:15
3d2
 \write18 enabled.
8c7
 ConTeXt  ver: 2007.01.23 13:32 MKII  fmt: 2007.2.5  int: english/english
---
 ConTeXt  ver: 2007.01.23 13:32 MKII  fmt: 2007.2.6  int: english/english
25c24
 (/etc/texmf/tex/context/user/cont-sys.rme
---
 (/usr/share/texmf/tex/context/user/cont-sys.rme
65c64
 systems : system commands are enabled
---
 systems : system commands are disabled
100c99
  20214 string characters out of 550282
---
  20232 string characters out of 550282
103c102
  75031 words of font info for 37 fonts, out of 50 for 2000
---
  75031 words of font info for 37 fonts, out of 200 for 2000


test.png
Description: PNG image
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] Debian Context Font problems

2007-02-06 Thread Mike Bird
On Tuesday 06 February 2007 15:37, Norbert Preining wrote:
 This is *really* strange. The only differences are the \write18 and the
 cont-sys.rme. I have removed the cont-sys.rme in /etc so that it picks
 the one in /u/share/texmf/... and still cannot repeat this problem.

 Is the diff you appended the *FULL* diff

Yes.

 Can you please send me the defective pdf file AND the log file, and make
 sure that you are running the current context installation.

Please find both attached, and also the test.tex.

 b83544c506921438246ff26625569db9
 /usr/share/texmf/fonts/enc/dvips/lm/lm-mathsy.enc
 001ebb0d6fff5e26f23f883f4a6ae185
 /usr/share/texmf/fonts/type1/public/lm/lmsy10.pfb
 80b1519b15bbbdcd055868786959b3bc
 /usr/share/texmf/fonts/enc/dvips/lm/lm-ec.enc
 4905f240aafb4857b3a5389baeaff681
 /usr/share/texmf/fonts/type1/public/lm/lmr12.pfb

Same here:

b83544c506921438246ff26625569db9  
/usr/share/texmf/fonts/enc/dvips/lm/lm-mathsy.enc
001ebb0d6fff5e26f23f883f4a6ae185  
/usr/share/texmf/fonts/type1/public/lm/lmsy10.pfb
80b1519b15bbbdcd055868786959b3bc  /usr/share/texmf/fonts/enc/dvips/lm/lm-ec.enc
4905f240aafb4857b3a5389baeaff681  
/usr/share/texmf/fonts/type1/public/lm/lmr12.pfb

BTW, I'm viewing test.pdf (as I always have) in a Konqueror tab.  It looks the
same in kpdf.  I don't currently have xpdf or acroread installed.

--Mike Bird
This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5) (format=cont-en 2007.2.6)  6 FEB 2007 15:15
entering extended mode
 (/usr/share/texmf/web2c/natural.tcx)
**test.tex emergencyend
(./test.tex

ConTeXt  ver: 2007.01.23 13:32 MKII  fmt: 2007.2.6  int: english/english

language: language en is active
system  : cont-new loaded
(/usr/share/texmf/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
\boislevel=\count212
(/usr/share/texmf/tex/context/base/cont-new.mkii))
system  : cont-old loaded
(/usr/share/texmf/tex/context/base/cont-old.tex
loading : Context Old Macros
)
system  : cont-fil loaded
(/usr/share/texmf/tex/context/base/cont-fil.tex
loading : Context File Synonyms
)
system  : cont-sys.rme loaded
(/usr/share/texmf/tex/context/user/cont-sys.rme
(/usr/share/texmf/tex/context/base/type-exa.tex)
(/usr/share/texmf/tex/context/base/type-syn.tex)
(/usr/share/texmf/tex/context/base/type-enc.tex)
(/usr/share/texmf/tex/context/base/type-siz.tex)
(/usr/share/texmf/tex/context/base/type-map.tex)
(/usr/share/texmf/tex/context/base/type-spe.tex)
(/usr/share/texmf/tex/context/base/type-akb.tex))
bodyfont: 12pt rm is loaded
language: patterns en-ec:ec-1-2:3 uk-ec:ec-2-2:3 de-texnansi:tex
nansi-3-2:3 de-ec:ec-4-2:3 fr-texnansi:texnansi-5-2:3 fr-ec:ec-6-2:3
 es-ec:ec-7-2:3 pt-texnansi:texnansi-8-2:3 pt-ec:ec-9-2:3 it-texnansi
:texnansi-10-2:3 it-ec:ec-11-2:3 nl-texnansi:texnansi-12-2:3 nl-ec:ec-
13-2:3 cz-il2:il2-14-2:3 cz-ec:ec-15-2:3 sk-il2:il2-16-2:3 sk-ec:ec
-17-2:3 pl-pl0:pl0-18-2:3 pl-ec:ec-19-2:3 pl-qx:qx-20-2:3 loaded
specials: tex,postscript,rokicki loaded
\openout3 = `test.tui'.

system  : test.top loaded
(./test.top
specials: loading definition file tpd
(/usr/share/texmf/tex/context/base/spec-tpd.tex
specials: loading definition file fdf
(/usr/share/texmf/tex/context/base/spec-fdf.tex
\everygoto=\toks326
\PDFsymbolbox=\box157
\everyPDFxform=\toks327

(/usr/share/texmf/tex/context/base/spec-fdf.mkii))
specials: fdf loaded
\everyPDFximage=\toks328
\PDFcurrenttransparency=\count213
)
specials: fdf,tpd loaded
)
\openout0 = `test-mpgraph.mp'.

\openout0 = `mpgraph.mp'.


systems : system commands are disabled
(./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo)
(./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo)
(/usr/share/texmf/tex/context/base/sort-def.tex)
(/usr/share/texmf/tex/context/base/sort-lan.tex) (./test.tuo) (./test.tuo)
systems : begin file test at line 1
fonts   : resetting map file list
fonts   : using map file: texnansi-public-lm
fonts   : using map file: original-base
fonts   : using map file: ec-public-lm
fonts   : using map file: ec-base
fonts   : using map file: lm-ec
fonts   : using map file: lm-math
fonts   : using map file: 8r-base
fonts   : using map file: t5-base
fonts   : using map file: original-ams-base
fonts   : using map file: original-ams-euler
fonts   : using map file: original-public-lm
(/usr/share/texmf/tex/context/base/pdfr-ec.tex) [1.1{/usr/share/texmf/fonts/map
/pdftex/context/original-empty.map}{/usr/share/texmf/fonts/map/pdftex/context/t
exnansi-public-lm.map}{/usr/share/texmf/fonts/map/pdftex/context/original-base.
map}{/usr/share/texmf/fonts/map/pdftex/context/ec-public-lm.map}{/usr/share/tex
mf/fonts/map/pdftex/context/ec-base.map}{/usr/share/texmf/fonts/map/dvips/lm/lm
-ec.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share

Re: [dev-context] Debian Context Font problems

2007-02-06 Thread Mike Bird
Hi Norbert,

On Tuesday 06 February 2007 16:01, Mike Bird wrote:
 BTW, I'm viewing test.pdf (as I always have) in a Konqueror tab.  It looks
 the same in kpdf.  I don't currently have xpdf or acroread installed.

I now had xpdf installed.  test.pdf looks OK in xpdf, looks bad in xpdf,
and neither reports any errors when run from the command prompt.

I have no idea where to look now!

--Mike Bird
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] Debian Context Font problems

2007-02-06 Thread Mike Bird
On Tuesday 06 February 2007 16:26, Mike Bird wrote:
 On Tuesday 06 February 2007 16:01, Mike Bird wrote:
  BTW, I'm viewing test.pdf (as I always have) in a Konqueror tab.  It
  looks the same in kpdf.  I don't currently have xpdf or acroread
  installed.

 I now had xpdf installed.  test.pdf looks OK in xpdf, looks bad in xpdf,

Correction: looks OK in xpdf, looks bad in kpdf.

 and neither reports any errors when run from the command prompt.

 I have no idea where to look now!
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] Debian Context Font problems

2007-02-06 Thread Mike Bird
On Tuesday 06 February 2007 18:46, Sanjoy Mahajan wrote:
 I just tried it on a nearby Mac OS 10.3 machine with its built-in
 Preview viewer.  Preview complains that it cannot recognize the file
 format!  As a check, I tried a bunch of other ConTeXt-produced
 documents, including a 100-page math book, and Preview had no problem
 with them.

 So now I lean toward the PDF file as the problem, not kpdf.  Anyway,
 why are kpdf and xpdf giving different views?  Isn't kpdf based on the
 xpdf rendering code?


On Tuesday 06 February 2007 19:52, Atsuhito Kohda wrote:
 I'm completely new to context but as far as I tested,
 changing zoom factor to 100% and/or 200% seems ok (and
 125% and 150% looks bad?).

 Isn't this true for all of you?

Confirmed.

I still don't know what or where the bug is but I think
we're narrowing down the possibilities.  Thank you all.

--Mike Bird
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] Fix for Footnote Reference problem

2007-01-25 Thread Mike Bird
On Thursday 25 January 2007 00:35, Taco Hoekwater wrote:
 Hans and I have been looking at your patch, but unfortunately it
 can not be incorporated in the distribution as-is. The problem is
 that some references need to be written inside the output routine,
 that being the only place were the actual page number is known.
 Think about references in floats, for example.

 The bit of code you have modified is unlikely to change soon, so
 you could probably keep using your local patches (or better:
 redefinitions of the macros within cont-loc.tex) without much
 problems.

I wonder whether it would be beneficial to include all of the patches
except the immediate write?  That would appear to solve most problems
except some cases of \somewhere to a reference on the same page.  Most
\somewhere's refer to distant references.  Fixing the off-by-one and
off-by-a-factor-of-two errors would help enormously.

Is there a way to make the immediate write conditional on not floating?

 Hans proposed that a definitive solution would be to always add
 position information to the references, but that will take a fair
 bit of work, so it is on a todo, but not quite now list.

Absolutely.

--Mike Bird
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] Fix for Footnote Reference problem

2007-01-21 Thread Mike Bird
Hi Taco,

On Saturday 20 January 2007 21:51, Mike Bird wrote:
 The only downside that I have noticed is that two column footnotes
 are now less well balanced.

This was caused by a typo.  I had accidently removed the newline
after '% experiment' which had the effect or disabling the
'\penalty\notepenalty' on the next line.

On Sunday 21 January 2007 01:53, Taco Hoekwater wrote:
 Do you happen to have these changes as a diff file or a patched
 core-not.tex, by any chance? I want to compare stuff, and either
 of those formats would be a bit easier on me.

Attached now is a diff against the original ConTeXt 2007-01-12
and with the afore-mentioned typo corrected.

--Mike Bird
--- /usr/share/texmf/tex/context/base/core-not.tex	2007-01-01 14:50:15.0 -0800
+++ core-not.tex	2007-01-21 10:30:30.0 -0800
@@ -677,7 +677,7 @@
   {\rawreference\s!fnt{\s!fnt:f:\internalfootreference}{}}
 
 \def\footnotereferenceto
-  {\global\advance\crossreferencenumber\minusone\relax % else problem, needs further testing
+  {%\global\advance\crossreferencenumber\minusone\relax % else problem, needs further testing
\rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}}
 
 \def\dostartnote% nog gobble als in pagebody
@@ -715,12 +715,12 @@
 {\gotobox{\noteparameter\c!command % was \c!numbercommand, but compatible
{\preparednumber\domovednote\v!nextpage\v!previouspage}}%
[\s!fnt:f:\internalfootreference]}%
-\fi
-\doifelse{\noteparameter\c!interaction}\v!no
-  {\ifconditional\pagewisenotes
- \footnotereferenceto
-   \fi}%
-  {\footnotereferenceto}}%
+\fi}%
+ \doifelse{\noteparameter\c!interaction}\v!no
+   {\ifconditional\pagewisenotes
+  \footnotereferenceto
+\fi}%
+   {\footnotereferenceto}%
  \bgroup
  \postponenotes
  \aftergroup\dostopnote
--- /usr/share/texmf/tex/context/base/core-ref.tex	2006-11-08 15:11:54.0 -0800
+++ core-ref.tex	2007-01-21 10:24:42.0 -0800
@@ -282,7 +282,7 @@
 %D references, later we will see for what purpose, we maintain
 %D a counter.
 
-\newcount\crossreferencenumber \crossreferencenumber=1
+\newcount\crossreferencenumber \crossreferencenumber=0
 
 \def\writereference#1#2#3#4%
   {\ifreferencing
@@ -317,7 +317,7 @@
 %{\writeutilitycommand
 %   {\mainreference{\referenceprefix}{\lastreference}{#4}{#5}{#6}}}%
 %  \dododowritereference
- \expanded{\writeutilitycommand{\noexpand\mainreference{\referenceprefix}{\lastreference}{#4}{#5}{#6}}}%
+ \expanded{\immediatewriteutilitycommand{\noexpand\mainreference{\referenceprefix}{\lastreference}{#4}{#5}{#6}}}%
\fi
\egroup}
 
@@ -620,10 +620,10 @@
  \fi
  \edef\currentrealreference{#3}%
  \settextreferences#4\end
- \ifnum0#5\crossreferencenumber
-   \forwardreferencetrue
- \else
+ \ifnum0#5\crossreferencenumber
\forwardreferencefalse
+ \else
+   \forwardreferencetrue
  \fi
\else
  \let \currentlocationreference\empty
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


[dev-context] Fix for Footnote Reference problem

2007-01-20 Thread Mike Bird
Here are a number of repaired functions (and one repaired variable)
which together fix the problem of footnote references getting out
of step between phases resulting in bogus results from \somewhere.

The repairs were made in ConTeXt 2007-01-12.  Each repaired function
is preceded by a comment explaining the reason for the repair.

The repaired functions are followed by a test which generates three
pages of output covering many test cases.

Additionally, I have tested these repairs on a 50 page document with
185 footnotes.  All of the \somewhere's were fixed by these repairs.

The only downside that I have noticed is that two column footnotes
are now less well balanced.  If anyone has any thoughts as to why
this might be happening or how to fix it please let me know.  I'm
just a few days from deadline!

Thanks,

--Mike Bird
\unprotect

% \footnotereferenceto in core-not.tex
% Remove the decrement which hides the problem within a page but breaks
% references in subsequent pages.

\def\footnotereferenceto
  {%\global\advance\crossreferencenumber\minusone\relax % else problem, needs further testing
   \rawreference\s!fnt{\s!fnt:t:\internalfootreference}{}}

% \dostartnote in core-note.tex
% The first thing after \startpushnote is expanded twice, which is not
% good when it generates two calls to \footnotereferenceto.

\def\dostartnote% nog gobble als in pagebody
  {\bgroup
   \settrue\processingnote
  %\restorecatcodes % to be tested first
   \iftypesettinglines % otherwise problems with \type crlf {xxx}
 \ignorelines % makes footnotes work in \startlines ... \stoplines
   \fi
   \ifnotesymbol
 \dolastnotesymbol
   \else
 \unskip\unskip
 \globallet\lastnotesymbol\dolastnotesymbol
   \fi
   \startlocalnoteinsert
 \doif{\noteparameter\c!scope}\v!page{\floatingpenalty\maxdimen}% experiment \penalty\notepenalty
 \forgetall
 \setnotebodyfont
 \redoconvertfont % to undo \undo calls in in headings etc
 \splittopskip\strutht  % not actually needed here
 \splitmaxdepth\strutdp % not actually needed here
 \leftmargindistance\noteparameter\c!margindistance
 \rightmargindistance\leftmargindistance
 \ifnum\noteparameter\c!n=\zerocount % no ifcase new 31-07-99 ; always ?
   \doifnotinset{\noteparameter\c!width}{\v!fit,\v!broad}\setnotehsize
 \fi
 \startpushnote
   {\ifx\lastnotenumber\empty \else
  \preparefullnumber{\??vn\currentnote}\lastnotenumber\preparednumber
  \doifelse{\noteparameter\c!interaction}\v!no
{\noteparameter\c!numbercommand
   {\preparednumber\domovednote\v!nextpage\v!previouspage}}%
{\gotobox{\noteparameter\c!command % was \c!numbercommand, but compatible
   {\preparednumber\domovednote\v!nextpage\v!previouspage}}%
   [\s!fnt:f:\internalfootreference]}%
\fi}%
 \doifelse{\noteparameter\c!interaction}\v!no
   {\ifconditional\pagewisenotes
  \footnotereferenceto
\fi}%
   {\footnotereferenceto}%
 \bgroup
 \postponenotes
 \aftergroup\dostopnote
 \begstrut
 \let\next}

% \dodowritereference in core-ref.tex
% Needs immediate write to prevent refs getting out of order

\def\dodowritereference#1#2#3\end#4#5#6%
  {\bgroup
   \global\advance\crossreferencenumber \plusone\relax
   \if#1-\if#2:%
 \let\referenceprefix\empty
 \xdef\lastreference{#3}%
   \else
 % \xdef\lastreference{#1#2#3}% here we loose the space
   \fi\else
 % \xdef\lastreference{#1#2#3}% here we loose the space
   \fi
   \ifx\lastreference\empty \else
 \doiffirstreferenceoccurance\lastreference
   {\thisisdestination{\referenceprefix\lastreference}}%
 \referenceinfo\lastreference
%  \edef\dododowritereference
%{\writeutilitycommand
%   {\mainreference{\referenceprefix}{\lastreference}{#4}{#5}{#6}}}%
%  \dododowritereference
 \expanded{\immediatewriteutilitycommand{\noexpand\mainreference{\referenceprefix}{\lastreference}{#4}{#5}{#6}}}%
   \fi
   \egroup}

% \crossreferencenumber in core-ref.tex
% Should be initalised to zero, not one.

\newcount\crossreferencenumber \crossreferencenumber=0

% \dogetreferenceelements in core-ref.tex
% Fix the case where we reference the current reference

\def\dogetreferenceelements#1#2#3#4#5%
  {\chardef\currentreferencetype=\ifx#1\relax0\else#1\fi\relax
   \ifnum\currentreferencetype\plustwo
 \edef\currentpagereference{#2}%
 \let \currentdatareference\empty
 \edef\currentlocationreference{#2}%
 \ifx\currentpagereference   \empty
   \let\currentfolioreference\folio
 \else
   \def \currentpagereference {\referencepagenumber[#2]}%
   \edef\currentfolioreference{\dosplitofffoliopart[#2]}%
 \fi
 \edef\currentrealreference{#3}%
 \settextreferences#4\end
 \ifnum0#5\crossreferencenumber
   \forwardreferencefalse
 \else
   \forwardreferencetrue
 \fi
   \else
 \let \currentlocationreference\empty

Re: [dev-context] Inconsistent Reference Counting

2006-12-31 Thread Mike Bird
I was mistaken about the duplicate references.  It is footnotes which
are interfering with the reference counters.

Test case:

\starttext
\chapter[A]{One}
\footnote{foot}
\somewhere{before}{after}[B]
\chapter[B]{Two}
\stoptext

Any thoughts on a solution?

Thanks, 

--Mike Bird
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


Re: [dev-context] Inconsistent Reference Counting

2006-12-31 Thread Mike Bird
FWIW:

Using \Footnote defined as below in a document with
about 70 footnotes seems to correct all the \somewhere
problems.

\def\Footnote#1%
{\global\advance\crossreferencenumber\minusone\relax%
 \footnote{#1}}

Presumably \footnote is indirectly calling
\dodowritereference although I haven't traced the
full invocation path yet.

--Mike Bird
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context


[dev-context] Register page number collapse patch

2006-11-14 Thread Mike Bird
Greetings,

Attached please find a small patch against the Nov 5th beta
which fixes a few bugs in register page number compression.

--Mike Bird
diff -Naur -x'*~' tex.original/context/base/core-reg.tex tex/context/base/core-reg.tex
--- tex.original/context/base/core-reg.tex	2006-10-26 01:28:15.0 -0700
+++ tex/context/base/core-reg.tex	2006-11-11 10:31:46.0 -0800
@@ -313,8 +313,6 @@
 \let\c!entryb=\relax
 \let\c!entryc=\relax
 
-\chardef\lastregisterpagestatus=0
-
 \def\limitedregisterentry#1#2%
   {\getvalue{\??id#1\c!textcommand}%
  {\doifelsenothing{\??id#1\c!maxwidth}
@@ -353,27 +351,15 @@
 \global\let\c!entryreference\relax}
 
 \def\dodosetpageregisterpageB#1#2#3#4#5#6%
-  {\global\let\lastseenregisterreal\currentseenregisterreal
-   \global\let\lastseenregisterpage\currentseenregisterpage
-   \xdef\currentseenregisterpage{#5}%
-   \xdef\currentseenregisterreal{#6}%
-   \let\placeregisterpageseparator\relax
-   \iffirstregisterpage
- \global\chardef\lastregisterpagestatus\zerocount
+  {\iffirstregisterpage
  \expandafter\hskip\getvalue{\??id#2\c!distance}\relax
- \donetrue
\else\ifnum#1=3
- |--|\relax % -- !
- \donetrue
-   \else\ifnum\lastregisterpagestatus=2
- \donefalse % waiting for to pagenumber
+ \strut|--|\relax % -- !
\else
  % \relax after space needed because | looks ahead
- \def\placeregisterpageseparator{\registerpageseparator|\space|\relax}%
- \donetrue
-   \fi\fi\fi
-   \ifdone
- \strut\placeregisterpageseparator
+ \strut\registerpageseparator|\space|\relax
+   \fi\fi
+   \iftrue % \iftrue ...\fi to preserve indentation, can be folded out
  \begingroup
  %
  \doifelsevalue{\??id#2\c!prefix}\v!none % default v!both
@@ -389,7 +375,7 @@
{\hbox{\doregisterpage{#2}[#5]\ifnum#1=2\/\fi}}%
  \endgroup
  \ignorespaces
- \global\chardef\lastregisterpagestatus#1\relax
+ \relax
\fi
\global\firstregisterpagefalse}
 
@@ -406,7 +392,6 @@
 \def\dodosetpageregisterpageC#1#2#3#4#5#6%
   {\xdef\currentseenregisterpage{#5}%
\xdef\currentseenregisterreal{#6}%
-   \gdef\flushseenregisterpage{\doflushseenregisterpage{#1}{#2}{#3}{#4}}%
\ifx\firstseenregisterreal\relax
  % no range yet
  \global\let\firstseenregisterreal\currentseenregisterreal
@@ -426,7 +411,8 @@
  \global\let\firstseenregisterpage\savedcurrentseenregisterpage
  \global\let\lastseenregisterreal \savedcurrentseenregisterreal
  \global\let\lastseenregisterpage \savedcurrentseenregisterpage
-   \fi\fi\fi}
+   \fi\fi\fi
+   \gdef\flushseenregisterpage{\doflushseenregisterpage{#1}{#2}{#3}{#4}}}
 
 \def\doflushseenregisterpage#1#2#3#4%
   {\global\let\flushseenregisterpage\relax
@@ -460,7 +446,7 @@
 %\dodosetpageregisterpageC{#1}{#2}{#3}{#4}{#5}{#6}}
 
 \def\dodosetpageregisterpagecollapsed#1#2#3#4#5#6%
-  {\iffirstregisterpage\flushseenregisterpage\fi
+  {\ifx\firstseenregisterreal\relax\flushseenregisterpage\fi
\dodosetpageregisterpageA{#1}{#2}{#3}{#4}{#5}{#6}%
\dodosetpageregisterpageC{#1}{#2}{#3}{#4}{#5}{#6}}
 
@@ -498,7 +484,6 @@
\global\let\c!entryc\relax
\global\let\c!entryletter\relax
\global\let\c!entryreference\relax
-   \global\chardef\lastregisterpagestatus\zerocount
 %   \global\firstregisterentrytrue
\global\firstregisterpagetrue}}
  {}}
@@ -633,7 +618,6 @@
\global\firstsubentrytrue
\global\firstsubsubentrytrue
\setregisterpage{#1}%
-   \chardef\lastregisterpagestatus\zerocount
\setvalue{#1\s!entrya}{\dosetpageregisterentrya {#1}}%
\setvalue{#1\s!entryb}{\dosetpageregisterentryb {#1}}%
\setvalue{#1\s!entryc}{\dosetpageregisterentryc {#1}}%
___
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context