0

I'm using Texmaker 4.4.1, and I want to be able to jump to pdf (Ctrl+RClick) from the tex script, and vice versa.

I tried to use the tips of -synctex=1 in the PDFLatex command, but it doesn't seem to work, nor does the tip here.

My PDFLatex command is

"C:/Program Files (x86)/MiKTeX 2.9/miktex/bin/pdflatex.exe" -interaction=nonstopmode -synctex=1 -shell-escape %.tex

Thank you!

5
  • 1
    (1) 4.5 is the latest version, (2) do you have spaces in files or folder names leading up to your tex file? This may confuse synctex (it shouldn't anymore). Plus to go grom tex to PDF it is CTRL+space (I think), Ctrl+R-click is from the PDF to the tex source
    – daleif
    Mar 8 '16 at 9:26
  • Thanks! I did check that there are no spaces, and it still doesn't work neither from the pdf to the tex, nor the other way around.
    – Amir Sagiv
    Mar 8 '16 at 10:10
  • Are yo using the Texmaker buit-in pdf viewer or some external pdf viewer like Adobe Acrobat, Foxit etc ?
    – AJN
    Mar 8 '16 at 12:17
  • 1
    @AmirSagiv I hope this answer helps you.
    – Diaa
    Sep 4 '16 at 17:21
  • @daleif You probably should post that as an answer. Had the same issue, noticed a special character ('ü') in the path and that was the trouble maker. Oct 26 '17 at 12:54
3

In Options->Confige TexMaker->Commands in Padflatex you should write pdflatex -synctex=1 -interaction=nonstopmode %.tex, or full path to pdflatex.exe. After compilation with .log, .aux and other files this .synctex.gz extra file is created. From the .synctex.gz it reads instructions how to connect buit-in Viewer with code. If you delete this file, close the Viewer and re-open it, program won't be able to jump to code lines.

1

The \input{} command breaks synctex functionality. One can make it work again if one turns the umbrella file that holds the \input{} command into a 'master-document', otherwise the tex --> pdf functionality only works for the master document, but not the for files that were attached via the \input{} command.

You can define a master-document under:

options>define current document as 'master-document' (ctrl+0)

The same behaviour holds for the \include{} command.

3
  • Thanks! How do I find the umbrella file that holds the input command?
    – Amir Sagiv
    Sep 5 at 23:38
  • It is the file that has \input or \include in it. Usually it also should have your preamble with the document class and the packages you use in it and also \begin{document} and \end{document} in it. A very very basic example would be something like this: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \begin{document} \input{A-folder-in-your-latex-folder/A-tex-File-in-this-folder} \include{A-folder-in-your-latex-folder/A-tex-File-in-this-folder} \end{document}
    – TexThilo
    Sep 7 at 18:59
  • You don't have to "find" it. You create it yourself with TeXMaker or any other texteditor. It is file that ends with .tex and for anybody who has not worked with \input or \include commands: They are not mandatory and not created automatically by TeXMaker. You as user decide if you want to use them in your document.
    – TexThilo
    Sep 7 at 19:14
0

This solved the problem for me:

@daleif [...] Had the same issue, noticed a special character ('ü') in the [file-] path and that was the trouble maker. – ruhig brauner Oct 26 '17 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.