4

If I run the example below with LuaLaTeX, the transparent package doesn't load with the error: Package transparent Warning: Your pdfTeX version does not support color stacks. (a pretty clear error message)

\documentclass{minimal}
\usepackage{transparent}

\begin{document}
\transparent{0.5}{Ciao}
\end{document}

I have a bunch of images generated by Inkscape which contain the \transparent command, and at the moment I simply defined an empty \transparent command to avoid the error, but I'd like to know if there's a better workaround to maintain the transparency.

1 Answers1

5

You should not use minimal (see Why should the minimal class be avoided?).

Two alternatives:

  1. standalone

    \documentclass{standalone}
    \usepackage{transparent}
    
    \begin{document}
    \transparent{0.5}{Ciao}
    \end{document}
    
  2. article with the luatex85 package:

    \RequirePackage{luatex85}
    \documentclass{article}
    \usepackage{transparent}
    
    \begin{document}
    \transparent{0.5}{Ciao}
    \end{document}
    
TeXnician
  • 33,589
  • Thank you, but the complete document is based on another class, toptesi, which I think is based on the class report. Adding the luatex85 package in this case doesn't remove the error. – Massimo Ortolano Sep 12 '18 at 14:28
  • @MassimoOrtolano For me, it does (add the luatex85 package, remove auxiliary files, recompile twice). I'm on TL2018 with LuaLaTeX 1.07. – TeXnician Sep 12 '18 at 14:30
  • Ah, yes, with the MWE it works but not with the full document. I gotta go now, but I'll investigate more later on. – Massimo Ortolano Sep 12 '18 at 14:37
  • @MassimoOrtolano Well, I just tried with toptesi and the procedure I described does work on an MWE with that class. – TeXnician Sep 12 '18 at 14:42
  • I'll try and get the package updated in the next few days so luatex85 is not needed (luatex85 should never be needed:-) – David Carlisle Sep 12 '18 at 14:53
  • @DavidCarlisle Should is such a nice word :) – TeXnician Sep 12 '18 at 14:55
  • Ok, I've eventually figured out why this solution didn't work with the full document: that document also included the package pdfx which apparently undefined the \transparent command. I removed the package pdfx (which is actually not needed) and now everything works fine. Thanks again! – Massimo Ortolano Sep 12 '18 at 16:57
  • 1
    @MassimoOrtolano You're welcome. Yes, it's good that pdfx removes that, because in PDF/X transparency is unsupported. – TeXnician Sep 12 '18 at 16:58