# why tcolorbox example on pp. 345 doesn't work

I wish to improve my (very basic) knowledge about tcolorbox .. so I try to compile example in pp. 345 (chapter 18: Library "hooks"). Compiling it I receive warning:

\RequiredPackage{minted}{2011/09/17]


which I have installed by MikTeX package manager, then after forcing compilation ask for

\minted@appathifexist=


etc

I use recent 64-bit MikTeX with administrative privilege and WinEdt as editor. The example code is the following:

\documentclass{article}
\usepackage[all]{tcolorbox}
\usepackage{array,tabularx}%,longtable,tabu

\begin{document}
\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}% see tabularx
\tcbset{enhanced,fonttitle=\bfseries\large,
fontupper=\normalsize\sffamily,
colback=yellow!10!white,colframe=red!50!black,
colbacktitle=orange!30!white,%=Salmon!30!white
coltitle=black,center title,
tabularx={X||Y|Y|Y|Y||Y},% this sets ’before upper’ and ’after upper’
before upper app={Group & One & Two & Three & Four & Sum\\
\hline\hline} }
\begin{tcolorbox}[title=My table]
Red & 1000.00 & 2000.00 & 3000.00 & 4000.00 & 10000.00\\\hline
Green & 2000.00 & 3000.00 & 4000.00 & 5000.00 & 14000.00\\\hline
Blue & 3000.00 & 4000.00 & 5000.00 & 6000.00 & 18000.00\\\hline\hline
Sum & 6000.00 & 9000.00 & 12000.00 & 15000.00 & 42000.00
\end{tcolorbox}
\end{document}


On the end I above code generate the following picture:

I expect that this would work "out of box" similarly as some other examples from manual, so do not know what I'm doing wrong or what I miss.

• If I load also colortbl (for \arrayrulecolor) and run pdflatex -shell-escape test, I get the expected result. See this picture – egreg Aug 1 '15 at 19:54
• @egreg since tcolorbox internally loads xcolor, this \documentclass[table]{article} is alos enough. You should turn your comment into an answer. – Gonzalo Medina Aug 1 '15 at 19:57
• You may want to see this: tex.stackexchange.com/q/108661/11232 – user11232 Aug 1 '15 at 23:37
• @HarishKumar, thank you for link. It is very usable. – Zarko Aug 1 '15 at 23:43
• @HarishKumar, I manage this. Now I need only to install Python (if I understand correctly). On python.org/downloads/windows iI discover, that exist two versions: 2.7.10 and 3.4.3. What is difference between them and which one you suggest to install? – Zarko Aug 1 '15 at 23:50

I get the same output as you if I don't load colortbl: the error is!

Undefined control sequence.
\tcb@after@box ->\endtabularx \arrayrulecolor
{black}
l.20 \end{tcolorbox}


and \arrayrulecolor is a command of colortbl.

If I add colortbl to the list of packages (or, as Gonzalo Medina suggests, add table to the options for \documentclass), the output is

without any error.

• at me this doesn't help. I still receive error: You must invoke LaTex with the -shell-escape flag and open file tcbminted.code.tex probably as source of error, but this time on the end I receive correct picture. And TeXAuX directory, where should be log file, is empty. Now I'm completely confused. – Zarko Aug 1 '15 at 20:24
• @Zarko Of course you have to add the -shell-escape option as I said in my comment: this is always needed for minted. – egreg Aug 1 '15 at 20:25
• where? do I need to compile from DOS window? I try this, but receive error: you must have pygmentize instaled to use this package. Do I re-install tcolorbox? – Zarko Aug 1 '15 at 20:39
• @Zarko That depends on the front-end you're using. Pygmentize should of course be available on your machine: it's a Python library. – egreg Aug 1 '15 at 20:40
• as far as know, I haven't installed python nor python library, except if this is automatically installed with some program. – Zarko Aug 1 '15 at 20:49