Fix for Footnote Reference problem
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
Hi Mike, Mike Bird wrote:
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.
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. Best wishes, Taco
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
Hi Mike, Mike Bird wrote:
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.
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. 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. Greetings Taco
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
participants (2)
-
Mike Bird
-
Taco Hoekwater