qpdfview team mailing list archive
-
qpdfview team
-
Mailing list archive
-
Message #00551
[Question #250122]: Using SyncTex with geany and qpdfview
New question #250122 on qpdfview:
https://answers.launchpad.net/qpdfview/+question/250122
This is more an answer than a question. I couldn't find much out there on getting geany (http://geany.org) and qpdfview to work together using SyncTex, so I spent some time figuring it out. The problem is (or was) that the build commands you can set up in geany's build menu don't give you a line variable for you to pass on to your build (& view) commands. I created a pull request that fixes that:
https://github.com/geany/geany/pull/289
Now, to view the generated pdf in qpdfview at the spot corresponding to the current line in geany, I can use this as a build or execute command in geany:
qpdfview --unique %e.pdf#src:%f:%l:0
Or for a multifile latex project:
qpdfview --unique main.pdf#src:%f:%l:0
Where main.tex is the main file in the document hierarchy. Of course, for this to work, -synctex=1 has to be invoked when calling pdflatex so that the .synctex.gz file is generated. Here's my build command in geany:
pdflatex -synctex=1 --file-line-error "%f"
Or for a multifile latex project:
pdflatex -synctex=1 --file-line-error "main.tex"
Going in the other direction is simpler: just set this in qpdfview's "Source editor" setting:
geany %1:%2:%3
Now, double-clicking a spot in the pdf will pop open geany at the corresponding line in the source. Hooray!
--
You received this question notification because you are a member of
qpdfview, which is an answer contact for qpdfview.