James-Yu / LaTeX-Workshop

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

Recipe Terminated with Fatal Error: Spawn #503

Closed brownem closed 6 years ago

brownem commented 6 years ago

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 of LatexMk 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:

Recipe terminated with fatal error: spawn

XeLaTeX+MakeIndex+BibTex ENOENT.

MakeIndex and BibTex are called by default inside of XeLaTeX, but not in the recipe. The ENOENT 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:136

Additional 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/
brownem commented 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.

James-Yu commented 6 years ago

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.

James-Yu commented 6 years ago

Another bug catch my eyes. It seems that the bibtex is missing in the recipe. I will look into it later.

James-Yu commented 6 years ago

By the way, do you have magic program comment defined in your source file?

brownem commented 6 years ago

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

Bibtex Bug Update ``` "latex-workshop.latex.tools": [ { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ], "name": "Step 1: xelatex" }, { "command": "imakeidx", "args": [ "%DOCFILE%" ], }, { "command": "bibtex", "args": [ "%DOCFILE%" ], "name": "Step 2: bibtex" }, { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ], "name": "Step 3: xelatex" }, { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ], "name": "Step 4: xelatex" } ], "latex-workshop.latex.recipes": [ { "name": "xelatex", "tools": [ "Step 1: xelatex", "Step 2: bibtex", "Step 3: xelatex", "Step 4: xelatex", ] } ], ```
Tex File Headers ``` %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Deedy CV/Resume % XeLaTeX Template % Version 1.0 (5/5/2014) % % This template has been downloaded from: % http://www.LaTeXTemplates.com % % Original author: % Debarghya Das (http://www.debarghyadas.com) % With extensive modifications by: % Vel (vel@latextemplates.com) % % License: % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/) % % Important notes: % This template needs to be compiled with XeLaTeX, MakeIndex, and BibTex. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % !TEX program = XeLaTeX+MakeIndex+BibTex \documentclass[letterpaper]{deedy-resume} % Use US Letter paper, change to a4paper for A4 \usepackage{paralist} \title{Resume.Title} \begin{document} %---------------------------------------------------------------------------------------- % TITLE SECTION %---------------------------------------------------------------------------------------- \lastupdated % Print the Last Updated text at the top right \namesection{First}{Last}{ % Your name http://url \\ % Your website, LinkedIn profile or other web address email@ | telephone % Your contact information } %---------------------------------------------------------------------------------------- % LEFT COLUMN %---------------------------------------------------------------------------------------- \begin{minipage}[t]{0.33\textwidth} % The left column takes up 33% of the text width of the page \vspace{-10pt} % % % \end{minipage} % The end of the left column \hfill % %---------------------------------------------------------------------------------------- % RIGHT COLUMN %---------------------------------------------------------------------------------------- % \begin{minipage}[t]{0.66\textwidth} % The right column takes up 66% of the text width of the page % % % \end{minipage} % The end of the right column \vspace{-5pt} %---------------------------------------------------------------------------------------- % SECOND PAGE (EXAMPLE) %---------------------------------------------------------------------------------------- %\newpage % Start a new page %\begin{minipage}[t]{0.33\textwidth} % The left column takes up 33% of the text width of the page %\section{Example Section} %\end{minipage} % The end of the left column %\hfill %\begin{minipage}[t]{0.66\textwidth} % The right column takes up 66% of the text width of the page %\section{Example Section 2} %\end{minipage} % The end of the right column %---------------------------------------------------------------------------------------- \end{document} ```
LaTeX Log ``` This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6500 64-bit) (preloaded format=pdflatex 2017.11.28) 2 APR 2018 21:39 entering extended mode **e:/Code/LaTeX/Resume/Resume.tex (e:/Code/LaTeX/Resume/Resume.tex LaTeX2e <2017-04-15> Babel <3.15> and hyphenation patterns for 75 language(s) loaded. (deedy-resume.cls Document Class: deedy-resume 2014/04/30 CV class ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\article.cls " Document Class: article 2014/09/29 v1.4h Standard LaTeX document class ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\size10.clo" File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) ) \c@part=\count79 \c@section=\count80 \c@subsection=\count81 \c@subsubsection=\count82 \c@paragraph=\count83 \c@subparagraph=\count84 \c@figure=\count85 \c@table=\count86 \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\geometry\geometr y.sty" Package: geometry 2010/09/12 v5.6 Page Geometry ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics\keyval. sty" Package: keyval 2014/10/28 v1.15 key=value parser (DPC) \KV@toks@=\toks14 ) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\ifpdf .sty" Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch ) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\ifvte x.sty" Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO) Package ifvtex Info: VTeX not detected. ) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\generic\ifxetex\ifxete x.sty" Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional ) \Gm@cnth=\count87 \Gm@cntv=\count88 \c@Gm@tempcnt=\count89 \Gm@bindingoffset=\dimen103 \Gm@wd@mp=\dimen104 \Gm@odd@mp=\dimen105 \Gm@even@mp=\dimen106 \Gm@layoutwidth=\dimen107 \Gm@layoutheight=\dimen108 \Gm@layouthoffset=\dimen109 \Gm@layoutvoffset=\dimen110 \Gm@dimlist=\toks15 ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\geometry\geometr y.cfg")) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\hyperref\hyperre f.sty" Package: hyperref 2017/03/14 v6.85a Hypertext links for LaTeX ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\hobsu b-hyperref.sty" Package: hobsub-hyperref 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\hobsu b-generic.sty" Package: hobsub-generic 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO) Package: hobsub 2016/05/16 v1.14 Construct package bundles (HO) Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO) Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO) Package ifluatex Info: LuaTeX not detected. Package hobsub Info: Skipping package `ifvtex' (already loaded). Package: intcalc 2016/05/16 v1.2 Expandable calculations with integers (HO) Package hobsub Info: Skipping package `ifpdf' (already loaded). Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) Package etexcmds Info: Could not find \expanded. (etexcmds) That can mean that you are not using pdfTeX 1.50 or (etexcmds) that some package has redefined \expanded. (etexcmds) In the latter case, load this package earlier. Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO) Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO) Package: pdftexcmds 2017/03/19 v0.25 Utility functions of pdfTeX for LuaTeX (HO ) Package pdftexcmds Info: LuaTeX not detected. Package pdftexcmds Info: \pdf@primitive is available. Package pdftexcmds Info: \pdf@ifprimitive is available. Package pdftexcmds Info: \pdfdraftmode found. Package: pdfescape 2016/05/16 v1.14 Implements pdfTeX's escape features (HO) Package: bigintcalc 2016/05/16 v1.4 Expandable calculations on big integers (HO ) Package: bitset 2016/05/16 v1.2 Handle bit-vector datatype (HO) Package: uniquecounter 2016/05/16 v1.3 Provide unlimited unique counter (HO) ) Package hobsub Info: Skipping package `hobsub' (already loaded). Package: letltxmacro 2016/05/16 v1.5 Let assignment for LaTeX macros (HO) Package: hopatch 2016/05/16 v1.3 Wrapper for package hooks (HO) Package: xcolor-patch 2016/05/16 xcolor patch Package: atveryend 2016/05/16 v1.9 Hooks at the very end of document (HO) Package atveryend Info: \enddocument detected (standard20110627). Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO) Package: refcount 2016/05/16 v3.5 Data extraction from label references (HO) Package: hycolor 2016/05/16 v1.8 Color options for hyperref/bookmark (HO) ) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\oberdiek\auxhook .sty" Package: auxhook 2016/05/16 v1.4 Hooks for auxiliary files (HO) ) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\oberdiek\kvoptio ns.sty" Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO) ) \@linkdim=\dimen111 \Hy@linkcounter=\count90 \Hy@pagecounter=\count91 ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\hyperref\pd1enc. def" File: pd1enc.def 2017/03/14 v6.85a Hyperref: PDFDocEncoding definition (HO) ) \Hy@SavedSpaceFactor=\count92 ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\00miktex\hyperre f.cfg" File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive ) Package hyperref Info: Hyper figures OFF on input line 4498. Package hyperref Info: Link nesting OFF on input line 4503. Package hyperref Info: Hyper index ON on input line 4506. Package hyperref Info: Plain pages OFF on input line 4513. Package hyperref Info: Backreferencing OFF on input line 4518. Package hyperref Info: Implicit mode ON; LaTeX internals redefined. Package hyperref Info: Bookmarks ON on input line 4751. \c@Hy@tempcnt=\count93 ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\url\url.sty" \Urlmuskip=\muskip10 Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. ) LaTeX Info: Redefining \url on input line 5104. \XeTeXLinkMargin=\dimen112 \Fld@menulength=\count94 \Field@Width=\dimen113 \Fld@charsize=\dimen114 Package hyperref Info: Hyper figures OFF on input line 6358. Package hyperref Info: Link nesting OFF on input line 6363. Package hyperref Info: Hyper index ON on input line 6366. Package hyperref Info: backreferencing OFF on input line 6373. Package hyperref Info: Link coloring OFF on input line 6378. Package hyperref Info: Link coloring with OCG OFF on input line 6383. Package hyperref Info: PDF/A mode OFF on input line 6388. LaTeX Info: Redefining \ref on input line 6428. LaTeX Info: Redefining \pageref on input line 6432. \Hy@abspage=\count95 \c@Item=\count96 \c@Hfootnote=\count97 ) Package hyperref Message: Driver (autodetected): hpdftex. ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\hyperref\hpdftex .def" File: hpdftex.def 2017/03/14 v6.85a Hyperref driver for pdfTeX \Fld@listcount=\count98 \c@bookmark@seq@number=\count99 ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\oberdiek\rerunfi lecheck.sty" Package: rerunfilecheck 2016/05/16 v1.8 Rerun checks for auxiliary files (HO) Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 82. ) \Hy@SectionHShift=\skip43 ) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\xcolor\xcolor.st y" Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics-cfg\col or.cfg" File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Package option `usenames' ignored on input line 216. Package xcolor Info: Driver file: pdftex.def on input line 225. ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics-def\pdf tex.def" File: pdftex.def 2017/06/24 v1.0g Graphics/color driver for pdftex ) Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348. Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352. Package xcolor Info: Model `RGB' extended on input line 1364. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371. ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics\dvipsna m.def" File: dvipsnam.def 2016/06/17 v3.0m Driver-dependent file (DPC,SPQR) )) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\fontspec\fontspe c.sty" ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\l3packages\xpars e\xparse.sty" ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\l3kernel\expl3.s ty" Package: expl3 2017/11/14 L3 programming layer (loader) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\l3kernel\expl3-c ode.tex" Package: expl3 2017/11/14 L3 programming layer (code) \c_max_int=\count100 \l_tmpa_int=\count101 \l_tmpb_int=\count102 \g_tmpa_int=\count103 \g_tmpb_int=\count104 \g__intarray_font_int=\count105 \g__prg_map_int=\count106 \c_log_iow=\count107 \l_iow_line_count_int=\count108 \l__iow_line_target_int=\count109 \l__iow_one_indent_int=\count110 \l__iow_indent_int=\count111 \c_zero_dim=\dimen115 \c_max_dim=\dimen116 \l_tmpa_dim=\dimen117 \l_tmpb_dim=\dimen118 \g_tmpa_dim=\dimen119 \g_tmpb_dim=\dimen120 \c_zero_skip=\skip44 \c_max_skip=\skip45 \l_tmpa_skip=\skip46 \l_tmpb_skip=\skip47 \g_tmpa_skip=\skip48 \g_tmpb_skip=\skip49 \c_zero_muskip=\muskip11 \c_max_muskip=\muskip12 \l_tmpa_muskip=\muskip13 \l_tmpb_muskip=\muskip14 \g_tmpa_muskip=\muskip15 \g_tmpb_muskip=\muskip16 \l_keys_choice_int=\count112 \c__fp_leading_shift_int=\count113 \c__fp_middle_shift_int=\count114 \c__fp_trailing_shift_int=\count115 \c__fp_big_leading_shift_int=\count116 \c__fp_big_middle_shift_int=\count117 \c__fp_big_trailing_shift_int=\count118 \c__fp_Bigg_leading_shift_int=\count119 \c__fp_Bigg_middle_shift_int=\count120 \c__fp_Bigg_trailing_shift_int=\count121 \c__fp_rand_size_int=\count122 \c__fp_rand_four_int=\count123 \c__fp_rand_eight_int=\count124 \l__sort_length_int=\count125 \l__sort_min_int=\count126 \l__sort_top_int=\count127 \l__sort_max_int=\count128 \l__sort_true_max_int=\count129 \l__sort_block_int=\count130 \l__sort_begin_int=\count131 \l__sort_end_int=\count132 \l__sort_A_int=\count133 \l__sort_B_int=\count134 \l__sort_C_int=\count135 \l__tl_build_start_index_int=\count136 \l__tl_build_index_int=\count137 \l__tl_analysis_normal_int=\count138 \l__tl_analysis_index_int=\count139 \l__tl_analysis_nesting_int=\count140 \l__tl_analysis_type_int=\count141 \l__regex_internal_a_int=\count142 \l__regex_internal_b_int=\count143 \l__regex_internal_c_int=\count144 \l__regex_balance_int=\count145 \l__regex_group_level_int=\count146 \l__regex_mode_int=\count147 \c__regex_cs_in_class_mode_int=\count148 \c__regex_cs_mode_int=\count149 \l__regex_catcodes_int=\count150 \l__regex_default_catcodes_int=\count151 \c__regex_catcode_D_int=\count152 \c__regex_catcode_S_int=\count153 \c__regex_catcode_L_int=\count154 \c__regex_catcode_O_int=\count155 \c__regex_catcode_A_int=\count156 \c__regex_all_catcodes_int=\count157 \l__regex_show_lines_int=\count158 \l__regex_min_state_int=\count159 \l__regex_max_state_int=\count160 \l__regex_left_state_int=\count161 \l__regex_right_state_int=\count162 \l__regex_capturing_group_int=\count163 \l__regex_min_pos_int=\count164 \l__regex_max_pos_int=\count165 \l__regex_curr_pos_int=\count166 \l__regex_start_pos_int=\count167 \l__regex_success_pos_int=\count168 \l__regex_curr_char_int=\count169 \l__regex_curr_catcode_int=\count170 \l__regex_last_char_int=\count171 \l__regex_case_changed_char_int=\count172 \l__regex_curr_state_int=\count173 \l__regex_step_int=\count174 \l__regex_min_active_int=\count175 \l__regex_max_active_int=\count176 \l__regex_replacement_csnames_int=\count177 \l__regex_match_count_int=\count178 \l__regex_min_submatch_int=\count179 \l__regex_submatch_int=\count180 \l__regex_zeroth_submatch_int=\count181 \g__debug_trace_regex_int=\count182 \c_empty_box=\box26 \l_tmpa_box=\box27 \l_tmpb_box=\box28 \g_tmpa_box=\box29 \g_tmpb_box=\box30 \l__box_top_dim=\dimen121 \l__box_bottom_dim=\dimen122 \l__box_left_dim=\dimen123 \l__box_right_dim=\dimen124 \l__box_top_new_dim=\dimen125 \l__box_bottom_new_dim=\dimen126 \l__box_left_new_dim=\dimen127 \l__box_right_new_dim=\dimen128 \l__box_internal_box=\box31 \l__coffin_internal_box=\box32 \l__coffin_internal_dim=\dimen129 \l__coffin_offset_x_dim=\dimen130 \l__coffin_offset_y_dim=\dimen131 \l__coffin_x_dim=\dimen132 \l__coffin_y_dim=\dimen133 \l__coffin_x_prime_dim=\dimen134 \l__coffin_y_prime_dim=\dimen135 \c_empty_coffin=\box33 \l__coffin_aligned_coffin=\box34 \l__coffin_aligned_internal_coffin=\box35 \l_tmpa_coffin=\box36 \l_tmpb_coffin=\box37 \l__coffin_display_coffin=\box38 \l__coffin_display_coord_coffin=\box39 \l__coffin_display_pole_coffin=\box40 \l__coffin_display_offset_dim=\dimen136 \l__coffin_display_x_dim=\dimen137 \l__coffin_display_y_dim=\dimen138 \l__coffin_bounding_shift_dim=\dimen139 \l__coffin_left_corner_dim=\dimen140 \l__coffin_right_corner_dim=\dimen141 \l__coffin_bottom_corner_dim=\dimen142 \l__coffin_top_corner_dim=\dimen143 \l__coffin_scaled_total_height_dim=\dimen144 \l__coffin_scaled_width_dim=\dimen145 ) ("C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\l3kernel\l3pdfmo de.def" File: l3pdfmode.def 2017/03/18 v L3 Experimental driver: PDF mode \l__driver_color_stack_int=\count183 \l__driver_tmp_box=\box41 )) Package: xparse 2017/11/14 L3 Experimental document command parser \l__xparse_current_arg_int=\count184 \g__xparse_grabber_int=\count185 \l__xparse_m_args_int=\count186 \l__xparse_mandatory_args_int=\count187 \l__xparse_v_nesting_int=\count188 ) Package: fontspec 2017/11/05 v2.6f Font selection for XeLaTeX and LuaLaTeX !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! C:\Users\brownem\AppData\Local\Programs\MiKTeX 2.9\tex\latex\fontspec\fontspec. sty:37: Fatal fontspec error: "cannot-use-pdftex" ! ! The fontspec package requires either XeTeX or LuaTeX. ! ! You must change your typesetting engine to, e.g., "xelatex" or ! "lualatex"instead of plain "latex" or "pdflatex". ! ! See the fontspec documentation for further information. ! ! For immediate help type H |''''''''''''''''''''''''''''''''''''''''''''''' | This is a fatal error: LaTeX will abort. |............................................... ) ) ) Here is how much of TeX's memory you used: 13251 strings out of 493312 246532 string characters out of 3128956 309802 words of memory out of 3000000 16795 multiletter control sequences out of 15000+200000 530272 words of font info for 22 fonts, out of 3000000 for 9000 1141 hyphenation exceptions out of 8191 46i,1n,37p,10436b,275s stack positions out of 5000i,500n,10000p,200000b,50000s No pages of output. PDF statistics: 0 PDF objects out of 1000 (max. 8388607) 0 named destinations out of 1000 (max. 500000) 1 words of extra memory for PDF output out of 10000 (max. 10000000) ```
lucasxlu commented 6 years ago

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! image

But it works well on pre-V5.0 extension.

brownem commented 6 years ago

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?

James-Yu commented 6 years ago

% !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.

brownem commented 6 years ago

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?

James-Yu commented 6 years ago

From your compiler log it is obvious that pdflatex is used. Extension log is required if you want to know which command is executed.

brownem commented 6 years ago

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.

Tools ``` "latex-workshop.latex.tools": [ { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ], "name": "Step 1: xelatex" }, { "command": "imakeidx", "args": [ "%DOCFILE%" ], }, { "command": "bibtex", "args": [ "%DOCFILE%" ], "name": "Step 2: bibtex" }, { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ], "name": "Step 3: xelatex" }, { "command": "xelatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ], "name": "Step 4: xelatex" } ], ```
Recipe ``` "latex-workshop.latex.recipes": [ { "name": "xelatex", "tools": [ "Step 1: xelatex", // "Step 2: bibtex", // "Step 3: xelatex", // "Step 4: xelatex", ] } ], ```