Discussion:
[O] ox-latex and synctex
Ken Mankoff
2014-02-24 23:22:47 UTC
Permalink
I'm writing about a recent thread combining syntex with ox-latex.
Four posts on this are here:
https://lists.gnu.org/archive/html/emacs-orgmode/2013-10/msg00905.html
including an ox-synctex.el that implements PDF -> Org syncing.

I have bi-directional synctex working with LaTeX source, and would
like to get one direction PDF -> Org Source links working with Org
mode if possible as the above claims. Right now if I click on the
PDF the LaTeX exported version opens to the correct line, not the
Org source.

I'm using the latest version of Org (from ELPA, OS X) and I'm
wondering if anyone else has this setup working?

I'm using this test code:

#+BEGIN_SRC emacs-lisp
(load "~/.emacs.d/ox-synctex.el")
(setq org-latex-pdf-process
'("pdflatex -synctex=1 -interaction nonstopmode -output-directory %o %f"))
(ox-synctex-activate)
(org-latex-export-to-pdf)
#+END_SRC

And after exporting my *Messages* buffer contains:

ox-synctex: patching org-export-as return
ox-synctex: active during latex compile
ox-synctex: no concordance, not patching.
ox-synctex: done, hoorah!

However, when I look at the synctex.gz and compare it with that same
file produced from compiling the LaTeX source directly in emacs the
two are identical, which is why my pdf viewer/synctex is sending me
to the .tex exported file and not the original .org source file.

-k.
Aaron Ecay
2014-02-25 04:33:31 UTC
Permalink
I meant to send this reply to the list as well:

Hi Ken,

I originally wrote the ox-synctex code. I find that the code in your
example works for me only after re-evaluating the two functions that
ox-synctex advises (org-export-as and org-latex-compile). This must be
some oddity of how advice interacts with org’s code (probably having
something to do with byte compilation/autoloading). But I’ve never been
able to isolate a simple test case.

I don’t use ox-synctex on a daily basis myself: it’s too fiddly, as
you’ve seen.

--
Aaron Ecay

Loading...