James-Yu / LaTeX-Workshop

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

Can't compile after any latex compiler error #1394

Closed jotagah closed 5 years ago

jotagah commented 5 years ago

I think there is some issues from the same subject, but asked me to start a new issue.

So, on any compilation error from any recipe I choose the LATEX Compilation Live Info shows a still running process and I am not able to terminate the process "by calling Kill LaTeX compiler process from the Command Palette or calling Terminate current compilation from the TeX badge in the Build LaTeX project item" -- both fail to succeed.

After that issue and pressing Cntrl+Alt+B I got:

[15:41:58] BUILD command invoked. [15:41:58] Found root file by magic comment: /home/jhissa/Documents/Ensino/CEFET-MG/Circuitos/Beamer/CE2019-1.tex [15:41:58] Root file remains unchanged from: /home/jhissa/Documents/Ensino/CEFET-MG/Circuitos/Beamer/CE2019-1.tex. [15:41:58] Building root file: /home/jhissa/Documents/Ensino/CEFET-MG/Circuitos/Beamer/CE2019-1.tex [15:41:58] Another LaTeX build processing is already waiting for the current LaTeX build to finish. Exit.

I have to close and restar MS Code to proceed.

Sometimes I got the message:

[13:50:35] BUILD command invoked. [13:50:35] Cannot find LaTeX root file.

So, same as before, only restarting VS Code to proceed with a new compilation.

This is an annoying issue.

Thanks,

JHissa

seragunn commented 5 years ago

Can you say what version of the extension you are using? And also post what recipes (latex-workshop.latex.recipes) and tools (latex-workshop.latex.tools) you have configured in you settings?

I know that latexmk -interaction=nonstopmode will exit if there is an error in the file. pdflatex does not seem to behave the same and waits for input if there is an error.\

Scratch that, both latexmk and pdflatex respect the nonstopmode flag except if pdflatex is called by itself (in bash) rather than from another program (like latexmk). Still, my point is: make sure your tools include the -interaction=nonstopmode flag.

jotagah commented 5 years ago

I'm using LaTeX Workshop 7.0.0 and VS Code 1.34.0 on an Ubuntu 18.4.

My recipes and tools are:

"latex-workshop.latex.recipes": [ { "name": "latexmk", "tools": [ "latexmk" ] }, { "name": "arara", "tools": [ "arara" ] }, { "name": "pdflatex -> biber -> pdflatex*2", "tools": [ "pdflatex", "biber", "pdflatex", "pdflatex" ] } ], "latex-workshop.latex.tools": [ { "name": "latexmk", "command": "/opt/texlive/2018/bin/x86_64-linux/latexmk", <--- same issue without this "args": [ "-synctex=1", "-file-line-error", -interaction=nonstopmode", "-pdf", "%DOC%" ], "env": {} }, { "name": "pdflatex", "command": "pdflatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] }, { "name": "arara", "command": "arara", "args": [ "%DOCFILE%" ] }, { "name": "biber", "command": "biber", "args": [ "%DOCFILE%" ] } ],

Thanks,

JHissa

seragunn commented 5 years ago

You changed it for pdflatex, but not latexmk. You need to add that flag to latexmk so that it passes it to pdflatex (this is important because latexmk is your default recipe). Possibly arara too; I'm not familiar with that program.

jotagah commented 5 years ago

I apologize my mistake. Changed.

But I got the same issue ... after a compilation error I can not compile without close and restart VS Code.

tamuratak commented 5 years ago

Please show us the whole log messages, not parts of ones, as requested in the instruction of the bug report template. Please show us the whole parts of a LaTeX Workshop log and a LaTeX compiler log.

2018-11-07 20 34 24

Thank you for your cooperation.

seragunn commented 5 years ago

Are you able to reproduce this behaviour with the default recipes and tool settings (the ones that came with the extension)? And also with a clean project (sometimes things are left in some of the intermediate files that break how the extension works). Ideally a small project with minimal complexity.

tamuratak commented 5 years ago

@trevorgunn, please ask users to show us the whole log messages at first.

jlelong commented 5 years ago

The issue does not contain enough information to investigate the problem. I am closing it until more information is provided.