tikz.dev / tcolorbox Manual

The tcolorbox package

Libraries

12 Inclusion of Boxed Image Files

The skins library adds some commands to conveniently include boxed image files. For the following macros and options, the skins library has to be loaded by a package option or inside the preamble by:

See Section 10 for the documentation of all other options of the skins library.

12.1 Macros
  • \tcbincludepdf[⟨options⟩]{⟨file name⟩}New: 2014-11-14

  • This is a generalized version of \tcbincludegraphics which allows to include a complete PDF file denoted by ⟨file name⟩. Every page is boxed into an own tcolorbox customized by the given ⟨options⟩. It is reasonable to put such a series of boxes inside a tcbraster for alignment.

    Use /tcb/graphics pages to use a selection of pages instead of using the whole file.

    The auxiliary macro \imagepage may be used inside \tcbincludepdf to display the current page number.

% \tcbuselibrary{raster}
\begin{tcbraster}[raster columns=3,colframe=blue,colback=white,
colbacktitle=blue!50!white,fonttitle=\small\bfseries\ttfamily,
left=0pt,right=0pt,top=0pt,bottom=0pt,boxsep=0pt,boxrule=0.6pt,
toptitle=1mm,bottomtitle=1mm,drop lifted shadow,center title,
graphics pages={1,...,6},title={\imagename\ [\imagepage]}]
\tcbincludepdf{tcolorbox-example.pdf}
\end{tcbraster}
12.2 Option Keys
  • /tcb/graphics pages=⟨selection⟩(no default, initially 1,...,\pdfpages)New: 2014-11-14

  • Used for \tcbincludepdf to specify a ⟨selection⟩ of pages to be included. The largest page number is accessible by \pdfpages. The ⟨selection⟩ has to be given using the \foreach syntax of TikZ.

    \tcbset{
    graphics pages={1,3,7},
    graphics pages={1,...,10},
    graphics pages={1,3,...,18},
    graphics pages={100,...,\pdfpages},
    }