GNU bug report logs - #73638
31.0.50; doc-view: imenu index cannot be made for LaTeX PDFs

Previous Next

Package: emacs;

Reported by: Visuwesh <visuweshm <at> gmail.com>

Date: Sat, 5 Oct 2024 11:07:02 UTC

Severity: normal

Found in version 31.0.50

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Visuwesh <visuweshm <at> gmail.com>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 73638 <at> debbugs.gnu.org
Subject: bug#73638: 31.0.50; doc-view: imenu index cannot be made for LaTeX PDFs
Date: Tue, 08 Oct 2024 15:14:38 +0530
[Message part 1 (text/plain, inline)]
[திங்கள் அக்டோபர் 07, 2024] Tassilo Horn wrote:

> Visuwesh <visuweshm <at> gmail.com> writes:
>
>>> The patch looks good.  But during testing, it seems that the index is
>>> always off by one page, i.e., the index for some section brings me to
>>> page 117 but the section heading is actually on page 118.
>>>
>>> I have that both with the Peter Atkins et al. book you suggested as
>>> well as with own papers which didn't work at all previously due to
>>> #nameddest references.
>>
>> Ugghhh, looks like the page number returned by the JS function is
>> zero-indexed.  Thanks for the catch (and sorry for the many mistakes
>> and hence the back-and-forth).  Should be corrected in the attached
>> patch.
>
> Nope, now I get off-by-many-hundreds errors.  The Imenu entries have the
> page number in parens, right?  If so, I have many references to pages
> that are thrice as large as the actual number of pages, e.g., here some
> parts of the *Completions* buffer for the Atkins book:
>
> FOCUS.1.The.properties.of.gases.(341)
> FOCUS.10.Molecular.symmetry.(4181)
> FOCUS.11.Molecular.spectroscopy.(4481)
> FOCUS.12.Magnetic.resonance.(5181)
> FOCUS.13.Statistical.thermodynamics.(5621)
> FOCUS.14.Molecular.interactions.(6141)
> FOCUS.15.Solids.(6701)
> FOCUS.16.Molecules.in.motio.(7201)
> FOCUS.17.Chemical.kinetics.(7521)
> FOCUS.18.Reaction.dynamics.(8101)
> FOCUS.19.Processes.at.solid.surfaces.(8541)
>
> It's large but doesn't have more than 8000 pages.

I messed up by not considering the precedence of operators.  :-( Fixed
in the attached patch.

[0001-Make-imenu-index-generation-for-PDFs-more-reliable.patch (text/x-diff, attachment)]

This bug report was last modified 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.