emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Reverse lookup from pdf to org?
Date: Tue, 25 Mar 2014 14:56:06 -0400	[thread overview]
Message-ID: <871txqgla1.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: m2ha6m381x.fsf@krugs.de

Rainer M Krug <Rainer@krugs.de> 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

  parent reply	other threads:[~2014-03-25 18:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25 10:07 Reverse lookup from pdf to org? Rainer M Krug
2014-03-25 13:11 ` Suvayu Ali
2014-03-27  8:18   ` Rainer M Krug
2014-03-27  8:59     ` Suvayu Ali
2014-03-27  9:04       ` Rainer M Krug
2014-03-25 17:17 ` Brett Viren
2014-03-25 18:56 ` Nick Dokos [this message]
2014-03-25 20:29   ` Brett Viren
2014-03-27  9:12     ` Rainer M Krug
2014-03-27 14:30       ` Brett Viren
2014-03-27 14:43         ` Rainer M Krug
2014-03-27 14:53           ` Nick Dokos
2014-03-27 15:00             ` Rainer M Krug
2014-03-28  4:49           ` Marcin Borkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871txqgla1.fsf@alphaville.bos.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).