Top | ![]() |
![]() |
![]() |
![]() |
The LatexilaSynctex class (a singleton) implements the support of SyncTeX between LaTeXila and the Evince PDF viewer. It is used to switch between the source file(s) and the PDF, at the same position in the document. It is called the forward search: source file -> PDF. And backward search: PDF -> source file.
D-Bus is used to communicate between LaTeXila and Evince. The implementation uses the asynchronous gdbus generated functions.
For the position, only the line is used, not the column. The column is a bit buggy.
void latexila_synctex_connect_evince_window (LatexilaSynctex *synctex
,const gchar *pdf_uri
);
Connects asynchronously the evince window for pdf_uri
. LaTeXila will then
listen the signals emitted by the evince window when the user wants to switch
from the PDF to the corresponding *.tex file.
void latexila_synctex_forward_search (LatexilaSynctex *synctex
,GtkTextBuffer *buffer
,GFile *buffer_location
,GFile *main_tex_file
);
Does a forward search, i.e. switch from the *.tex file to the PDF file at the
same position as the cursor position in buffer
.
synctex |
the LatexilaSynctex instance. |
|
buffer |
||
buffer_location |
the *.tex file of |
|
main_tex_file |
the main *.tex file of |
“backward-search”
signalvoid user_function (LatexilaSynctex *synctex, gchar *tex_uri, gint line, guint timestamp, gpointer user_data)
The ::backward-search signal is emitted to perform a backward search, i.e. switching from the PDF to the source *.tex file.
synctex |
the LatexilaSynctex instance. |
|
tex_uri |
the *.tex file URI. |
|
line |
the line to jump to. |
|
timestamp |
timestamp of the event. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last