SublimeText / LaTeXTools

LaTeX plugin for Sublime Text
https://latextools.readthedocs.io/
2.01k stars 366 forks source link

Traditional Builder can't compile files with LuaLatex if the filename contains a control sequence #1544

Closed antimemeroko closed 2 years ago

antimemeroko commented 2 years ago

Make file feynmandiagram.tex:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz-feynman}

\begin{document}

\feynmandiagram [horizontal=a to b] {
  i1 -- [fermion] a -- [fermion] i2,
  a -- [gluon] b,
  f1 -- [fermion] b -- [fermion] f2,
};

\end{document}

Press Ctrl + Shift + B and choose 'LaTeX - LuaLaTeX'. Compile with Ctrl + B Expect compiled file 'feynmandiagram.pdf' However, no pdf-file is created. Console output:

[Compiling C:\tex\feynmandiagram.tex]

TraditionalBuilder: Engine: lualatex. Invoking texify... done.

Command results:
This is LuaTeX, Version 1.11.2 (MiKTeX 2.9.7250 64-bit) 
 restricted system commands enabled.
! Undefined control sequence.
<*> C:/tex\feynmandiagram
                      .tex
! I can't find file `C:/tex.tex'.
<*> C:/tex\feynmandiagram.tex

(Press Enter to retry, or Control-Z to exit)
Please type another input file name: 
! Emergency stop.
<*> C:/tex\feynmandiagram.tex

 270 words of node memory still in use:
   1 hlist, 39 glue_spec nodes
   avail lists: 2:12,3:1,4:1,5:3
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on texput.log.

Seems like a problem with string escaping. Same problem with filenames like alpha.tex, foo_item.tex etc.

LaTeX - PdfLaTeX, LaTeX - XeLaTeX and Basic Builder variants run normally.

antimemeroko commented 2 years ago

This is actually a problem of MiKTeX/texify, which was fixed for now. See https://github.com/MiKTeX/miktex/issues/486