Se eu der o próximo parágrafo, então Erro em \DeclareTotalTColorBox

Se eu der o próximo parágrafo, então Erro em \DeclareTotalTColorBox

Minhas tags são as seguintes:

\documentclass{book}

\usepackage{environ} %fancy boxes
\usepackage{xcolor}
\usepackage[tikz]{bclogo}

\usepackage{etoolbox}
\usepackage{blindtext}%
\usepackage[skins,breakable,xparse]{tcolorbox}%

\bibliographystyle{mit-chicago}

\DeclareTotalTColorBox[auto counter]{\myexer}{ O{} m }
{ enhanced,breakable,
  boxrule=0pt,boxsep=0pt,arc=2mm,toptitle=12pt,beforeafter skip=17pt,top=3mm,left=7mm,right=12pt,pad at break=2mm,
%  colframe=yellow!20!white,interior hidden,
  colframe=black!10,interior hidden,
  coltitle=black,fonttitle=\bfseries\large,title={\hspace*{10pt}Exercise}, %title={Exercise~\thetcbcounter},
  overlay unbroken and first={\node at ([xshift=20pt,yshift=-21pt]frame.north west) {\bccrayon};},
  #1}
  {#2}


\begin{document}

\myexer{
\begin{center} \textbf{Selling Bicycles} \end{center}
Imagine you buy and sell bicycles from your small store. One day, you receive a customer, Yuya, who tells you the following: ``I want to buy a bicycle whose price is \$200, but I am only willing to pay \$100 for it.'' You know that the total cost of each bicycle is \$160, with \$70 the sum of variable costs and \$90 the sum of \emph{allocated} fixed costs.

Next paragraph text follows here:%%If I remove this enter mark, then it works
\begin{enumerate}
    \item Would you sell the bicycle for \$100? (Ignore taxes when making your calculations.)
\end{enumerate}
}


\end{document}

O código acima funciona bem, se eu remover o para enter, mas tiver muitos parágrafos de texto, como posso corrigir esse problema? Por favor, avise...

Responder1

Você precisa permitir parágrafos no argumento obrigatório, que é obtido com +mem vez de m.

\documentclass{book}

\usepackage{environ} %fancy boxes
\usepackage{xcolor}
\usepackage[tikz]{bclogo}

\usepackage{etoolbox}
\usepackage{blindtext}%
\usepackage[skins,breakable,xparse]{tcolorbox}%

\bibliographystyle{mit-chicago}

\DeclareTotalTColorBox[auto counter]{\myexer}{ O{} +m }
 {
  enhanced,breakable,
  boxrule=0pt,
  boxsep=0pt,
  arc=2mm,
  toptitle=12pt,
  beforeafter skip=17pt,
  top=3mm,
  left=7mm,
  right=12pt,
  pad at break=2mm,
  %colframe=yellow!20!white,
  colframe=black!10,
  interior hidden,
  coltitle=black,
  fonttitle=\bfseries\large,
  title={\hspace*{10pt}Exercise},
  %title={Exercise~\thetcbcounter},
  overlay unbroken and first={\node at ([xshift=20pt,yshift=-21pt]frame.north west) {\bccrayon};},
  #1
}{#2}


\begin{document}

\myexer{
  \begin{center} \textbf{Selling Bicycles} \end{center}
  Imagine you buy and sell bicycles from your small store. One day, you receive a 
  customer, Yuya, who tells you the following: ``I want to buy a bicycle whose price 
  is \$200, but I am only willing to pay \$100 for it.'' You know that the total cost 
  of each bicycle is \$160, with \$70 the sum of variable costs and \$90 the sum of 
  \emph{allocated} fixed costs.
  interior hidden,

  Next paragraph text follows here:
  \begin{enumerate}
    \item Would you sell the bicycle for \$100? (Ignore taxes when making your calculations.)
  \end{enumerate}
}


\end{document}

insira a descrição da imagem aqui

informação relacionada