← Back to team overview

qpdfview team mailing list archive

Re: SyncTeX support

 

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

Thinks are coming together. The "synctex" branch now has the new
settings "highlight duration" and "source editor" to control the
SyncTeX behaviour. Also README, manual page and online help got updated.

Please report any issues you find. Best regards, Adam.

P.S.: This also means that the settings "synchronizeProgram" has been
renamed to "sourceEditor".

On 20.09.2012 20:09, Adam Reichold wrote:
> 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/

iQEcBAEBAgAGBQJQXAehAAoJEPSSjE3STU34aeUH/i9IaeGMX9fpV6enIOAn5uKi
ypzpZa5qO0FZ6NMjQLDGTNTKZLnch/09sUub+dChAYxiIGfR/meFzlvV1rQKCYvn
PcyBZiZinxRTMxAV+F1kKkl6FLF7xkxpbtKbGt9iVGIRsU24t+ZmD9ju4P7xeecW
E30qhpOTuU1USAGm7kZnDKd/NGEwJc0daZiHvM27U5RdJbBr87+KvBy9QDp8efVM
gJRgonyh1vNu71aRgllIn2kgwOtcbeqqYx6BgzHIfsGk0D0Gy4lDZNuvMXshgffN
EtBWc1FJ86sM4+NicQ2RRyhUdcxti91NOo5eOrkXVoag2lYXcXMAZGy61yARgKw=
=VQqh
-----END PGP SIGNATURE-----


Follow ups

References