# Indentation in tcolorbox package

I'd like to have the same indentation within a tcolorbox as I have in the rest of the document.

How can I get it?

Thanks.

MWE:

\documentclass[a4paper]{book}

\usepackage{lipsum}
\usepackage[most]{tcolorbox}

\begin{document}

\chapter{Example with \texttt{tcolorbox}}
\lipsum[1-8]

\begin{tcolorbox}[breakable,enhanced]
\lipsum[9-14]
\end{tcolorbox}

\end{document}


The first block of text has the typical indentation, but that in the box doesn't.

• Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Sep 11 '14 at 10:55
• @ChristianHupfer Done. – baister Sep 11 '14 at 11:32
• A quick way is to explicitly provide the \parindent length within tcolorbox. \setlength{\parindent}{10pt} after \begin{tcolorbox}[enhanced,breakable}] ... 10pt is a guess of mine – user31729 Sep 11 '14 at 11:40
• I think (not tested) option before upper=\indent will do it. – Ignasi Sep 11 '14 at 11:56
• @Ignasi It doesn't work. – baister Sep 11 '14 at 13:00

Ignasi's comment works if you use

before upper={\parindent15pt}


And find the value by

\showthe\parindent


in the log.

Code:

\documentclass[a4paper]{book}

\usepackage{lipsum}
\usepackage[most]{tcolorbox}

\begin{document}

\chapter{Example with \texttt{tcolorbox}}
\lipsum[1-8]
%\showthe\parindent  %%,---- find \parindent
\begin{tcolorbox}[breakable,enhanced,before upper={\parindent15pt}]
\lipsum[9-14]
\end{tcolorbox}

\end{document}


before upper={\parindent15pt\noindent}