emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* synctex!! ...syncorg?
@ 2010-08-31 10:10 Kevin Brubeck Unhammer
  2010-08-31 10:18 ` Rainer M Krug
  2010-09-02 14:35 ` Bastien
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Brubeck Unhammer @ 2010-08-31 10:10 UTC (permalink / raw)
  To: org-mode Mailinglist

Hi,

I just discovered synctex, which lets you shift-click a point in a pdf
in Okular and find yourself back in the tex-file at the point that
corresponds with that point in the pdf =D

But now the obvious question is: does there exist a "syncorg" to
transport me back into the org-mode file to the point that corresponds
to that place in the tex-file? I assume it should be possible since
org-mode outputs these \label{sec-3.3} things...

best regards,
Kevin Brubeck Unhammer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: synctex!! ...syncorg?
  2010-08-31 10:10 synctex!! ...syncorg? Kevin Brubeck Unhammer
@ 2010-08-31 10:18 ` Rainer M Krug
  2010-08-31 14:30   ` Kevin Brubeck Unhammer
  2010-09-02 14:35 ` Bastien
  1 sibling, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2010-08-31 10:18 UTC (permalink / raw)
  To: Kevin Brubeck Unhammer; +Cc: org-mode Mailinglist

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 31/08/10 12:10, Kevin Brubeck Unhammer wrote:
> Hi,
> 
> I just discovered synctex, which lets you shift-click a point in a pdf
> in Okular and find yourself back in the tex-file at the point that
> corresponds with that point in the pdf =D

Now on Linux? That's great. I only knew that it worked on a mac. Could
you (possibly off list?) provide some details (where I can find it (I am
using Ubuntu), how I can use it, ...)

Rainer

> 
> But now the obvious question is: does there exist a "syncorg" to
> transport me back into the org-mode file to the point that corresponds
> to that place in the tex-file? I assume it should be possible since
> org-mode outputs these \label{sec-3.3} things...
> 
> best regards,
> Kevin Brubeck Unhammer
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:        +33 - (0)9 53 10 27 44
Cell:       +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx81t8ACgkQoYgNqgF2egodPwCeK/oEB6CTiLyPEnA6ZL4nuzzh
vjMAn3x7g2pxPeAje2A5NzgDc0Hvsavf
=ai2u
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: synctex!! ...syncorg?
  2010-08-31 10:18 ` Rainer M Krug
@ 2010-08-31 14:30   ` Kevin Brubeck Unhammer
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Brubeck Unhammer @ 2010-08-31 14:30 UTC (permalink / raw)
  To: R.M.Krug; +Cc: org-mode Mailinglist

2010/8/31 Rainer M Krug <r.m.krug@gmail.com>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 31/08/10 12:10, Kevin Brubeck Unhammer wrote:
>> Hi,
>>
>> I just discovered synctex, which lets you shift-click a point in a pdf
>> in Okular and find yourself back in the tex-file at the point that
>> corresponds with that point in the pdf =D
>
> Now on Linux? That's great. I only knew that it worked on a mac. Could
> you (possibly off list?) provide some details (where I can find it (I am
> using Ubuntu), how I can use it, ...)

As I got several off-list questions about where to get synctex on
GNU/Linux, I might as well reply on-list ;-)

I'm running Arch Linux with TeX Live 2009.16776, and the only thing I
had to do to get synctex working was run pdflatex like this:

	pdflatex -synctex=1 foo.tex

You should also get the same effect by adding

        \synctex=1

to the preamble, or something like

        #+LaTeX_HEADER: \synctex=1

in your org-mode file. As for Ubuntu, if the TeX Live distribution
there is up-to-date (synctex was added in TeX Live 2008), I believe it
should work without any configuration necessary.

Note: if you were previously using the "pdfsync" package, you may have
to remove it from the preamble, also there was talk on the Ling-TeX
list of some programs not being able to handle file names with spaces
in them.


best regards,
Kevin Brubeck Unhammer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: synctex!! ...syncorg?
  2010-08-31 10:10 synctex!! ...syncorg? Kevin Brubeck Unhammer
  2010-08-31 10:18 ` Rainer M Krug
@ 2010-09-02 14:35 ` Bastien
  2010-09-02 19:50   ` Kevin Brubeck Unhammer
  1 sibling, 1 reply; 5+ messages in thread
From: Bastien @ 2010-09-02 14:35 UTC (permalink / raw)
  To: Kevin Brubeck Unhammer; +Cc: org-mode Mailinglist

Kevin Brubeck Unhammer <p.ixiemotion@gmail.com> writes:

> But now the obvious question is: does there exist a "syncorg" to
> transport me back into the org-mode file to the point that corresponds
> to that place in the tex-file? I assume it should be possible since
> org-mode outputs these \label{sec-3.3} things...

Very dumb and stupid proof-of-nothing:

(defun bzg/search-point-in-latex-source ()
  "Switch to an Org's sister LaTeX file and find text at point."
  (interactive)
  (let ((txt (buffer-substring 
	      (point) (save-excursion (forward-word 3) (point))))
	(lfn (concat (file-name-sans-extension (buffer-file-name)) ".tex")))
    (find-file-other-window lfn)
    (goto-char (point-min))
    (search-forward txt)))

But using isearch might be fast enough, isn't it?

After all, it's just text.  

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: synctex!! ...syncorg?
  2010-09-02 14:35 ` Bastien
@ 2010-09-02 19:50   ` Kevin Brubeck Unhammer
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Brubeck Unhammer @ 2010-09-02 19:50 UTC (permalink / raw)
  To: Bastien; +Cc: org-mode Mailinglist

2010/9/2 Bastien <bastien.guerry@wikimedia.fr>:
> Kevin Brubeck Unhammer <p.ixiemotion@gmail.com> writes:
>
>> But now the obvious question is: does there exist a "syncorg" to
>> transport me back into the org-mode file to the point that corresponds
>> to that place in the tex-file? I assume it should be possible since
>> org-mode outputs these \label{sec-3.3} things...
>
> Very dumb and stupid proof-of-nothing:
>
> (defun bzg/search-point-in-latex-source ()
>  "Switch to an Org's sister LaTeX file and find text at point."
>  (interactive)
>  (let ((txt (buffer-substring
>              (point) (save-excursion (forward-word 3) (point))))
>        (lfn (concat (file-name-sans-extension (buffer-file-name)) ".tex")))
>    (find-file-other-window lfn)
>    (goto-char (point-min))
>    (search-forward txt)))
>
> But using isearch might be fast enough, isn't it?
>
> After all, it's just text.

Yeah... I guess for anything truly robust, the exported tex-file would
have to be peppered with comments (alternatively output another file
with line-number correspondences).

best regards,
Kevin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-02 19:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-31 10:10 synctex!! ...syncorg? Kevin Brubeck Unhammer
2010-08-31 10:18 ` Rainer M Krug
2010-08-31 14:30   ` Kevin Brubeck Unhammer
2010-09-02 14:35 ` Bastien
2010-09-02 19:50   ` Kevin Brubeck Unhammer

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).