emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Reverse lookup from pdf to org?


From: Nick Dokos
Subject: Re: [O] Reverse lookup from pdf to org?
Date: Tue, 25 Mar 2014 14:56:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Rainer M Krug <address@hidden> writes:

> Hi
>
> I am working on a longish document which will be converted to pdf, and I
> am doing debugging of scripts at the moment.
>
> Therefore I export the document to pdf, and look for errors there. Now I
> have to find the corresponding section in the org file - possible, but
> tedious.
>
> Would it be possibler to include reverse-lookup in org, so that I click
> in the pdf, and the cursor jumps to the position in the org document? I
> really like this feature when e.g. using LyX. 
>
> I have no idea how this could be implemented and if this would be
> difficult, but I think this could be a useful feature for longer documents.
>

One more (half-)possibility is as follows: produce the tex file and
compile it not with pdflatex, but with plain latex, producing a DVI
file. Passing the -src option to the latex invocation inserts "source
specials" into the DVI file that some DVI viewers (in particular, xdvi)
can interpret to jump back from the DVI view to the (approximate)
corresponding location in the tex file:

      latex --shell-escape -src foo.tex
      xdvi foo.dvi

C-<mouse1> at a location invokes your editor of choice (presumably
emacsclient) on the tex file and puts point in the general vicinity.

Invoking pdflatex with -src does not elicit any complaints, so it might
actually insert "source specials" in the PDF file, but even if it does I
don't know if any viewer is capable of interpreting them - xpdf does not
seem to be.

And it also leaves you in the tex file, not in the org file - hence
a half-possibility, or maybe even less.

Nick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]