3

MWE

\documentclass{article}
\usepackage{tcolorbox}
\begin{document}
   \begin{tcolorbox}
   Bla

   Bla
   \begin{tcolorbox}
   Bla

   Bla
   \end{tcolorbox}
  \end{tcolorbox}
\end{document}

How can we do this?

enter image description here

6

The skin draft can be used to print box dimensions while you are working in its design:

\documentclass{article}
\usepackage[most]{tcolorbox}
\begin{document}
   \begin{tcolorbox}[draft]
   Bla

   Bla
   \begin{tcolorbox}[draft]
   Bla

   Bla
   \end{tcolorbox}
  \end{tcolorbox}
\end{document}

enter image description here

3

You could access the height of the blocks by putting them in a box and measure the height of this box. With the printlen package this length can be printed in your unit of choice.

\documentclass{article}
\usepackage{tcolorbox}

\newsavebox{\bigbox}
\newsavebox{\smallbox}
\usepackage{printlen}

\begin{document}

\savebox{\bigbox}{%
   \begin{tcolorbox}
   Bla

   Bla
   \begin{tcolorbox}
   Bla

   Bla
   \end{tcolorbox}
  \end{tcolorbox}
}

\savebox{\smallbox}{%
   \begin{tcolorbox}
   Bla

   Bla
   \end{tcolorbox}
}

\usebox{\bigbox}   

\uselengthunit{cm}
\printlength{\ht\bigbox}  

\printlength{\ht\smallbox}

\end{document}
  • It's good working. – Özgür Feb 23 '18 at 11:06

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.