Menu

#2230 Synctex backward search fails for file extensions other than `.tex`.

None
works-for-me
nobody
None
1
2017-08-08
2017-08-08
Klaus
No

Observed error

Synctex backward search fails in internal viewer for \input files with a file-extension other than .tex.

Steps to reproduce issue

  1. Download document.tex, world.inc, world.tex as attached.
  2. Open and compile document.tex in texstudio with pdflatex -synctex=1 -interaction=nonstopmode document.tex.
  3. View result in external viewer.

Backward search works in document.tex and world.tex paragraphs, but not in the world.inc paragraph.

Forward search works everywhere, including world.inc.

Installation Info

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

3 Attachments

Discussion

  • Klaus

    Klaus - 2017-08-08

    Backward search also works everywhere from within SumatraPDF, so it seems to be an issue with the command sent by the internal viewer.

     
  • Klaus

    Klaus - 2017-08-08

    Reason for non-.tex filenames

    I 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
  • Tim Hoffmann

    Tim Hoffmann - 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

    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 add inc to the list of extensions.

     
  • Tim Hoffmann

    Tim Hoffmann - 2017-08-08
    • status: open --> works-for-me
    • Group: -->
     

Log in to post a comment.