13

I am compiling LaTeX files with Texmaker on Ubuntu 12.04 system.

When I run pdflatex and then view the pdf file (internal), it does not show me the exact place where I am editing on Texmaker i.e. the generated pdf file does not show me the position of the cursor.

But some days before it was working fine. I don't know what causes this problem.

I already tried uninstalling and then reinstalling, I did update and upgrade too. But the problem still persists.

doncherry
  • 54,637
Chand
  • 131

4 Answers4

12

Synchronization between source TeX files and the resulting dvi or pdf file is done with synctex support. You must add the -synctex=1 option to the pdflatex command to enable synctex and thereby generating fileName.synctex.gz file which stores the linkages between source and pdf. synctex does not like special characters, follow best practices for file names.

3

As Martin Schröder wrote:

synctex does not like special characters, follow best practices for file names.

But this is applicable even for all names of directories, in which the tex file is. I had the same problem. The synctex seemed to stop working. The problem was in a name of some directory containing diacritics in my native language. When this directory was renamed, everything worked as before.

unpix
  • 31
1

Martin Schröder's answer is quite correct. I solved the problem, not only by changing the name of the .tex file but also by changing the names of the folders it was in. The entire path to the .tex file must not contain any special characters.

For example :

False : D:\OneDrive - HESSO\HES - SO (Fribourg)\Résumés de cours\Démonstrations (Béton et milieux continus)

Right : D:\OneDrive - HESSO\HES - SO (Fribourg)\Resumes\Demonstration

I'm not sure if it's just the French accents éè, but as soon as I removed them, it worked right away.

0

This has most likely to do with your version of pdflatex.

Check it by opening up cmd (Windows start -> run -> cmd.exe) and type

pdflatex --version

If your version does not correspond to the version on http://miktex.org/, remove the old version of MiKTex from your computer and download and install the newest MikTex version to your computer.

Sunv
  • 111
  • 3