Closed brownem closed 6 years ago
I would settles to know more about the error message itself. I can guess that right now the recipe isn't properly calling the XeLaTeX+MakeIndex+BibTex combo, but spawn
and ENOENT
has me scratching my head.
spawn
is the nodejs method to spawn a child process of the given process. ENOENT is more commonly seen when the binary cannot be found. However that would be absurd if the transition is automatic and no other changes are made. It seems that the extension somehow try to spawn the command XeLaTeX+MakeIndex+BibTex
instead of one by one, which is more than a surprise given that the recipe look good. I am on vacation now so I may need more time to debug. Though I'd thank you for providing so complete information.
Another bug catch my eyes. It seems that the bibtex
is missing in the recipe. I will look into it later.
By the way, do you have magic program comment defined in your source file?
Yeah, I spotted the bibtex bug late yesterday (don't know how I missed it) and corrected it, but no change to the error. Updated Recipe and Tools are attached below.
At first, I didn't think I had any magic comment, but then I took a closer look. What would be line 22 seems to have one % !TEX program = XeLaTeX+MakeIndex+BibTex
. I've also attached the 'main' type setting portions of the Tex file in case you see something. All other portions are pretty standard LaTeX commands; sections, subsections, lists and items, special characters like \&
. Only thing that seems to be non-standard is a command called \textbullet{}
which does exactly what it sounds like, but allows text to exist before and after it, so you can use it as a kind of visual separator in a horizontal bullet list.
Deleting the !
from the % !Tex...
magic comment to turn it into a 'regular' comment doesn't resolve the issue, but does at least change the error. Sorta.
Starts with the warning:
Recipe terminated with error. Retry building the project.
And then immediately followed up by the error:
Recipe terminated with error.
However, if I then close these errors and try re-building the document a second time, it succeeds. Sorta. Nothing actually updates in the PDF, even when I make obvious changes (such as to the name space at the top of the document). The \lastupdated
command also gives away that nothing was changed, as the date stays the same.
Putting the !
back in returns it to the old Recipe terminated with fatal error: spawn
.
Adding spaces into % !TEX program = XeLaTeX+MakeIndex+BibTex
to turn it into % !TEX program = XeLaTeX + MakeIndex + BibTex
generates all three errors when the !
is in, and only the latest two (Recipe terminated with error
) when you take the !
out and leave the spaces in.
It certainly seems like the magic comment does have something to do with this error, but I think something else might be going on in the background as well.
In all instances, no errors are actually written to the output, nor does VSC report any problems. I've attached the log file
Recipe terminated with error. Retry building the project.
THX for developing such a convenient extension for writing LaTeX. However, when I update to V5.0.3 and build my tex file, it always reports error information "Recipe terminated with error. Retry building the project".
The citations cannot be imported either!
But it works well on pre-V5.0 extension.
How are you trying to build your citations @EclipseXuLu? Is it with bibtex as well? Anything 'special' or unusual about it, or similar to the way its called in my tex file?
% !TEX program
is not suppose to run with a combination of random commands. Use it with xelatex
, pdflatex
or similar commands instead of command1+command2
, which is not parsed.
When you removed the magic comment, the extension by default uses latexmk
, which uses pdflatex
, which cannot be used in your template as suggested by the compiler log. You may want to try xelatex
only.
But when I removed the magic comment, making it a regular comment, shouldn't it have used the recipe that I have declared, that uses XeLaTeX? Or am I missing something about the new recipe work flow?
From your compiler log it is obvious that pdflatex
is used. Extension log is required if you want to know which command is executed.
Alright, figured out the final bits that were confounding me (for the record, in case someone else runs into the same thing):
It was partly me forgetting to disable a comment in my custom recipe (actually running XeLaTeX is helpful), and it was partly Bibtex. Having Bibtex enabled when running XeLaTeX causes some issues with building the document (unclear if it is LaTeX Workshop, or just LaTeX, but I didn't have any issue calling it in other development environments). So I commented out Bibtex from this recipe, but left it in my tools.
This new recipe system is certainly interesting, opens up the possibility of creating a bunch of select-able compilations for different documents. My tools and this particular recipe are attached at the bottom. I'll probably do a little cleaning and give things better names, but this combo works very smoothly.
Description
Just upgraded to the latest version of Latex Workshop, which switched me from the Toolchain method to the recipe method. I let the update process automatically update my settings to the new process, but something seems to have gone wrong. Building a latex document results in a termination of the recipe without anything being accomplished. Error reason: "Spawn".
I've tried googling around to find something that will point me in the right direction, but have come up empty.
How to reproduce
Uses the deedy-resume.cls, which requires the Tex document to use XeLaTeX and MikTex for compilation.
paralist
is the only other package in use, and is called in the .Tex file. Previously I had been forcing XeLaTex use through either modification ofLatexMk
file, or the old Tool Chain (depending on which behaved better with the latest update to Latex Workshop).The default recipe does not result in the creation of a PDF. Use of a custom recipe does not result in a PDF. I've played around with the recipe, commenting out parts, renaming, adding and removing, defaulting back to
LatexMk
(modified and unmodified). No change in the error output.Expected behavior
Compilation of a PDF for output
Actual behavior
CTRL+ALT+B
generates the following error message:MakeIndex
andBibTex
are called by default inside ofXeLaTeX
, but not in the recipe. TheENOENT
catches my attention, but I am unsure what its significance might be.Log messages
LaTeX Workshop Output
_No problems reported_Developer Tools Console
_Probably unrelated_ [Extension Host] Activating extension `maxerbox.vscode-discord` failed: command 'discord.enable' already exists t.log @ console.ts:136Additional Information
deedyresume.cls
%---------------------------------------------------------------------------------------- % CLASS OPTIONS AND REQUIRED PACKAGES %---------------------------------------------------------------------------------------- \ProvidesClass{deedy-resume}[2014/04/30 CV class] \NeedsTeXFormat{LaTeX2e} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} \ProcessOptions\relax \LoadClass{article} \usepackage[hmargin=1.25cm, vmargin=0.75cm]{geometry} % Specifies horizontal and vertical page margins \usepackage{hyperref} % Required for links %---------------------------------------------------------------------------------------- % COLORS %---------------------------------------------------------------------------------------- \usepackage[usenames,dvipsnames]{xcolor} % Required for custom colors \definecolor{primary}{HTML}{2b2b2b} % The primary document color for content text \definecolor{headings}{HTML}{6A6A6A} % The color of the large sections \definecolor{subheadings}{HTML}{333333} % The color of subsections and places worked/studied \definecolor{date}{HTML}{666666} % The color used for the Last Updated text at the top right %---------------------------------------------------------------------------------------- % FONTS %---------------------------------------------------------------------------------------- \usepackage{fontspec} % Required for specifying custom fonts in XeLaTeX \setmainfont[Color=primary, Path = fonts/lato/,BoldItalicFont=Lato-RegIta,BoldFont=Lato-Reg,ItalicFont=Lato-LigIta]{Lato-Lig} % The primary font for content text; defines bold, italic and bold-italic as well \setsansfont[Scale=MatchLowercase,Mapping=tex-text, Path = fonts/raleway/]{Raleway-ExtraLight} % The font used where \sfffamily is called %---------------------------------------------------------------------------------------- % LAST UPDATED COMMAND %---------------------------------------------------------------------------------------- \usepackage[absolute]{textpos} % Required for positioning the Last Updated text at the top right of the page \usepackage[UKenglish]{isodate} % Prints the Last Updated date in UK English format \setlength{\TPHorizModule}{0.01\paperwidth} % Sets the units for the horizontal position used in the \begin{textblock} argument \setlength{\TPVertModule}{0.01\paperwidth} % Sets the units for the vertical position used in the \begin{textblock} argument \newcommand{\lastupdated}{ % Create a new command for printing the Last Updated text \begin{textblock}{25}(75,2) % The position of the Last Updated text on the page (75% of the page across, 2% down) \color{date}\fontspec[Path = fonts/raleway/]{Raleway-ExtraLight}\fontsize{8pt}{10pt}\selectfont % Text styling of the text Last Updated on \today % Last Updated text \end{textblock}} %---------------------------------------------------------------------------------------- % MAIN HEADING COMMAND %---------------------------------------------------------------------------------------- \newcommand{\namesection}[3]{ % Defines the command for the main heading \centering{ % Center the name \fontsize{40pt}{60pt} % Font size \fontspec[Path = fonts/lato/]{Lato-Hai}\selectfont #1 % First name font \fontspec[Path = fonts/lato/]{Lato-Lig}\selectfont #2 % Last name font } \\[5pt] % Whitespace between the name and contact information \centering{ % Center the contact information \color{headings} % Use the headings color \fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{14pt}\selectfont #3} % Contact information font \noindent\makebox[\linewidth]{\color{headings}\rule{\paperwidth}{0.4pt}} % Horizontal rule \vspace{-5pt} % Reduce whitespace after the rule slightly } %---------------------------------------------------------------------------------------- % SECTION TITLE STYLING AND SPACING %---------------------------------------------------------------------------------------- \usepackage{titlesec} % Required for customizing section/subsection/etc titles \titlespacing{\section}{0pt}{0pt}{0pt} % Removes the spacing around the main section titles \titlespacing{\subsection}{0pt}{0pt}{0pt} % Removes the spacing around the subsections \newcommand{\sectionspace}{\vspace{8pt}} % Defines a command to add a set amount of space after sections and subsections \titleformat{\section}{ % Customize the large section titles \color{headings}\scshape\fontspec[Path = fonts/lato/]{Lato-Lig}\fontsize{16pt}{24pt}\selectfont \raggedright\uppercase}{}{0em}{} \titleformat{\subsection}{ % Customize the subsections and places worked/studied titles \color{subheadings}\fontspec[Path = fonts/lato/]{Lato-Bol}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase}{}{0em}{} \newcommand{\runsubsection}[1]{ % Used for creating subsections where a description is required on the same line \color{subheadings}\fontspec[Path = fonts/lato/]{Lato-Bol}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase {#1} \normalfont} \newcommand{\descript}[1]{ % Used for describing the subsection either on the same line or underneath \color{subheadings}\raggedright\scshape\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\} \normalfont} \newcommand{\location}[1]{ % Used for specifying a duration and/or location under a subsection \color{headings}\raggedright\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{10pt}{12pt}\selectfont {#1\\} \normalfont} %---------------------------------------------------------------------------------------- % SECTION TITLE STYLING AND SPACING %---------------------------------------------------------------------------------------- \newenvironment{tightitemize} % Defines the tightitemize environment which modifies the itemize environment to be more compact {\vspace{-\topsep}\begin{itemize}\itemsep1pt \parskip0pt \parsep0pt} {\end{itemize}\vspace{-\topsep}}LaTeX Workshop Custom Recipe
``` "latex-workshop.latex.tools":` [ { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%.tex" ], "name": "Step 1: xelatex" }, { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%.tex" ], "name": "Step 2: xelatex" }, { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%.tex" ], "name": "Step 3: xelatex" } ], "latex-workshop.latex.recipes": [ { "name": "toolchain", "tools": [ "Step 1: xelatex", "Step 2: xelatex", "Step 3: xelatex", ] } ], ```Old Latex Workshop Toolchain
``` "latex-workshop.latex.toolchain": [ { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] }, { "command": "bibtex", "args": [ "%DOCFILE%" ] }, { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] }, { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] } ], ```Modified LatexMk
_Selectively enabled by changing file extension to/from .txt (disabled) or [null] (enabled)_ $pdflatex=q/xelatex -synctex=1 %O %S/