You still see this issue?: Yes
You visited the wiki?: Yes
You can compile a TeX document manually?: Yes
The file is not compiled on any file change.
Steps to reproduce the behavior:
I expect that there would be build processing.
Please paste the whole log messages here, not parts of ones. It is very important to identify problems.
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'.
[Paste the log here]
The file watchers seems to set up:
[13:45:33] Initializing LaTeX Workshop.
[13:45:33] Creating LaTeX Workshop http and websocket server.
[13:45:34] LaTeX Workshop initialized.
[13:45:34] Server created on 127.0.0.1:35055
[13:45:34] Snippet data loaded.
[13:45:34] LaTeX Workshop version: 8.6.0
[13:45:35] Found files that might be root, choose the first one: /mnt/d/git/bachelors-thesis/main.tex
[13:45:35] Root file changed from: undefined to /mnt/d/git/bachelors-thesis/main.tex. Find all dependencies.
[13:45:35] Instantiating a new file watcher for /mnt/d/git/bachelors-thesis/main.tex
[13:45:35] Creating file watcher for .bib files.
[13:45:35] Parsing /mnt/d/git/bachelors-thesis/main.tex
[13:45:35] Parsing /mnt/d/git/bachelors-thesis/parts/introduction.tex
[13:45:35] Parsing /mnt/d/git/bachelors-thesis/chapters/competitive-apps.tex
[13:45:35] Parsing /mnt/d/git/bachelors-thesis/parts/conclusion.tex
[13:45:35] Parsing /mnt/d/git/bachelors-thesis/parts/acronyms.tex
[13:45:35] Parsing /mnt/d/git/bachelors-thesis/parts/attachment.tex
[13:45:35] Found .bib file /mnt/d/git/bachelors-thesis/library.bib
[13:45:35] Adding .bib file /mnt/d/git/bachelors-thesis/library.bib to bib file watcher.
[13:45:35] Parsing .bib entries from /mnt/d/git/bachelors-thesis/library.bib
[13:45:35] Adding /mnt/d/git/bachelors-thesis/main.tex to file watcher.
[13:45:35] Adding /mnt/d/git/bachelors-thesis/parts/introduction.tex to file watcher.
[13:45:35] Adding /mnt/d/git/bachelors-thesis/chapters/competitive-apps.tex to file watcher.
[13:45:35] Adding /mnt/d/git/bachelors-thesis/parts/conclusion.tex to file watcher.
[13:45:35] Adding /mnt/d/git/bachelors-thesis/parts/acronyms.tex to file watcher.
[13:45:35] Adding /mnt/d/git/bachelors-thesis/parts/attachment.tex to file watcher.
[13:45:35] Parsed 4 bib entries from /mnt/d/git/bachelors-thesis/library.bib.
Then I run latexmk 🔁 but only this log appers on any change
[13:48:34] Found root file by magic comment: /mnt/d/git/bachelors-thesis/main.tex
[13:48:34] Looped root file by magic comment found: /mnt/d/git/bachelors-thesis/main.tex, stop here.
[13:48:34] Root file remains unchanged from: /mnt/d/git/bachelors-thesis/main.tex.
Yes
If the answer is Yes, please write which one you are using. Write the versions of the remote extension.
I used to use this extension around 2 months ago and it worked.
Settings
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.synctex.synctexjs.enabled": true,
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-xelatex",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-shell-escape",
"%DOC%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOC%"
],
"env": {}
},
{
"name": "arara",
"command": "arara",
"args": [
"%DOCFILE%"
]
}
],
"latex-workshop.latex.recipes": [
{
"name": "arara",
"tools": [
"arara"
]
},
{
"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"
]
}
],
This is kinda awkward, but it works now??? 🤣
Not sure what was the reason, but I have added
"latex-workshop.latex.watch.usePolling": true,
"latex-workshop.latex.autoBuild.run": "onFileChange",
to the settings. Maybe WSL2 wants that usePolling? I am also using WSL2 now, 2 months back I have been using WSL1, so maybe WSL2 needs this rule?
I have opt out the "latex-workshop.latex.watch.usePolling": true, and it doesn't work without it in WSL2.
It would be great to add this to the wiki next to https://github.com/James-Yu/LaTeX-Workshop/wiki/FAQ#using-latex-workshop-with-wsl! :-)
It might be related to microsoft/WSL/issues/4739. Another workaround seems to be moving TeX files from d:\git to the Linux filesystem.
@tenhobi could you make a PR to https://github.com/jlelong/LaTeX-Workshop-wiki with the correct configuration for WSL2?
@tamuratak thanks for pointing to that issue. That is for sure related.
@jlelong done. 😸
Most helpful comment
This is kinda awkward, but it works now??? 🤣
Not sure what was the reason, but I have added
to the settings. Maybe WSL2 wants that
usePolling? I am also using WSL2 now, 2 months back I have been using WSL1, so maybe WSL2 needs this rule?I have opt out the
"latex-workshop.latex.watch.usePolling": true,and it doesn't work without it in WSL2.It would be great to add this to the wiki next to https://github.com/James-Yu/LaTeX-Workshop/wiki/FAQ#using-latex-workshop-with-wsl! :-)