James-Yu / LaTeX-Workshop

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

Extension doesn't show document's structure anymore, just for ONE particular tex file #3627

Closed mattiacolombomc closed 1 year ago

mattiacolombomc commented 1 year ago

Preliminary questions [Required]

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

You still see this issue?: Yes

Make sure to visit the wiki FAQ before filling an issue.

You visited the wiki?: Yes

If your issue is with compiling a document (not having to do with finding the root file of a project), check first that you can compile manually.

You can compile a TeX document manually?: Yes

Describe the bug [Required]

The extension doesn't show the document's structure anymore, even if other softwares (Overleaf, for example) show it. Also, LaTeX-Workshop itself showed it in the past and shows it for other documents. I also tried to create a brand new .tex file copying-pasting the code I encountered the issue with but I had no success.

To Reproduce

Steps to reproduce the behavior:

  1. Download the following LaTeX directory (PDFs are included, needed for a correct build) : https://www.dropbox.com/t/wrNqNkjtd3CrwSNQ
  2. Build Analisi I - itinere #2.tex
  3. See error

Expected behavior

Extension should show the document's structure

Logs [Required]

Please paste the whole log messages here, not parts of ones. The log should start with Initializing LaTeX Workshop. It is very important to identify problems.

LaTeX Workshop Output [Required]

To access the log, click the 'TeX' icon on the Activity Bar on the left side, select 'View Log Messages', then select 'View LaTeX Workshop extension log'.

[17:49:03] Initializing LaTeX Workshop.
[17:49:03] Extension root: /Users/mattiacolombo/.vscode/extensions/james-yu.latex-workshop-9.3.0
[17:49:03] $PATH: /Users/mattiacolombo/.pyenv/shims:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/Users/mattiacolombo/bin:/Users/mattiacolombo/.pyenv/shims:/Users/mattiacolombo/.cargo/bin
[17:49:03] $SHELL: /bin/zsh
[17:49:03] $LANG: undefined
[17:49:03] $LC_ALL: undefined
[17:49:03] process.platform: darwin
[17:49:03] process.arch: x64
[17:49:03] vscode.env.appName: Visual Studio Code
[17:49:03] vscode.env.remoteName: undefined
[17:49:03] vscode.env.uiKind: 1
[17:49:03] Configuration for workspace: file:///Users/mattiacolombo/Desktop/LaTeX
[17:49:03] editor.acceptSuggestionOnEnter: "on"
[17:49:03] latex-workshop.bind.enter.key: true
[17:49:03] latex-workshop.docker.enabled: false
[17:49:03] latex-workshop.docker.image.latex: ""
[17:49:03] latex-workshop.hover.preview.mathjax.extensions: []
[17:49:03] latex-workshop.intellisense.package.enabled: true
[17:49:03] latex-workshop.intellisense.update.aggressive.enabled: false
[17:49:03] latex-workshop.intellisense.update.delay: 1000
[17:49:03] latex-workshop.latex.autoBuild.run: "onFileChange"
[17:49:03] latex-workshop.latex.build.forceRecipeUsage: true
[17:49:03] latex-workshop.latex.outDir: "%DIR%"
[17:49:03] latex-workshop.latex.recipes: [
 {
  "name": "latexmk",
  "tools": [
   "latexmk"
  ]
 },
 {
  "name": "latexmk (latexmkrc)",
  "tools": [
   "latexmk_rconly"
  ]
 },
 {
  "name": "latexmk (lualatex)",
  "tools": [
   "lualatexmk"
  ]
 },
 {
  "name": "latexmk (xelatex)",
  "tools": [
   "xelatexmk"
  ]
 },
 {
  "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"
  ]
 }
]
[17:49:03] 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": "xelatexmk",
  "command": "latexmk",
  "args": [
   "-synctex=1",
   "-interaction=nonstopmode",
   "-file-line-error",
   "-xelatex",
   "-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": {}
 }
]
[17:49:03] latex-workshop.viewer.pdf.internal.keyboardEvent: "auto"
[17:49:03] Creating a new file watcher.
[17:49:03] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[17:49:03] Creating PDF file watcher.
[17:49:03] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[17:49:03] Creating Bib file watcher.
[17:49:03] watcherOptions: {"useFsEvents":false,"usePolling":false,"interval":300,"binaryInterval":1000,"awaitWriteFinish":{"stabilityThreshold":250}}
[17:49:03] Set $LATEXWORKSHOP_DOCKER_LATEX: ""
[17:49:03] pdflatex is provided by MiKTeX
[17:49:03] [Server] Creating LaTeX Workshop http and websocket server.
[17:49:03] LaTeX Workshop initialized.
[17:49:03] Bibtex format config: {"tab":"  ","case":"lowercase","left":"{","right":"}","trailingComma":false,"sort":["key"],"alignOnEqual":true,"sortFields":false,"fieldsOrder":[],"firstEntries":["string","xdata"]}
[17:49:03] Trigger characters for intellisense of LaTeX documents: ["\\",",","{"]
[17:49:03] Current workspace folders: ["file:///Users/mattiacolombo/Desktop/LaTeX"]
[17:49:03] Found root file from active editor: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:03] Root file changed: from undefined to /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:03] Start to find all dependencies.
[17:49:03] Root file languageId: latex
[17:49:03] Reset file watcher.
[17:49:03] Parsing a file and its subfiles: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:03] Parse fls file.
[17:49:03] Fls file found: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.fls
[17:49:03] Parse aux file: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.aux
[17:49:03] [Server] Server successfully started: {"address":"127.0.0.1","family":"IPv4","port":55737}
[17:49:03] Added to file watcher: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:03] Added to file watcher: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Definizione_limite_tutte_1_6.pdf
[17:49:03] Added to file watcher: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/grafici_delle_funzioni_elementari.pdf
[17:49:03] Added to file watcher: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/fun_elem.pdf
[17:49:03] Added to file watcher: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Ruffini.pdf
[17:49:03] Added to file watcher: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Divisione_polinomi.pdf
[17:49:03] Snippet data loaded.
[17:49:03] [Server] valdOrigin is http://127.0.0.1:55737
[17:49:03] Restoring the PDF viewer at the column 1 from the state: {"type":"state","state":{"pdfFileUri":"file:///Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere %232/Analisi I - itinere %232.pdf","scale":"auto","scrollMode":0,"spreadMode":0,"scrollTop":29531,"scrollLeft":0,"trim":0,"synctexEnabled":true,"autoReloadEnabled":true}}
[17:49:03] The internal PDF viewer url: http://127.0.0.1:55737/viewer.html?file=pdf..ZmlsZSUzQSUyRiUyRiUyRlVzZXJzJTJGbWF0dGlhY29sb21ibyUyRkRlc2t0b3AlMkZMYVRlWCUyRkFuYWxpc2klMjBJJTIwLSUyMGl0aW5lcmUlMjAlMjUyMzIlMkZBbmFsaXNpJTIwSSUyMC0lMjBpdGluZXJlJTIwJTI1MjMyLnBkZg
[17:49:03] Added to PDF file watcher: file:///Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere %232/Analisi I - itinere %232.pdf
[17:49:04] Checking for duplicate labels: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex.
[17:49:04] File watcher - file changed: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:04] Parsing a file and its subfiles: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:04] Handle data type: open
[17:49:05] Checking for duplicate labels: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex.
[17:49:05] Auto build started detecting the change of a file: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:05] BUILD command invoked.
[17:49:05] The document of the active editor: file:///Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere %232/Analisi I - itinere %232.tex
[17:49:05] The languageId of the document: latex
[17:49:05] Building root file: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:05] Build root file /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:05] onDidSaveTextDocument triggered: file:///Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere %232/Analisi I - itinere %232.tex
[17:49:05] outDir: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2
[17:49:05] Preparing to run recipe: latexmk
[17:49:05] Recipe step 1: latexmk
[17:49:05] Recipe step 1 args: ["--max-print-line=10000","-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","-outdir=/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2","/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2"]
[17:49:05] Recipe step env: {}
[17:49:05] Recipe step root file: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:49:05] cwd: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2
[17:49:05] LaTeX build process spawned. PID: 41723.
[17:49:05] Preview PDF file: file:///Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere %232/Analisi I - itinere %232.pdf
[17:49:05] Handle data type: loaded
[17:49:05] Manager.fileWatcher.getWatched: {"/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2":["Analisi I - itinere #2.tex","Definizione_limite_tutte_1_6.pdf","Divisione_polinomi.pdf","Ruffini.pdf","fun_elem.pdf","grafici_delle_funzioni_elementari.pdf"]}
[17:49:05] Manager.filesWatched: ["/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex","/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Definizione_limite_tutte_1_6.pdf","/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/grafici_delle_funzioni_elementari.pdf","/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/fun_elem.pdf","/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Ruffini.pdf","/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Divisione_polinomi.pdf"]
[17:49:05] BibWatcher.bibWatcher.getWatched: {}
[17:49:05] BibWatcher.bibsWatched: []
[17:49:05] PdfWatcher.pdfWatcher.getWatched: {"/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2":["Analisi I - itinere #2.pdf"]}
[17:49:05] PdfWatcher.pdfsWatched: ["/Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.pdf"]
[17:49:05] PdfWatcher.watchedPdfVirtualUris: []
[17:49:05] PdfWatcher.ignoredPdfUris: ["file:///Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere %232/Analisi I - itinere %232.pdf"]
[17:49:05] A step in recipe finished. PID: 41723.
[17:49:05] Successfully built /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex.
[17:49:19] LOG command invoked: compiler
[17:50:09] LOG command invoked: default
[17:50:09] Current workspace folders: ["file:///Users/mattiacolombo/Desktop/LaTeX"]
[17:50:09] Found root file from active editor: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:50:09] Keep using the same root file: /Users/mattiacolombo/Desktop/LaTeX/Analisi I - itinere #2/Analisi I - itinere #2.tex
[17:50:09] LOG command invoked: default

Developer Tools Console [Required]

To access the log, click 'help' -> 'Toggle Developer Tools' -> 'Console'. Paste anything suspicious.

(pdflatex: major issue: So far, you have not checked for MiKTeX updates)

DevTools failed to load source map: Could not load content for https://file+.vscode-resource.vscode-cdn.net/Users/mattiacolombo/.vscode/extensions/james-yu.latex-workshop-9.3.0/node_modules/pdfjs-dist/build/pdf.js.map: Connection error: net::ERR_NAME_NOT_RESOLVED

DevTools failed to load source map: Could not load content for http://127.0.0.1:55737/build/pdf.worker.js.map: Fetch through target failed: Target not supported; Fallback: Unknown error

WARN [twxs.cmake]: Cannot register 'cmake.cmakePath'. This property is already registered.

Overwriting grammar scope name to file mapping for scope text.tex.
Old grammar file: file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/extensions/latex/syntaxes/TeX.tmLanguage.json.
New grammar file: file:///Users/mattiacolombo/.vscode/extensions/james-yu.latex-workshop-9.3.0/syntax/TeX.tmLanguage.json

Screenshots

If applicable, add screenshots to help explain your problem.

OVERLEAFL's STRUCTURE Safari -06 -01-2023 at 17 52 48

Safari -06 -01-2023 at 17 52 53

LaTeX workshop's structure:

Code -06 -01-2023 at 17 53 11@2x

Desktop [Required]

Please write exact version numbers. Please don't write latest instead of exact numbers.

Additional questions

Are you using VSCodium?

No

Are you using the Snap or Flatpack versions of VS Code?

No

Are you using LaTeX Workshop with VS Code Remote?

No

Additional context

mattiacolombomc commented 1 year ago

I noticed that by DELETING or COMMENTING line 113 \item Forma [$0] \cdot [\pm \infty$]: Spesso si può sfruttare la gerarchia degli infiniti/infinitesimi, portando uno dei due al denominatore (solitamente quello più \textit{"pesante"}) in termini di gerarchia assieme ad un segno, per avere lo stesso argomento, ad esempio in un esponenziale. Esempio: $x e^{\frac{1}{x}}=\frac{e^{\frac{1}{x}}}{\frac{1}{x}}$

structure is outputted again. Maybe this line causes some issues with the .aux files?

Code -06 -01-2023 at 18 10 40@2x
mattiacolombomc commented 1 year ago

Apparently, changing line 113 from \item [$0] \cdot [\pm \infty$] to \item $[0] \cdot [\pm \infty]$ solves the bug.

Maybe this generates the bug in the build phase?

mattiacolombomc commented 1 year ago

Just a LaTex syntax issue.