I'm using synctex on a beamer presentation, and I'm having some trouble. Unlike this question, I can live with the fact that synctex will put me at the end of the current frame. However, for fragile frames, I end up in slides.vrb, which basically contains the last fragile frame of the presentation.
fragile frames without overlays are OK, as the fragile=singleslide option will make synctex find the appropriate line, but some of my fragile frames have several overlays. Is there something that can be done for them?
Update: As a matter of fact, the issue seems to only occurs when using listings. Here is a way to reproduce the problem (Note that it assumes that you have configured your pdf viewer, okular in my case, to be able to perform an inverse search to your editor, emacs in my case).
Consider the following slide.tex file:
\documentclass{beamer}
\usepackage{listings}
\begin{document}
\begin{frame}[fragile]{title}
\begin{lstlisting}
foo
\end{lstlisting}
bar
\lstinline|bla|
\end{frame}
\end{document}
- Compile it with
synctexenabled:pdflatex -synctex=1 slide.tex - open
slide.pdfwith asynctex-aware viewer:okular slide.pdf - perform an inverse search (shift+click in
okular) onbar: it should move the cursor of your editor at the end of the frame as expected. - perform an inverse search on
foo, which is in anlstlistingenvironment: it should open the auxiliaryslide.vrbfile in your editor and point you there instead ofslide.tex. - The same issue occurs with
\lstinline|bla|: if you shift+click onbla, it opensslide.vrb.
\documentclass{...}and ending with\end{document}. – samcarter_is_at_topanswers.xyz Nov 22 '16 at 00:51synctex,beamerandfragilewere not the only needed ingredients to the issue and that you had to throw inlistingsas well. Thus thank you for forcing me to be a bit more rigorous in my description. – Virgile Nov 22 '16 at 08:12fragileframe, the file\jobname.vrbis used. So that's the one which is opened, but of course it changes every timefragileis found. – egreg Nov 22 '16 at 11:47listingsis doing something strange: I get a mysterious “Successfully formatted [0] pages” with the OP's example. Overlays clearly are out of the question, as it's impossible to keep track of the multiple\input{\jobname.vrb}. – egreg Mar 12 '17 at 14:25