← Back to team overview

qpdfview team mailing list archive

Re: SyncTeX support

 

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

Some unknown person forgot to actually add the SyncTeX parser source
to his Bazaar commit so that the code from Launchpad would not
compile... This is fixed now... :-\

On 21.09.2012 08:22, Adam Reichold wrote:
> 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/

iQEcBAEBAgAGBQJQXCG/AAoJEPSSjE3STU34UnMIAIQPE/yJi7A+uw1Gql+g22Z0
YOoCgRQTl48puxLjPemFpbHiihT0nzXEKSGLrBSQTj41as9Fwi/fjVcjP3YK9GIe
dXsct1HiWXdwF83OhupHSpEj/qjgeVrLAchsl7+paS1k8FRcogIjhzpeftdZQYMm
/rIfJ0rvPBvg+tJ94AeXPw3NnvoKhHmSVVCwHpLxIPyLDw+zUIh2LUdXTXzw1Ruz
ZVWZ0hRoA4WaOsHVGFvHopf3lCrmV2GDuAfqjySF0yTckRYEatTbs9r3HHRchdb0
DJOMETNLFAvfVWg36TXXc6i+iuSVpEnmoOHUtCT3nwnk1cuLT553YWZmOqDthTM=
=MZs8
-----END PGP SIGNATURE-----


Follow ups

References