[texhax] Help Regarding \tcolorbox font size

Shubho Roy shubho.roy85 at gmail.com
Thu Sep 10 09:26:19 CEST 2015


I am trying to make a standardised box environment for a document. In the
preamble I am describing the features of the \tcolorbox and calling in
mybox.

I want all the text in the mybox to be smaller than the normal text in the
document.

While I am able to do it for each box using \tcbfontsize{0.8} in the box, I
am unable to put it as a *general *feature when I am defining "mybox"

The following is my code
====================

\documentclass[12pt,a4paper]{book}
\usepackage{tcolorbox}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{hyperref}


\tcbuselibrary{most}
\newtcolorbox[auto counter, list inside=boxes]{mybox}[2][]{%
  arc=0mm, enhanced, breakable, floatplacement=tp,float,
  colback=blue!0!white,colframe=blue!65!black, fonttitle=\bfseries,
  title=Box~\thetcbcounter: #2, #1}


\title{Tcolorbox:\\
  Minimum Working Example}
\author{~}

\begin{document}
  \begin{mybox}[label={tt:test-box}]{Caption for test-box}
{\tcbfontsize{0.8}\blindtext}
  \end{mybox}
\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20150910/4da411ee/attachment.html>


More information about the texhax mailing list