James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.47k stars 519 forks source link

Forward synctex does not work (does not jump to cursor) #4214

Closed RalfJung closed 4 months ago

RalfJung commented 4 months ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [x] The issue has not been reported in this repository.
  • [x] The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • [x] The FAQ cannot address the issue.
  • [x] The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.

Environment*

Please write exact version numbers instead of descriptors such as latest.

  • Operating System: Linux (Debian testing)
  • Visual Studio Code Version: vscodium 1.87.0
  • LaTeX Workshop Version: v9.19.1
  • TeX Distribution Version: Debian package 2023.20231207-1

Please list the environment and version number if you are using VSCodium, Snap or Flatpack versions of Visual Studio Code, and/or Visual Studio Code Remote Containers/SSH/WSL.

  • I am using vscodium 1.87.0.

The Issue*

Please briefly describe the issue you come across.

  • The "view" command is supposed to jump the PDF viewer to the cursor location, but it does not.

Reproduction Steps

Please list out the steps to reproduce your bug. Include relevant environmental variables or any other configuration.

  1. Create a little two-page test document.
    
    \documentclass[10pt,a4paper]{article}

\begin{document} Hello!

\newpage

Second page!

\end{document}

2.  Build and open the PDF.
3. Ctrl-click in the PDF on both pages: this works fine.
4. Ctrl-Alt-V on one of the two  lines in the source -- nothing happens.

### Expected Behavior
> _What were you expecting to see? Include any relevant examples or documentation links._
- Ctrl-Alt-V should make the PDF viewer jump to the cursor location.

## Logs
### LaTeX Workshop Output*
> _Please paste the whole log messages below, not parts of ones. The log should start with `New log placeholder %WS1% registered`._

[16:54:31.370][Logger] New log placeholder %WS1% registered for /home/r/Dokumente/Unisachen/@meta/grants/rust-borrowck . [16:54:31.370][Extension] Initializing LaTeX Workshop. [16:54:31.412][Build][Recipe] Set $LATEXWORKSHOP_DOCKER_LATEX: "" [16:54:31.427][Server] Creating LaTeX Workshop http and websocket server. [16:54:31.458][Format][Bib] Bibtex format config: {"tab":" ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":false,"fieldsOrder":[],"firstEntries":["string","xdata"]} [16:54:31.471][Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":42397} . [16:54:31.474][Extension] Extension root: /home/r/.vscode-oss/extensions/james-yu.latex-workshop-9.19.1-universal [16:54:31.474][Extension] $PATH: /home/r/bin:/home/r/.cargo/bin:/home/r/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games [16:54:31.474][Extension] $SHELL: /bin/bash [16:54:31.474][Extension] $LANG: en_US.UTF-8 [16:54:31.475][Extension] $LC_ALL: undefined [16:54:31.475][Extension] process.platform: linux [16:54:31.475][Extension] process.arch: x64 [16:54:31.475][Extension] vscode.env.appName: VSCodium [16:54:31.475][Extension] vscode.env.remoteName: undefined [16:54:31.475][Extension] vscode.env.uiKind: 1 [16:54:31.492][Config] editor.acceptSuggestionOnEnter: "off" . [16:54:31.497][Extension] Trigger characters for intellisense of LaTeX documents: ["\",",","{"] [16:54:31.498][Root] Current workspace folders: ["file://%WS1%"] [16:54:31.499][Extension] LaTeX Workshop initialized. [16:54:31.499][Root] Found root file from active editor: %WS1%/test.tex [16:54:31.499][Root] Root file changed: from %WS1%/test.tex to %WS1%/test.tex, langID latex . Refresh dependencies [16:54:31.499][Event] ROOT_FILE_CHANGED: "%WS1%/test.tex" [16:54:31.500][Cacher][Watcher] Reset. [16:54:31.500][Cacher][Watcher] Reset. [16:54:31.502][Cacher] Adding %WS1%/test.tex . [16:54:31.503][Cacher][Watcher] Watched %WS1%/test.tex with a new .* watcher on %WS1% . [16:54:31.503][Event] FILE_WATCHED: "%WS1%/test.tex" [16:54:31.504][Cacher] Caching %WS1%/test.tex . [16:54:31.505][Cacher] Updated inputs of %WS1%/test.tex . [16:54:31.505][Cacher] Parse LaTeX AST: %WS1%/test.tex . [16:54:31.505][Event] ROOT_FILE_SEARCHED [16:54:31.507][Server] valdOrigin is http://127.0.0.1:42397 [16:54:31.514][Cacher] Parsed LaTeX AST: %WS1%/test.tex . [16:54:31.514][File] Calling kpsewhich to resolve article.cls . [16:54:31.561][File] kpsewhich returned with '/usr/share/texlive/texmf-dist/tex/latex/base/article.cls'. [16:54:31.562][Cacher] Updated elements in 47.51 ms: %WS1%/test.tex . [16:54:31.562][Event] FILE_PARSED: "%WS1%/test.tex" [16:54:31.562][Cacher] Parsing .fls %WS1%/test.fls . [16:54:31.563][Cacher] Found .aux %WS1%/test.tex from .fls %WS1%/test.fls , parsing. [16:54:31.563][Cacher] Parsed .aux %WS1%/test.tex . [16:54:31.563][Cacher] Parsed .fls %WS1%/test.fls . [16:54:31.564][Structure] Structure force updated with 0 root sections for %WS1%/test.tex . [16:54:31.564][Event] STRUCTURE_UPDATED [16:54:31.569][Viewer][Panel] Internal PDF viewer at http://127.0.0.1:42397/viewer.html?file=pdf..ZmlsZSUzQSUyRiUyRiUyRmhvbWUlMkZyJTJGRG9rdW1lbnRlJTJGVW5pc2FjaGVuJTJGJTQwbWV0YSUyRmdyYW50cyUyRnJ1c3QtYm9ycm93Y2slMkZ0ZXN0LnBkZg . [16:54:31.569][Cacher][Watcher] Watched %WS1%/test.pdf with a new .pdf watcher on %WS1% . [16:54:31.569][Event] FILE_WATCHED: "%WS1%/test.pdf" [16:54:31.760][Viewer] Handle data type: open [16:54:31.806][Server] Preview PDF file: file://%WS1%/test.pdf [16:54:31.877][Viewer] Handle data type: loaded [16:54:31.878][Event] VIEWER_PAGE_LOADED [16:54:34.957][Commander] VIEW command invoked. [16:54:34.957][Root] Current workspace folders: ["file://%WS1%"] [16:54:34.958][Root] Found root file from active editor: %WS1%/test.tex [16:54:34.958][Root] Keep using the same root file: %WS1%/test.tex [16:54:34.958][Event] ROOT_FILE_SEARCHED [16:54:34.959][Event] STRUCTURE_UPDATED [16:54:34.989][Viewer] Open PDF tab for file://%WS1%/test.pdf [16:56:31.405][Event] STRUCTURE_UPDATED [16:57:55.172][Event] STRUCTURE_UPDATED [16:58:04.990][Commander] VIEW command invoked. [16:58:04.991][Root] Current workspace folders: ["file://%WS1%"] [16:58:04.992][Root] Found root file from active editor: %WS1%/test.tex [16:58:04.993][Root] Keep using the same root file: %WS1%/test.tex [16:58:04.993][Event] ROOT_FILE_SEARCHED [16:58:04.993][Event] STRUCTURE_UPDATED [16:58:05.019][Viewer] Open PDF tab for file://%WS1%/test.pdf [16:58:12.768][Event] STRUCTURE_UPDATED [17:01:43.723][Viewer] Handle data type: reverse_synctex [17:01:43.723][Locator] Backward from %WS1%/test.pdf at x=166.66471449487554, y=136.09370424597358 on page 2. [17:01:43.724][SyncTeX] Parsing .synctex.gz %WS1%/test.synctex.gz . [17:01:43.727][Locator] Backward SyncTeX to %WS1%/test.tex . [17:01:43.748][Event] STRUCTURE_UPDATED


There's a "VIEW command invoked" any time I do Ctrl-Alt-V, but then the PDF viewer does not jump anywhere.

### Developer Tools Console
> _Please paste the whole log messages below, not parts of ones. This console logs can sometimes be very important in many cases. To access the log, click `Help` -> `Toggle Developer Tools` -> `Console`._

INFO Started local extension host with pid 122. workbench.desktop.main.js:1877 Overwriting grammar scope name to file mapping for scope text.tex. Old grammar file: file:///home/r/bin/vscodium.d/resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json. New grammar file: file:///home/r/.vscode-oss/extensions/james-yu.latex-workshop-9.19.1-universal/syntax/TeX.tmLanguage.json register @ workbench.desktop.main.js:1877 workbench.desktop.main.js:1877 Overwriting grammar scope name to file mapping for scope text.tex.latex. Old grammar file: file:///home/r/bin/vscodium.d/resources/app/extensions/latex/syntaxes/LaTeX.tmLanguage.json. New grammar file: file:///home/r/.vscode-oss/extensions/james-yu.latex-workshop-9.19.1-universal/syntax/LaTeX.tmLanguage.json register @ workbench.desktop.main.js:1877 workbench.desktop.main.js:1877 Overwriting grammar scope name to file mapping for scope text.bibtex. Old grammar file: file:///home/r/bin/vscodium.d/resources/app/extensions/latex/syntaxes/Bibtex.tmLanguage.json. New grammar file: file:///home/r/.vscode-oss/extensions/james-yu.latex-workshop-9.19.1-universal/syntax/Bibtex.tmLanguage.json register @ workbench.desktop.main.js:1877 workbench.desktop.main.js:1877 Overwriting grammar scope name to file mapping for scope text.tex.markdown_latex_combined. Old grammar file: file:///home/r/bin/vscodium.d/resources/app/extensions/latex/syntaxes/markdown-latex-combined.tmLanguage.json. New grammar file: file:///home/r/.vscode-oss/extensions/james-yu.latex-workshop-9.19.1-universal/syntax/markdown-latex-combined.tmLanguage.json register @ workbench.desktop.main.js:1877 workbench.desktop.main.js:1877 Overwriting grammar scope name to file mapping for scope source.cpp.embedded.latex. Old grammar file: file:///home/r/bin/vscodium.d/resources/app/extensions/latex/syntaxes/cpp-grammar-bailout.tmLanguage.json. New grammar file: file:///home/r/.vscode-oss/extensions/james-yu.latex-workshop-9.19.1-universal/syntax/cpp-grammar-bailout.tmLanguage.json register @ workbench.desktop.main.js:1877 workbench.desktop.main.js:1221 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing. mountTo @ workbench.desktop.main.js:1221 workbench.desktop.main.js:651 INFO [perf] Render performance baseline is 19ms workbench.desktop.main.js:1221 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing. mountTo @ workbench.desktop.main.js:1221 workbench.desktop.main.js:1221 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing. mountTo @ workbench.desktop.main.js:1221 workbench.desktop.main.js:1221 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing. mountTo @ workbench.desktop.main.js:1221



## Anything Else?
> _Add any other context about the problem below._
- I feel like I tried this a week ago and it worked back then... but I don't remember changing anything. Maybe my memory is just playing tricks on me.
RalfJung commented 4 months ago

Oh, I misunderstood some docs... the shortcut for syntex is Ctrl-Alt-J, not Ctrl-Alt-V... sorry for that.

KingJadeLight commented 4 months ago

Oh, I misunderstood some docs... the shortcut for syntex is Ctrl-Alt-J, not Ctrl-Alt-V... sorry for that.

I was using Ctrl-Alt-J, it didn't work.