Synctex backward search fails in internal viewer for \input
files with a file-extension other than .tex
.
document.tex
, world.inc
, world.tex
as attached.document.tex
in texstudio with pdflatex -synctex=1 -interaction=nonstopmode document.tex
.Backward search works in document.tex
and world.tex
paragraphs, but not in the world.inc
paragraph.
Forward search works everywhere, including world.inc
.
Observed on Windows 10 (64bit),
TeXstudio 2.12.6 (hg 6632:7777b2b8a906)
Using Qt Version 5.9.1, compiled with Qt 5.9.1 R
Backward search also works everywhere from within SumatraPDF, so it seems to be an issue with the command sent by the internal viewer.
Reason for non-
.tex
filenamesI am using file-names other than
.tex
, because a Journal I am trying to submit to allows only one.tex
file per submission.Workaround
In Options → Configure TexStudio → Internal PDF Viewer, set Synchronized Filetypes to
*.*
instead of the default value*.tex
.However, I noticed that in the
.inc
file also in-editor features like\ref
completion and Rightclick on Label → Go To Defintion are broken. These are not fixed by the workaround.Last edit: Klaus 2017-08-08
PDF-Synchonization
Options → Configure TexStudio → Internal PDF Viewer
is not a workaround but the official way to determine which file types should be regarded as source files to be syncronized. I suggest not to use a complete wild card*.*
but specify the desired extensions explicitly, e.g.:*.tex;*.tikz;*.pdf_tex;*.inc
Other LaTeX-related language features
Some features depend on the
View → Highlighting
to be set to(La)TeX
. You can either do this manually everytime you open the.inc
file. Alternatively, you can overwrite the language definition as described in the manual (Be sure you understand the implcations mentioned there). In your case, you would simply copy tex.qnfa to your languages folder and addinc
to the list of extensions.