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: Eli Zaretskii <eliz <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 73638 <at> debbugs.gnu.org, visuweshm <at> gmail.com
Subject: bug#73638: 31.0.50; doc-view: imenu index cannot be made for LaTeX PDFs
Date: Sun, 06 Oct 2024 08:42:01 +0300
> From: Tassilo Horn <tsdh <at> gnu.org>
> Cc: 73638 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> Date: Sat, 05 Oct 2024 21:56:24 +0200
> 
> Eli, the executive summary is this.  We already can read a PDFs outline
> mutool and use that for quick access to chapters and sections through
> imenu.  However, it turned out that it depends on the PDF at hand if the
> outline is usable for our purpose where "usable" means we get page
> references.  And it seems that many PDFs (e.g., those produced by LaTeX)
> have no page references but named references which won't do the trick
> for doc-view.
> 
> Visuwesh figured out that one can run a JS script using "mutool run
> <script> foo.pdf" for accessing the PDFs internal structure using the JS
> mupdf API and wrote the below simple script which spits out the outline
> with page references as sexp structure.
> 
> Would it be ok to distribute the below JS helper script with Emacs so
> that doc-view can use it?  If so, how?  Maybe the simplest way would be
> to just put it in some doc-view--mutool-outline-script variable and copy
> it to doc-view-cache-directory when invoking imenu on a PDF file the
> first time?

Can't we invoke the JS interpreter with this script as the command, or
invoke it as async subprocess and pipe the script to it via standard
input?




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.