Re: [O] Reverse lookup from pdf to org?
Suvayu Ali fatkasuvayu+li...@gmail.com writes: On Tue, Mar 25, 2014 at 11:07:54AM +0100, Rainer M Krug wrote: 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. I think this is only possible with synctex. See this thread: http://thread.gmane.org/gmane.emacs.orgmode/78111 Hope this helps, Yes - but is there any progress to get it working? The file is not included in the contrib directory. Rainer -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 pgp6dWmjnFV_Z.pgp Description: PGP signature
Re: [O] Reverse lookup from pdf to org?
On Thu, Mar 27, 2014 at 09:18:43AM +0100, Rainer M Krug wrote: Suvayu Ali fatkasuvayu+li...@gmail.com writes: On Tue, Mar 25, 2014 at 11:07:54AM +0100, Rainer M Krug wrote: 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. I think this is only possible with synctex. See this thread: http://thread.gmane.org/gmane.emacs.orgmode/78111 Hope this helps, Yes - but is there any progress to get it working? The file is not included in the contrib directory. In another thread Aaron says he does not use it regularly, and finds the solution too fiddly. I guess that would mean there has been no more progress on this. -- Suvayu Open source is the future. It sets us free.
Re: [O] Reverse lookup from pdf to org?
Suvayu Ali fatkasuvayu+li...@gmail.com writes: On Thu, Mar 27, 2014 at 09:18:43AM +0100, Rainer M Krug wrote: Suvayu Ali fatkasuvayu+li...@gmail.com writes: On Tue, Mar 25, 2014 at 11:07:54AM +0100, Rainer M Krug wrote: 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. I think this is only possible with synctex. See this thread: http://thread.gmane.org/gmane.emacs.orgmode/78111 Hope this helps, Yes - but is there any progress to get it working? The file is not included in the contrib directory. In another thread Aaron says he does not use it regularly, and finds the solution too fiddly. I guess that would mean there has been no more progress on this. Thanks a lot, Rainer -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 pgpSFvK1KSU0e.pgp Description: PGP signature
Re: [O] Reverse lookup from pdf to org?
Brett Viren b...@bnl.gov writes: Nick Dokos ndo...@gmail.com writes: 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 Okay, here is a crazy idea. Maybe one can use hyperref and place \url{} and/or \href{}{} macros in the org file. These will turn into clickable links in the final PDF. In them place URLs that look like: I like the idea of reverse links - could be a nice addition when enabled. file:///path/to/foo.tex.orglink?line=42 And then use .mailcap (or whatever MIME config that xpdf/evince/etc honors) to map the .orglink extension to a script that parses the URL (does that full URL get passed?) and invokes emacs to open foo.tex at line 42? But jumping to the .org file would be the aim - right? If that much can be made to work (big if!) I see one problem in that the /path/to will break if the source is moved. That would not be a problem, as this would primarily be a debugging / draft feature. Chance of success: 10% I guess higher? Rainer -Brett. -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 pgpyvwUuVgOP2.pgp Description: PGP signature
Re: [O] Reverse lookup from pdf to org?
Rainer M Krug rai...@krugs.de writes: Brett Viren b...@bnl.gov writes: file:///path/to/foo.tex.orglink?line=42 But jumping to the .org file would be the aim - right? Yes, right. Maybe a better example is: file://foo.orglink?line=42 which might get interpreted as go to line 42 in ./foo.org. This example is also a relative link which would be less brittle as long as foo.org and foo.pdf are kept together in the same directory. Chance of success: 10% I guess higher? I like your optimism! -Brett. pgpSS2ZCL501D.pgp Description: PGP signature
Re: [O] Reverse lookup from pdf to org?
Brett Viren b...@bnl.gov writes: Rainer M Krug rai...@krugs.de writes: Brett Viren b...@bnl.gov writes: file:///path/to/foo.tex.orglink?line=42 But jumping to the .org file would be the aim - right? Yes, right. Maybe a better example is: file://foo.orglink?line=42 calling , | emacs +42 foo.org ` should open the file foo.org and put the cursor in line 42. which might get interpreted as go to line 42 in ./foo.org. This example is also a relative link which would be less brittle as long as foo.org and foo.pdf are kept together in the same directory. Yes - that would be quite useful. Chance of success: 10% I guess higher? I like your optimism! I am an optimist :-) Cheers, Rainer -Brett. -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 smime.p7s Description: S/MIME cryptographic signature
Re: [O] Reverse lookup from pdf to org?
Rainer M Krug rai...@krugs.de writes: calling , | emacs +42 foo.org ` should open the file foo.org and put the cursor in line 42. In most cases, it would be better to use emacsclient, otherwise you might end up with many emacs instances; but more importantly perhaps, using emacsclient avoids the initialization delay. Nick
Re: [O] Reverse lookup from pdf to org?
Nick Dokos ndo...@gmail.com writes: Rainer M Krug rai...@krugs.de writes: calling , | emacs +42 foo.org ` should open the file foo.org and put the cursor in line 42. In most cases, it would be better to use emacsclient, otherwise you might end up with many emacs instances; but more importantly perhaps, using emacsclient avoids the initialization delay. True - this was just a proof of concept kind of snippet. Cheers, Rainer Nick -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 smime.p7s Description: S/MIME cryptographic signature
Re: [O] Reverse lookup from pdf to org?
Dnia 2014-03-27, o godz. 15:43:45 Rainer M Krug rai...@krugs.de napisaĆ(a): Brett Viren b...@bnl.gov writes: Rainer M Krug rai...@krugs.de writes: Brett Viren b...@bnl.gov writes: file:///path/to/foo.tex.orglink?line=42 But jumping to the .org file would be the aim - right? Yes, right. Maybe a better example is: file://foo.orglink?line=42 calling , | emacs +42 foo.org ` should open the file foo.org and put the cursor in line 42. which might get interpreted as go to line 42 in ./foo.org. This example is also a relative link which would be less brittle as long as foo.org and foo.pdf are kept together in the same directory. Yes - that would be quite useful. Chance of success: 10% I guess higher? I like your optimism! I am an optimist :-) You really are. Inserting stuff like this into the TeX file /may/ very easily break it, in the sense that it does compile, but /looks/ different (read: has different line and/or page breaks) than without it. (Though it /might/ be possible, I'm only saying that it would require much TeX expertise and being very careful. In fact, TeX4ht seems to do something similar (though I never used it), so maybe I'm too pessimistic;).) Cheers, Rainer Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
[O] Reverse lookup from pdf to org?
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. Cheers, Rainer -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 pgp_b9JVxeb9P.pgp Description: PGP signature
Re: [O] Reverse lookup from pdf to org?
On Tue, Mar 25, 2014 at 11:07:54AM +0100, Rainer M Krug wrote: 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. I think this is only possible with synctex. See this thread: http://thread.gmane.org/gmane.emacs.orgmode/78111 Hope this helps, -- Suvayu Open source is the future. It sets us free.
Re: [O] Reverse lookup from pdf to org?
Rainer M Krug rai...@krugs.de writes: 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. Not quite what you have in mind and maybe only a half-measure but when I produce draft latex documents I like to turn on this package: \usepackage[color]{showkeys} It prints the symbol used for labels, references and citations in light gray in the PDF output. I can then search for these in the tex to find the corresponding region. To the extent they are set in your .org source you might do similar. A little screen cap is attached to show an example output. -Brett. attachment: foo.png pgp1YsNo_YSNM.pgp Description: PGP signature
Re: [O] Reverse lookup from pdf to org?
Rainer M Krug rai...@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
Re: [O] Reverse lookup from pdf to org?
Nick Dokos ndo...@gmail.com writes: 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 Okay, here is a crazy idea. Maybe one can use hyperref and place \url{} and/or \href{}{} macros in the org file. These will turn into clickable links in the final PDF. In them place URLs that look like: file:///path/to/foo.tex.orglink?line=42 And then use .mailcap (or whatever MIME config that xpdf/evince/etc honors) to map the .orglink extension to a script that parses the URL (does that full URL get passed?) and invokes emacs to open foo.tex at line 42? If that much can be made to work (big if!) I see one problem in that the /path/to will break if the source is moved. Chance of success: 10% -Brett. pgpW9ggcB7moA.pgp Description: PGP signature