9

This code works fine with pdflatex

\documentclass[convert]{standalone}
\begin{document}
    $y=mx+c$
\end{document}

however, when compiling using lualatex, it fails showing up an error

Fatal error occurred, no output PDF file produced!

\RequirePackage{luatex85}
\documentclass[convert]{standalone}
\begin{document}
    $y=mx+c$
\end{document}

knowing that I am using Texlive on Win10 x64.

  • 1
    The newest standalone version v1.3a from 2018-03-26 fixes this problem. Should be part of MikTeX soon. As TeXLive 2017 is already frozen either wait for TeXLive 2018 or install the TDS file manually. – Martin Scharrer Mar 27 '18 at 17:47
  • @MartinScharrer Thanks for letting me know. Now working flawlessly! – Diaa Mar 27 '18 at 22:15
9

That's because standalone is still using \write18 for shell escape. Just don't use standalone, it's broken in too many places (in my opinion).

You can trick standalone into thinking that traditional shell escape is available.

\RequirePackage{luatex85}
\RequirePackage{shellesc}
\newcount\pdfshellescape
\pdfshellescape=1 % unrestricted shell-escape
\documentclass[convert]{standalone}
\begin{document}
    $y=mx+c$
\end{document}

enter image description here

| improve this answer | |
  • Many thanks for your answer. For your statement Just don't use standalone, what else can I use for cropping the output and converting it to different image files? – Diaa Jan 22 '18 at 1:44
  • 2
    I usually use \documentclass{article}\pagestyle{empty} to compile, then I crop using pdfcrop and finally I convert to png using mutool draw. But I'm on Linux, so I just have shell script for all those steps. – Henri Menke Jan 22 '18 at 1:49
  • 1
    Henri, @Diaa: Alternative opinion: Don't use LuaTeX as it is broken in too many places. ;-) It's LuaTeX's fault to not be backwards compatible not the one of packages. On the other hand: The update to use shellesc in standalone is already in the code repository and will be part of the next release (which indeed got quite delayed as I'm quite busy otherwise). – Martin Scharrer Mar 21 '18 at 8:58
  • 1
    Henri, @Diaa: I pushed the new version to CTAN yesterday. It is live there already and should be installable with the distributions in the next 1-2 days. – Martin Scharrer Mar 25 '18 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.