0

I'm currently writing on a large document, using AucTeX, and pdf-tools as my pdf viewer.

Today, SyncTeX stopped working correctly. Forward search is fine, but backward search doesn't work. Whenever I double click somewhere on the pdf file, my cursor does not jump to the right position, but to some other location in my TeX source code, sometimes not even into the right subfile.

Anyone got an idea how to find the cause of this? I use AucTeX and compile using LuaLaTeX via Latexmk. First I thought maybe it's pdf-tools, but using Zathura as my viewer changes nothing. Maybe it has something to do with Emacs, because the expand-region package also behaves strangely in this file, but that could be totally unrelated.

In other documents, SyncTeX works fine.

Anyone got an idea? Thanks a lot!

EDIT:

Okay, the mess was caused by \usepackage{showframe}:

\documentclass[]{scrartcl}
\usepackage{showframe}
\begin{document}
Synctex works in the main file.
\input{Subfolder/subtest.tex}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

In this example, inverse search works normally for the main file, but does not work for the subfile. When showframe is commented out, everything works fine.

That has to be a bug in either the showframe package or AucTeX I think? I didn't yet try it with another editor.

  • Well synctex can fail - perhaps you found a bug. But without code to test and perhaps reproduce the behaviour it is not possible to say more. – Ulrike Fischer Jun 28 '18 at 15:47
  • How could I provide code for testing? Problem is the document is my half finished master thesis and I don't think I want to upload that somewhere. – Florian Jun 28 '18 at 15:52
  • take your thesis, create a copy. remove all textual input and replace it with \lipsum, reduce all chapters down to two or three with subsections, include some example images with \includegraphics[scale=0.5]{example-image-a}, include all used packages and possible constructs in your preamble. voila! MWE is created. – naphaneal Jun 28 '18 at 16:01

Your Answer

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

Browse other questions tagged or ask your own question.