3

Loading the datetime2 package with the showdow option creates a clash with the ctable package, at least for me. Without the showdow option there are no problems. The following MWE shows the error message and the output as comments in lines 12 and 13.

% !TeX program = lualatex 
% !TEX encoding = UTF-8 Unicode
% !TeX spellcheck = en_US

\documentclass{article}

\usepackage{ctable}
\usepackage[showdow,en-US]{datetime2}
%\usepackage[en-US]{datetime2} causes no problem

\begin{document}
Month: \DTMmonthname{2}.
%Error line 11: Undefined control sequence. \begin{document}
%Output: /TRP1«/ca1/CA 1» Month: February.
\end{document}
2
  • 1
    load also pgf: \usepackage{pgf} Feb 26 at 22:36
  • It works like a charm. Can you give a brief explanation, perhaps as an answer. Feb 27 at 9:10

1 Answer 1

4

The example can be reduced to this one:

\documentclass{article}

\usepackage{transparent} %loaded by ctable
\usepackage{pgfcalendar} %loaded by datetime

\begin{document}
blub
\end{document}

transparent must add transparency settings to a global dictionary inside the pdf (to the /ExtGState) and has to coordinate this with the pgf package that wants to add settings to this resource too (see https://tex.stackexchange.com/a/253417/2388 for a description why this is needed).

For this transparent checks if the pgf command \pgfutil@addpdfresource@extgs exists and uses it if yes. Sadly the pgfcalendar package loads only parts of the pgf files and so \pgfutil@addpdfresource@extgs exists but errors. A real solution would require that pgfcalendar loads at least pgfcore instead of only pgfrcs.

Work-arounds

load pgfcore or some package that loads it implicitly:

\documentclass{article}

\usepackage{transparent} %loaded by ctable
\usepackage{pgfcalendar} % loaded by datetime
\usepackage{pgfcore} %

\begin{document}
blub
\end{document}

Or use the LaTeX PDF management:

\DocumentMetadata{} %load PDF management
\documentclass{article}

\usepackage{transparent} %loaded by ctable
\usepackage{pgfcalendar} % loaded by datetime


\begin{document}
blub
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .