← Back to team overview

qpdfview team mailing list archive

Re: SyncTeX support

 

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

After some more work, the "synctex" branch now supports inverse search
using SyncTeX as well. Synchronization is activated by double-clicking
the page.

For this to be really useful, you have to set two variables in
"~/.config/qpdfview/qpdfview.conf" in the "[documentView]" section:

highlightDuration=5000

This set the duration of the temporary highlights in microseconds,
e.g. the default 5000 are 5 seconds.

synchronizeProgram=gedit \"%1\" +%2:%3

This has not default and is the program that is called to synchronize
you editor of choice. In this string, %1 is replaced by the absolute
path of the TeX file, %2 is line number and %3 is the column number.
(Of course, you can just leave out %3 if you don't need it. SyncTeX
does not really support it yet anyway.)

Happy testing. Best regards, Adam.

P.S.: If the feedback is positive and this is included, all of this
will of course be documented and the settings be made available in the
setings dialog.

On 20.09.2012 14:12, Adam Reichold wrote:
> Hello everyone,
> 
> I just uploaded a branch of qpdfview that is called "synctex"
> because it implements SyncTeX support. (Well, actually only forward
> search for the momment.) You can get the code by doing: bzr branch
> lp:~adamreichold/qpdfview/synctex
> 
> It would be very helpful if some people find the time to test
> whether this works. (And whether disabling it works as well...)
> 
> The command-line syntax is qpdfview
> filePath#src:sourceName:sourceLine:sourceColumn which will try to
> jump to the page corresponding to line "sourceLine" and column
> "sourceColumn" in the TeX file "sourceName" and highlight its
> results. If you don't want to specify a line or column use 0. 
> (There is no documentation of this anywhere yet.)
> 
> So if you work on a TeX file called "foo.tex" which creates
> "foo.pdf" you can for example use
> 
> pdflatex -syntex=1 foo.tex qpdfview --unique foo.pdf & [...] edit
> something on line 15 [...] pdflatex -synctex=1 foo.tex qpdfview
> --unique foo.pdf#src:foo.tex:15:0
> 
> to jump to and highlight the results of line 15. (Or use your TeX 
> workflow of choice...)
> 
> SyncTeX support can be disabled by passing
> "CONFIG+=without_synctex" to "qmake". The SyncTeX version included
> in the source is 1.17 from TeXLive 2012.
> 
> Thanks for your help. Best regards, Adam.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBAgAGBQJQW1vRAAoJEPSSjE3STU34AG4IAKVC8s/F8xs4KjPb4icGVmDv
w28euPEgnsLqy24Tnfhs/zP8adpkZONz8Kz6dKc3q4Dztm2H4mp8ietVLFINyblu
GYIX567dbL/TyMRqJXl17wtIijTJ0aX9TDYv2rGoj841enxFq5+PXHfmpN1ZxAQ4
T1Us3ixdP6OhK/2/OtQmu77ITWnkWZf6tnp6ooHgCt8YPhCkbQIl1gjkxw6sPWeR
wlZ04algu74MQx8cBNeBmTXboV5Ep5pn+agk0KkQpZ+kkVZvsjmS1tgsc8bLUcf4
QQMwdYBkuon+sQEO9dAIgAO0bC/P3sQVCmR8B3HyDmvJFnF5ktmZBh4ZcmOOXNk=
=zil7
-----END PGP SIGNATURE-----


Follow ups

References