[Tex/LaTex] Indentation inside tcolorbox

indentationtcolorboxtikz-pgfxparse

I have a environment solution created with xparse and tcolorbox. I do not understand why package \usepackage{indentfirst} does not work inside solution.

\documentclass[12pt]{book}
\usepackage{xparse}
\usepackage{indentfirst}
\usepackage{lipsum}
\def\Solution{Solution}
\usepackage[most, breakable, many]{tcolorbox}
\NewTColorBox[auto counter,number within=section]{solution}{+O{}}{%
    breakable, enhanced,colframe=gray,colback=white,coltitle=green!40!black,
    fonttitle=\bfseries,
    underlay={\begin{tcbclipinterior}
            \draw[help lines,step=5mm,blue!20!white,shift={(interior.north west)}]
            (interior.south west) grid (interior.north east);
        \end{tcbclipinterior}},
        title={\Solution},
        label={},
        attach title to upper=\quad,
        after upper={\par\hfill\textcolor{green!40!black}%
            {}},
        lowerbox=ignored,
        #1,
    }
\begin{document}
    \chapter{One}
       \begin{solution}
             \lipsum[1-35]
      \end{solution}
\end{document}

Best Answer

For paragraph indentation inside tcolorbox it is necesary to switch off the options parbox, e.g. parbox=false (by default it is true). Thus:

\NewTColorBox[auto counter,number within=section]{solution}{+O{}}{%
breakable, 
enhanced,
colframe=gray,
colback=white,
coltitle=green!40!black,
fonttitle=\bfseries,
parbox = false,
underlay={\begin{tcbclipinterior}
\draw[help lines,step=5mm,blue!20!white,shift={(interior.north west)}]
                (interior.south west) grid (interior.north east);
          \end{tcbclipinterior}},
title={\Solution},
label={},
attach title to upper=\quad,
after upper={\par\hfill\textcolor{green!40!black}%
            {}},
lowerbox=ignored,
#1,
}
Related Question