5

If you compile with tl2016 lualatex this MWE

    \documentclass[10pt, xcolor=svgnames, x11names,  t]{beamer} 

    \usepackage{etoolbox}
    \usepackage{ifluatex}

\ifluatex
    \usepackage[no-math]{fontspec}
    \usepackage[EU2]{fontenc}
    \usepackage{lualatex-math}
\else
    \usepackage[utf8]{inputenc}  
    \usepackage[T1]{fontenc}
\fi

    \usepackage{mathtools}
    \usepackage{amsfonts}
    \usepackage{amssymb}
    \usepackage{bm}
\ifluatex
    \setsansfont[Ligatures=TeX,
    ItalicFont={MyriadPro-SemiCnIt.otf},
    BoldFont={MyriadPro-BoldSemiCn.otf},
    BoldItalicFont={MyriadPro-BoldSemiCnIt.otf},
    SmallCapsFont={Delicious-SmallCaps.otf}
    ]{MyriadPro-SemiCn.otf}                                 

\else
    \usefonttheme{professionalfonts}
    \usepackage[condensed, scale]{tgheros}
\fi 
\normalfont

\usepackage[listings,theorems,skins, raster, breakable]{tcolorbox}

\ifluatex
\newtcblisting{mydocument}{%
  left skip=-4.2pt,width=1.01\linewidth, sharp corners,%
  beforeafter skip=0.5\baselineskip,%
  leftlower=0pt,rightlower=0pt,%
  lower separated=false,middle=0pt,%
  colframe=blue, enhanced, %
  interior style={top color=yellow!5!white,bottom color=yellow!5!white},%
  righthand width=4cm,halign=left,%
  pdf comment,%
  listing side comment,%
  compilable listing,%
  run lualatex}
\else
\newtcblisting{mydocument}{%
  left skip=-4.2pt,width=1.01\linewidth, sharp corners,%
  beforeafter skip=0.5\baselineskip,%
  leftlower=0pt,rightlower=0pt,%
  lower separated=false,middle=0pt,%
  colframe=blue, enhanced, %
  interior style={top color=yellow!5!white,bottom color=yellow!5!white},%
  righthand width=4cm,halign=left,%
  pdf comment,%
  listing side comment,%
  compilable listing,%
  run pdflatex}
\fi


\begin{document}
\begin{frame}[fragile]{TCB}
\begin{mydocument}
\documentclass[border=10pt]{standalone}
\begin{document}
Hello%
world.

Hello
world.
\end{document}
\end{mydocument}
\end{frame}
\end{document}

you have this error:

    Package tcolorbox Error: PDF file `mwebeamersans-listin
g-1.pdf' not found.

The file name is mewbeamersans.tex. With pdflatex the compilation is ok. With TL2015 and lualatex also the compilation is ok. Any help?

  • As far as a I know: \usepackage{luatex85} – user31729 Jun 12 '16 at 20:28
  • No, the error is the same after load luatex85 package. – jpayansomet Jun 12 '16 at 20:41
  • I compiled your document (after commenting the fonts) and it works out of the box with lualatex – user31729 Jun 12 '16 at 20:44
  • Sorry. You need to delete all aux files (specially mwebeamersans-listing-1.texfile) before to compile with lualatex plus TL2016. I have tested again and I have the same error (after commenting the fonts) – jpayansomet Jun 12 '16 at 20:49
  • You need \usepackage{shellesc}; however there are problems with standalone that I'm trying to isolate. – egreg Jun 12 '16 at 21:00
4

It's better to minimize the example.

The error appears also with

\documentclass[10pt, xcolor=svgnames, x11names,  t]{beamer} 

\usepackage{fontspec}

\usepackage[listings,theorems,skins, raster, breakable]{tcolorbox}

\newtcblisting{mydocument}{%
  left skip=-4.2pt,width=1.01\linewidth, sharp corners,%
  beforeafter skip=0.5\baselineskip,%
  leftlower=0pt,rightlower=0pt,%
  lower separated=false,middle=0pt,%
  colframe=blue, enhanced, %
  interior style={top color=yellow!5!white,bottom color=yellow!5!white},%
  righthand width=4cm,halign=left,%
  pdf comment,%
  listing side comment,%
  compilable listing,%
  run lualatex}

\begin{document}
\begin{frame}[fragile]{TCB}
\begin{mydocument}
\documentclass[border=10pt]{standalone}
\begin{document}
Hello%
world.

Hello
world.
\end{document}
\end{mydocument}
\end{frame}
\end{document}

if compiled with lualatex -shell-escape. You need to add \usepackage{shellesc}, but you also need some adjustment for standalone, because it has not been updated to take into consideration that \pdfpagewidth and \pdfpageheight have been renamed to \pagewidth and \pageheight.

This can be solved by using a file named standalone.cfg in the same directory as your main file containing

\ifdefined\pdfpagewidth
\else
  \let\pdfpagewidth\pagewidth
  \let\pdfpageheight\pageheight
\fi

You can produce it automatically if you use filecontents:

\begin{filecontents}{standalone.cfg}
\ifdefined\pdfpagewidth
\else
  \let\pdfpagewidth\pagewidth
  \let\pdfpageheight\pageheight
\fi
\end{filecontents}

\documentclass[10pt, xcolor=svgnames, x11names,  t]{beamer} 

\usepackage{shellesc}
\usepackage{fontspec}

\usepackage[listings,theorems,skins, raster, breakable]{tcolorbox}

\newtcblisting{mydocument}{%
  left skip=-4.2pt,width=1.01\linewidth, sharp corners,%
  beforeafter skip=0.5\baselineskip,%
  leftlower=0pt,rightlower=0pt,%
  lower separated=false,middle=0pt,%
  colframe=blue, enhanced, %
  interior style={top color=yellow!5!white,bottom color=yellow!5!white},%
  righthand width=4cm,halign=left,%
  pdf comment,%
  listing side comment,%
  compilable listing,%
  run lualatex}

\begin{document}
\begin{frame}[fragile]{TCB}
\begin{mydocument}
\documentclass[border=10pt]{standalone}
\begin{document}
Hello%
world.

Hello
world.
\end{document}
\end{mydocument}
\end{frame}
\end{document}

enter image description here

An alternative to writing standalone.cfg is to add

\RequirePackage{luatex85}

to the document you want to compile

\begin{mydocument}
\RequirePackage{luatex85}
\documentclass[border=10pt]{standalone}
\begin{document}
Hello%
world.

Hello
world.
\end{document}
\end{mydocument}
  • Thanks egreg. But which is the reason that there is not any problem with TL2015? – jpayansomet Jun 12 '16 at 21:36
  • @jpayansomet TL 2015 has LuaTeX 0.80, whereas TL 2016 has LuaTeX 0.95 that underwent several changes. – egreg Jun 12 '16 at 21:39
  • yes, I know. But it seems a new problem. I have checked the time compilation with LuaTeX 0.9 is less than LuaTeX 0.8. I suppose there will be a lot of benefits more, but... – jpayansomet Jun 12 '16 at 21:43
  • This has already been reported bitbucket.org/martin_scharrer/standalone/issues/23/… – David Carlisle Jun 12 '16 at 21:44
  • @jpayansomet luatex is beta software and the maintainers do not try to maintain compatibility with older versions (or with tex) luatex has changed radically several commands being renamed, several being removed, and internal lua interfaces changing. Not all packages have been updated yet – David Carlisle Jun 12 '16 at 21: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.