Closed Astrantia closed 5 years ago
I wonder if the changes introduced in https://github.com/James-Yu/LaTeX-Workshop/issues/796 broke this for me.
view demo here: https://i.imgur.com/F4osqqe.gifv
Mine works well 10 seconds ago. May you please share your log messages and/or project?
@James-Yu I think this might be related with custom output dir again, let me test.
Yeah, no need to debug and troubleshoot further. @James-Yu It doesn't respect custom output dir. Just like with the PDF Viewer, try setting dir to ./dist in toolchain and in latex settings and you will see this happen
"latex-workshop.latex.outputDir": "./dist"
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": ["-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdf", "%DOC%", "-output-directory=dist"]
}
]
@James-Yu Were you able to reproduce this?
I'm yet to find a time to sit down and turn to this project. Soon (TM).
Unfortunately, I cannot reproduce the problem given your settings above. I'm afraid a minimal working example is required for further debugging.
Can you post the LaTeX compiler output from the output pane? This might be related to item 3 here.
@jlelong
The issue is only when I have custom output directory settings turned on. It works fine if the build path is just ./
Your latexmk
log is hard wrapped at 80 characters, which should not be. Can you just change the recipe to run pdflatex --max_print_line=10000
and compare the output (this time, lines should not broken) and the problems pane?
Yet I don't understand why it works when the build path is ./
.
@jlelong fixed my issue, also it is --max-print-line
, not _
.
I don't understand why its different with build path ./
I'm okay with this hack, but do you plan to implement a more robust fix? @jlelong
I would like to but the problem only occurs on Windows with some versions of Miktex and I am running OS X. So it is a bit tricky
@Astrantia, can you give the output of pdflatex --version
?
@James-Yu, same question
I am thinking about going from the environment variable approach to the --max-print-line
option for recent versions of Miktex. Need help to figure out the version in which it was changed.
Thanks @jlelong Here's version
pdflatex: warning: running with administrator privileges
MiKTeX-pdfTeX 2.9.6668 (1.40.19) (MiKTeX 2.9.6800 64-bit)
Copyright (C) 1982 D. E. Knuth, (C) 1996-2018 Han The Thanh
TeX is a trademark of the American Mathematical Society.
using bzip2 version 1.0.6, 6-Sept-2010
compiled with curl version 7.56.1; using libcurl/7.56.1 WinSSL
compiled with expat version 2.2; using expat_2.2.0
compiled with jpeg version 9.2
compiled with liblzma version 50020032; using 50020032
compiled with libpng version 1.6.34; using 1.6.34
compiled with libressl version LibreSSL 2.5.3; using LibreSSL 2.5.3
compiled with MiKTeX Application Framework version 3.6802; using 3.6802
compiled with MiKTeX Core version 8.6811; using 8.6811
compiled with MiKTeX Archive Extractor version 1.6300; using 1.6300
compiled with MiKTeX Package Manager version 3.6810; using 3.6810
compiled with poppler version 0.60.1
compiled with uriparser version 0.8.4
compiled with zlib version 1.2.11; using 1.2.11
I work with TeXLive even on Windows, tho @Astrantia seems gave a good demo of MikTeX.
pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017/W32TeX)
kpathsea version 6.2.3
Copyright 2017 Han The Thanh (pdfTeX) et al.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.29; using libpng 1.6.29
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with xpdf version 3.04
I have just made an attempt to fix. @Astrantia and @James-Yu can you pull the max-print-line branch and test it?
@jlelong Can't compile
[5:55:49 PM] Starting compilation in watch mode...
src/components/builder.ts:230:21 - error TS2532: Object is possibly 'undefined'.
230 step.args.unshift('--max-print-line=' + maxPrintLine)
~~~~~~~~~
[5:55:51 PM] Found 1 error. Watching for file changes.
I have just fixed it. Hopefully! Can you give it a try?
@jlelong works for me now, thanks!
This is merged into master.
Adding --max-print-line as a fix for this is not really a fix. It is customary for log output files to only be 80 characters wide. I believe this issue is related to one I opened #866. I found the problem to be the regex parsing of the log file was too strict.
adding this option breaks any command that uses it and hard coding it in is not good practice. No other latex tool has to add this option for the problems to be found. I have found the fix for -max-print-lines for lualatex builds from #885 doesn't fully work. The fix only looks for the -lualatex
, or similar command, but I can also use -pdflatex=lualatex
to change how latexmk works, and so the --max-print-line option is still breaking commands.
I even found that most of the logs not showing up in the problems pane can be fixed by changing the regex for parsing the log.
Description
Compilation errors are no longer displayed in the problems pane view.
Log messages
I couldn't find log messages for this. How can I troubleshoot/debug it?
LaTeX Workshop Output
Developer Tools Console
How to reproduce
Expected behavior
Errors should appear in problems as it used to earlier. I think it's quite some time this is broken now.
Actual behavior
Additional Information
I'm using Windows 10 and vscode insiders with the latest latex extension.
cc @James-Yu cc @jlelong