tcolorbox 내부 들여쓰기

tcolorbox 내부 들여쓰기

solution으로 만들어진 환경이 있습니다 . 패키지가 내부에서 작동하지 않는 이유를 이해할 수 없습니다 .xparsetcolorbox\usepackage{indentfirst}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}

답변1

내부 단락 들여쓰기의 경우 tcolorbox옵션을 꺼야 합니다 ( parboxparbox=false: 기본적으로 true). 따라서:

\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,
}

관련 정보