# conflict between ctable and csvsimple?

The following MWE produces an error upon compilation:

\documentclass{article}
\usepackage{ctable}
\usepackage{csvsimple}
\begin{document}
test
\end{document}


The error is:

! Undefined control sequence.
\pgfutil@addpdfresource@extgs ...urce@extgs@plain
{#1}


What is going on here, and how can it be fixed?

## 2 Answers

This is not a csvsimple problem, but a conflict between ctable and pgfrcs which loads pgfutil-common.tex.

An MWE to show the error is

\documentclass{article}
\usepackage{ctable}
\usepackage{pgfrcs}

\begin{document}
test
\end{document}


ctable seems to have a tikz detection, but fails to detect pgf. One gets a package error, if tikz is loaded after ctable.

A workaround is to load tikz additionally before ctable:

\documentclass{article}
\usepackage{tikz}
\usepackage{ctable}
\usepackage{csvsimple}

\begin{document}
test
\end{document}


It's caused by line 237 in pgfutil-common.tex, which is surrounded by some unsure comments. I could solve the problem by adding:

\makeatletter\def\pgf@sys@addpdfresource@extgs@plain#1{}\makeatother


to the preamble; but then — keep fingers crossed...