inverse synctex not working / SyncTeX ERROR: SyncTeX Error: Bad preamble

Hi all,
I regularly using Sweave for report generation inside RStudio (Tiger Daylily) with R 4.0.5, TexLive 2015, SumatraPDF on Win7 (migration to Win10, didn't change anything).
Unfortunately the synctex feature is not working properly.

A simple .Rnw file as
\documentclass{article}

\usepackage{Sweave}
\begin{document}
\SweaveOpts{concordance=TRUE}

test 1

\newpage

test 2

\end{document}

does compile (using Compile PDF button in RStudio), but syncing does not properly work:

  • compiling the pdf, all necessary files are available: .log, .pdf, .tex, -concordance.tex, .synctex.gz, but
  • R-console shows: SyncTeX ERROR: SyncTeX Error: Bad preamble (only on 32bit-R)
  • in 32bit-R the pdf does not show up automatically
  • in 32bit-R sync-pdf button only appears only if the file is touched again (typing, delete, comment, uncomment,...) and only THEN the following is TRUE (before, syncing does not work, on 32bit-R pdf does not even show up although available)
    ** syncing from .rnw to .pdf does work correctly (ctrl-click)
    ** syncing from .pdf to .rnw does not work properly, as cursor does not jump to the required position - but stays at its position (double-click/ctrl-click)
  • in 64bit-R the generated pdf show up imidiately, but no sync-pdf button either until touching the file
  • after touching the file, sync-pdf button appears and
    ** syncing from .rnw to .pdf does work correctly (ctrl-click)
    ** syncing from .pdf to .rnw does not work properly, as cursor does not jump to the required position - but stays at its position (double-click/ctrl-click)

I tried to understand the 'bad preamble' error, but failed. There is little (helpful) information about that on the web.

Meanwhile, it seems to be a problem in conjunction with SumatraPDF, because using 'RStudio Viewer' on 64bit-R everything works fine (but it gets even worse on 32bit: each ctrl-click leads to a Bad preamble error and no syncing at all, not even using a .tex file - sth which works perfectly using texWorks ).

Anyone an idea?

Thank you very much!
C.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.