Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synctex forward not working on input files #2768

Closed
martinoischia opened this issue Jun 15, 2021 · 2 comments
Closed

Synctex forward not working on input files #2768

martinoischia opened this issue Jun 15, 2021 · 2 comments
Assignees
Labels
enhancement Issue suggests an enhancement

Comments

@martinoischia
Copy link

martinoischia commented Jun 15, 2021

Disable all the other extensions except for LaTeX Workshop, restart VS Code, and check that you still see this issue.

You still see this issue?: Yes

Describe the bug

I have this MWE

\documentclass{book}
\begin{document}
abc
\input{1.tex}
\end{document}

with 1.tex containing just a few words.
Synctex works fine from PDF to the file in input (meaning that clicking sends me to the correct place of the input file), while in the opposite sense it works properly only from the root file to the PDF, but I get an error running Synctex from cursor when I select a word in the input file.

LaTeX Workshop Output

[18:58:17] Initializing LaTeX Workshop.
[18:58:17] Extension root: c:\Users\ischi\.vscode\extensions\james-yu.latex-workshop-8.19.2
[18:58:17] $PATH: C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\R\R-3.6.2\bin\x64;C:\Program Files\Notepad++;C:\Program Files\gnuplot\bin;D:\vagrant\bin;C:\rtools40\mingw64\bin;C:\rtools40\usr\bin;C:\Program Files\Pandoc\;C:\Users\ischi\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\ischi\AppData\Local\Programs\Python\Python39\;C:\Ruby26-x64\bin;C:\Users\ischi\AppData\Local\Microsoft\WindowsApps;C:\Users\ischi\AppData\Local\Apps\Infocert\Dike GoSign\RAO;C:\Octave\Octave-5.1.0.0;;C:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\ischi\AppData\Local\Programs\Microsoft VS Code Insiders\bin;D:\texlive\2021\bin\win32
[18:58:17] $SHELL: undefined
[18:58:17] latex-workshop.intellisense.update.aggressive.enabled: false
[18:58:17] latex-workshop.intellisense.update.delay: 1000
[18:58:17] latex-workshop.latex.autoBuild.run: "never"
[18:58:17] latex-workshop.latex.outDir: "%DIR%"
[18:58:17] latex-workshop.latex.recipes: [{"name":"latexmk 🔃","tools":["latexmk"]},{"name":"latexmk (latexmkrc)","tools":["latexmk_rconly"]},{"name":"latexmk (lualatex)","tools":["lualatexmk"]},{"name":"pdflatex ➞ bibtex ➞ pdflatex × 2","tools":["pdflatex","bibtex","pdflatex","pdflatex"]},{"name":"Compile Rnw files","tools":["rnw2tex","latexmk"]},{"name":"Compile Jnw files","tools":["jnw2tex","latexmk"]},{"name":"tectonic","tools":["tectonic"]}]
[18:58:17] latex-workshop.latex.tools: [{"name":"latexmk","command":"latexmk","args":["-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","-outdir=%OUTDIR%","%DOC%"],"env":{}},{"name":"lualatexmk","command":"latexmk","args":["-synctex=1","-interaction=nonstopmode","-file-line-error","-lualatex","-outdir=%OUTDIR%","%DOC%"],"env":{}},{"name":"latexmk_rconly","command":"latexmk","args":["%DOC%"],"env":{}},{"name":"pdflatex","command":"pdflatex","args":["-synctex=1","-interaction=nonstopmode","-file-line-error","%DOC%"],"env":{}},{"name":"bibtex","command":"bibtex","args":["%DOCFILE%"],"env":{}},{"name":"rnw2tex","command":"Rscript","args":["-e","knitr::opts_knit$set(concordance = TRUE); knitr::knit('%DOCFILE_EXT%')"],"env":{}},{"name":"jnw2tex","command":"julia","args":["-e","using Weave; weave(\"%DOC_EXT%\", doctype=\"tex\")"],"env":{}},{"name":"jnw2texmintex","command":"julia","args":["-e","using Weave; weave(\"%DOC_EXT%\", doctype=\"texminted\")"],"env":{}},{"name":"tectonic","command":"tectonic","args":["--synctex","--keep-logs","%DOC%.tex"],"env":{}}]
[18:58:17] latex-workshop.viewer.pdf.internal.keyboardEvent: "auto"
[18:58:17] Creating a new file watcher.
[18:58:17] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[18:58:17] Creating PDF file watcher.
[18:58:17] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{}}
[18:58:17] Creating Bib file watcher.
[18:58:17] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[18:58:17] [Server] Creating LaTeX Workshop http and websocket server.
[18:58:17] LaTeX Workshop initialized.
[18:58:17] Trigger characters for intellisense of LaTeX documents: ["\\","{",",","(","["]
[18:58:17] Bibtex format config: {"tab":"  ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":false,"fieldsOrder":[]}
[18:58:17] Current workspace folders: ["file:///d:/useless"]
[18:58:17] Current workspaceRootDir: file:///d:/useless
[18:58:17] Found root file from active editor: d:\useless\prova.tex
[18:58:17] Root file changed: from undefined to d:\useless\prova.tex
[18:58:17] Start to find all dependencies.
[18:58:17] Root file languageId: latex
[18:58:17] [Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":51238}
[18:58:17] Reset file watcher.
[18:58:17] Parsing a file and its subfiles: d:\useless\prova.tex
[18:58:18] Parsing a file and its subfiles: d:\useless\1.tex
[18:58:18] Parse fls file.
[18:58:18] Cannot find fls file: d:\useless\1.fls
[18:58:18] Parse fls file.
[18:58:18] Fls file found: d:\useless\prova.fls
[18:58:18] Parse aux file: d:\useless\prova.aux
[18:58:18] Added to file watcher: d:\useless\prova.tex
[18:58:18] Added to file watcher: d:\useless\1.tex
[18:58:18] Snippet data loaded.
[18:58:18] Checking for duplicate labels: d:\useless\prova.tex.
[18:58:18] Checking for duplicate labels: d:\useless\1.tex.
[18:58:20] Manager.fileWatcher.getWatched: {"d:\\useless":["1.tex","prova.tex"]}
[18:58:20] Manager.filesWatched: ["d:\\useless\\prova.tex","d:\\useless\\1.tex"]
[18:58:26] BUILD command invoked.
[18:58:26] The document of the active editor: file:///d%3A/useless/prova.tex
[18:58:26] The languageId of the document: latex
[18:58:26] Current workspace folders: ["file:///d:/useless"]
[18:58:26] Current workspaceRootDir: file:///d:/useless
[18:58:26] Found root file from active editor: d:\useless\prova.tex
[18:58:26] Keep using the same root file: d:\useless\prova.tex
[18:58:26] Building root file: d:\useless\prova.tex
[18:58:26] Build root file d:\useless\prova.tex
[18:58:26] outDir: d:/useless
[18:58:26] Recipe step 1: latexmk, -synctex=1,-interaction=nonstopmode,-file-line-error,-pdf,-outdir=d:/useless,d:/useless/prova
[18:58:26] Recipe step env: {}
[18:58:26] cwd: d:\useless
[18:58:27] LaTeX build process spawned. PID: 14488.
[18:58:27] Recipe of length 1 finished. PID: 14488.
[18:58:27] Successfully built d:\useless\prova.tex.
[18:58:28] Manager.fileWatcher.getWatched: {"d:\\useless":["1.tex","prova.tex"]}
[18:58:28] Manager.filesWatched: ["d:\\useless\\prova.tex","d:\\useless\\1.tex"]
[18:58:31] VIEW command invoked.
[18:58:31] Current workspace folders: ["file:///d:/useless"]
[18:58:31] Current workspaceRootDir: file:///d:/useless
[18:58:31] Found root file from active editor: d:\useless\prova.tex
[18:58:31] Keep using the same root file: d:\useless\prova.tex
[18:58:31] Serving PDF file at http://127.0.0.1:51238/viewer.html?file=pdf..ZCUzQSU1Q3VzZWxlc3MlNUNwcm92YS5wZGY
[18:58:31] The encoded path is d:\useless\prova.pdf
[18:58:31] The internal PDF viewer url: http://127.0.0.1:51238/viewer.html?incode=1&file=pdf..ZCUzQSU1Q3VzZWxlc3MlNUNwcm92YS5wZGY
[18:58:31] Open PDF tab for d:\useless\prova.pdf
[18:58:32] Handle data type: open
[18:58:32] Preview PDF file: d:\useless\prova.pdf
[18:58:32] Handle data type: request_params
[18:58:32] Sending the settings of the PDF viewer for initialization: {"type":"params","scale":"auto","trim":0,"scrollMode":0,"spreadMode":0,"hand":false,"invertMode":{"enabled":false,"brightness":1,"grayscale":0.6,"hueRotate":180,"invert":0,"sepia":0},"bgColor":"#ffffff","keybindings":{"synctex":"double-click"}}
[18:58:32] Handle data type: loaded
[18:58:32] Current workspace folders: ["file:///d:/useless"]
[18:58:32] Current workspaceRootDir: file:///d:/useless
[18:58:32] Found root file from active editor: d:\useless\prova.tex
[18:58:32] Keep using the same root file: d:\useless\prova.tex
[18:58:33] Manager.fileWatcher.getWatched: {"d:\\useless":["1.tex","prova.tex"]}
[18:58:33] Manager.filesWatched: ["d:\\useless\\prova.tex","d:\\useless\\1.tex"]
[18:58:34] Manager.fileWatcher.getWatched: {"d:\\useless":["1.tex","prova.tex"]}
[18:58:34] Manager.filesWatched: ["d:\\useless\\prova.tex","d:\\useless\\1.tex"]
[18:58:40] Handle data type: reverse_synctex
[18:58:40] SyncTeX to file D:\useless\1.tex
[18:58:40] Current workspace folders: ["file:///d:/useless"]
[18:58:40] Current workspaceRootDir: file:///d:/useless
[18:58:40] Current workspace folders: ["file:///d:/useless"]
[18:58:40] Current workspaceRootDir: file:///d:/useless
[18:58:40] Current workspace folders: ["file:///d:/useless"]
[18:58:40] Current workspaceRootDir: file:///d:/useless
[18:58:40] Keep using the same root file: d:\useless\prova.tex
[18:58:40] Keep using the same root file: d:\useless\prova.tex
[18:58:41] Fls file found: d:\useless\prova.fls
[18:58:41] Found root file from '.fls': d:\useless\prova.tex
[18:58:41] Keep using the same root file: d:\useless\prova.tex
[18:58:42] Manager.fileWatcher.getWatched: {"d:\\useless":["1.tex","prova.tex"]}
[18:58:42] Manager.filesWatched: ["d:\\useless\\prova.tex","d:\\useless\\1.tex"]
[18:58:42] Manager.fileWatcher.getWatched: {"d:\\useless":["1.tex","prova.tex"]}
[18:58:42] Manager.filesWatched: ["d:\\useless\\prova.tex","d:\\useless\\1.tex"]
[18:58:43] Manager.fileWatcher.getWatched: {"d:\\useless":["1.tex","prova.tex"]}
[18:58:43] Manager.filesWatched: ["d:\\useless\\prova.tex","d:\\useless\\1.tex"]
[18:58:45] SYNCTEX command invoked.
[18:58:45] Execute syncTexJsForward for the internal PDF viewer.
[18:58:45] SyncTeX failed.
[18:58:45] No relevant entry of the tex file found in the synctex file. File path: d:\useless\1.tex Entries: [
 "D:/useless/./1.tex",
 "d:/useless/prova.tex"
]
[18:58:45] SyncTexJsError: No relevant entry of the tex file found in the synctex file. File path: d:\useless\1.tex Entries: [
 "D:/useless/./1.tex",
 "d:/useless/prova.tex"
]
	at SyncTexJs.syncTexJsForward (c:\Users\ischi\.vscode\extensions\james-yu.latex-workshop-8.19.2\out\src\components\locatorlib\synctex.js:131:19)
	at Locator.syncTeX (c:\Users\ischi\.vscode\extensions\james-yu.latex-workshop-8.19.2\out\src\components\locator.js:155:47)
	at Commander.synctex (c:\Users\ischi\.vscode\extensions\james-yu.latex-workshop-8.19.2\out\src\commander.js:241:36)
	at c:\Users\ischi\.vscode\extensions\james-yu.latex-workshop-8.19.2\out\src\main.js:87:89
	at _executeContributedCommand (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:84:108094)
	at _.$executeContributedCommand (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:84:108532)
	at h._doInvokeHandler (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:12797)
	at h._invokeHandler (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:12489)
	at h._receiveRequest (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:11145)
	at h._receiveOneMessage (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:9945)
	at c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:8049
	at l.fire (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1835)
	at E.fire (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:15632)
	at c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:103:29788
	at l.fire (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1835)
	at E.fire (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:15632)
	at t._receiveMessage (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:20890)
	at c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:17776
	at l.fire (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1835)
	at c.acceptChunk (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:12993)
	at c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:12341
	at Socket.b (c:\Users\ischi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:103:13267)
	at Socket.emit (events.js:315:20)
	at addChunk (internal/streams/readable.js:309:12)
	at readableAddChunk (internal/streams/readable.js:284:9)
	at Socket.Readable.push (internal/streams/readable.js:223:10)
	at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
[18:58:59] LOG command invoked: default

Developer Tools Console

electron/js2c/renderer_init.js:65 The vm module of Node.js is deprecated in the renderer process and will be removed.
workbench.desktop.main.js:62 [Extension Host] (node:7808) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `Code --trace-deprecation ...` to show where the warning was created)
viewer.js:202 webviewerloaded: SecurityError: Blocked a frame with origin "http://127.0.0.1:51238" from accessing a cross-origin frame.
viewer.js:1979 PDF 1825a194b08538968d87ba20b9920c88 [1.5 pdfTeX-1.40.22 / TeX] (PDF.js: 2.7.570)
DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:51238/out/viewer/latexworkshop.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:51238/out/viewer/components/synctex.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:51238/out/viewer/components/pagetrimmer.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:51238/out/viewer/components/viewerhistory.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:51238/out/viewer/components/utils.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:51238/build/pdf.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:51238/viewer.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:51238/build/pdf.worker.js.map: Fetch through target failed: Target not supported; Fallback: Unknown error
DevTools failed to load SourceMap: Could not load content for https://ticino.blob.core.windows.net/sourcemaps/b4c1bd0…/core/vs/workbench/workbench.desktop.main.js.map: Load canceled due to load timeout
  • OS: Windows 10
  • VS Code version: 1.57.0
  • Extension version: v8.19.2
  • TeX distribution version: TeX Live 2021

Are you using VSCodium?

No

Are you using LaTeX Workshop with VS Code Remote?

No

@tamuratak tamuratak added the enhancement Issue suggests an enhancement label Jun 16, 2021
@tamuratak tamuratak self-assigned this Jun 17, 2021
@ZhongXinlin

This comment has been minimized.

@tamuratak
Copy link
Contributor

Closed in 09c044d

Repository owner locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Issue suggests an enhancement
Projects
None yet
Development

No branches or pull requests

3 participants