4

I'd like to use the recently introduced (in version 2.10) tabularx key for the tcolorbox package. The key is documented in the tcolorbox documentation, section 3.6, paragraph /tcb/tabularx, page 28. I have the latest versin of the package (2.20).

I can't seem to reproduce the examples given there nor a simplified one like this:

\documentclass{article}
\usepackage{array,tabularx}
\usepackage{tcolorbox}
\begin{document}

\begin{tcolorbox}[tabularx={X|X},title=table]
cell A & Cell B\\\hline
cell C & Cell D
\end{tcolorbox}

\end{document}

What I got is an undefined control sequence error in \begin{tcolorbox}[tabularx={X|X},title=table] and this output: enter image description here

The colorname printed in the left side is the default value of the colframe option, i.e., if you add colframe=red in the tcolorbox options, the word "red" will be printed out. Am I hitting a bug or did I miss something?

1 Answer 1

8

There appears to be a dependency on colortbl

enter image description here

\documentclass{article}
\usepackage{array,tabularx,colortbl}
\usepackage{tcolorbox}
\begin{document}

\begin{tcolorbox}[tabularx={X|X},title=table]
cell A & Cell B\\\hline
cell C & Cell D
\end{tcolorbox}

\end{document}
3
  • thank you, that's it. As an additional question, shouldn't the dependency be mentioned in the documention (like for the tabularx and array packages) or it is something so trivial I should have known even if it was not explicitly mentioned?
    – d-cmst
    Apr 23, 2013 at 11:45
  • @dcmst I've mailed the tcolorbox author suggesting exactly that:-) Apr 23, 2013 at 11:53
  • With version 2.22 the documentation contains the depedency hint :-) May 15, 2013 at 17:26

You must log in to answer this question.

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