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?

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}
  • 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? – Nico Boni Apr 23 '13 at 11:45
  • @dcmst I've mailed the tcolorbox author suggesting exactly that:-) – David Carlisle Apr 23 '13 at 11:53
  • With version 2.22 the documentation contains the depedency hint :-) – Thomas F. Sturm May 15 '13 at 17:26

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.