Si doy el siguiente párrafo, entonces Error en \DeclareTotalTColorBox

Si doy el siguiente párrafo, entonces Error en \DeclareTotalTColorBox

Mis etiquetas son las siguientes:

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

El código anterior funciona bien. Si elimino el archivo para enter, pero tengo muchos párrafos de texto, ¿cómo puedo solucionar este problema? Por favor avise...

Respuesta1

Debe permitir párrafos en el argumento obligatorio, que se obtiene con +men lugar 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}

ingrese la descripción de la imagen aquí

información relacionada