0
\documentclass[12pt, a4paper, UTF8, scheme = plain, twoside]{ctexart}
\usepackage{amsmath}
\usepackage{enumerate}
\renewcommand{\labelenumi} {(\roman{enumi})}
\renewcommand{\labelenumii}{(\alph{enumii})}
\usepackage[top=0.5cm,left=0.5cm,right=0.5cm,bottom=2.28cm]{geometry}
\usepackage{hyperref}
\usepackage{graphicx}
\pdfsuppressptexinfo=-1
\usepackage{lipsum}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%       - Fancyhdr -    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\usepackage{totpages}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tcolorbox}
\tcbuselibrary{skins,xparse,breakable}
\tcbset{%
    colback      = white,
    tikz         = {opacity=0.1,transparency group},
    colframe     = black,
    title filled = false,
    colbacktitle = white,
}%%
\NewTColorBox[
    ]{question}{ O{}mo }{
    fonttitle                 = \bfseries,
    coltitle                  =  black,
    title                     = #2,
    before lower              = {\textbf{Solution\quad}},
    #1
}%
%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
%%%  DOC Begins   %%%
%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\thispagestyle{empty}
\begin{question}
% \lipsum[4]
Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah 
\tcblower
\[
    \lambda = 2\times10^5
    \qquad
    l_0 = 2
\]
% \lipsum[4]
Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah \lipsum[4-10]
\end{question}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

Why does the breakable not working in this case?

2
  • 1
    it is not enough to load the library, you must also use it. Check the documentation. Apr 5 at 9:55
  • 1
    You load breakable library but the box (question) is not declared to be breakable. You have to include breakable in question options.
    – Ignasi
    Apr 5 at 9:55

1 Answer 1

3

As said in comments, you should not just load breakable, you must tell the box if it is allowed to be breakable.

I commented the tikz = {opacity=0.1,transparency group} to make your example visible and I also added the {Title} to your {question} environment. As you created a \NewTColorBox with two arguments, the first optional but the second doesn't seem to be ({question}{ O{}mo } and title = #2,).

A MWE follows.

\documentclass[12pt, a4paper, UTF8, scheme = plain, twoside]{ctexart}
\usepackage{amsmath}
\usepackage{enumerate}
\renewcommand{\labelenumi} {(\roman{enumi})}
\renewcommand{\labelenumii}{(\alph{enumii})}
\usepackage[top=0.5cm,left=0.5cm,right=0.5cm,bottom=2.28cm]{geometry}
\usepackage{hyperref}
\usepackage{graphicx}
\pdfsuppressptexinfo=-1
\usepackage{lipsum}
\usepackage{tcolorbox}
\tcbuselibrary{skins,xparse,breakable}
\tcbset{%
  colback      = white,
  %tikz         = {opacity=0.1,transparency group},
  colframe     = black,
  title filled = false,
  colbacktitle = white,
  breakable
}
\NewTColorBox[
]{question}{ O{}mo }{
  fonttitle    = \bfseries,
  coltitle     =  black,
  title        = #2,
  before lower = {\textbf{Solution\quad}},
  breakable,
  #1
}
\begin{document}
\thispagestyle{empty}
\begin{question}{Title}
  \lipsum[1-3]
  \tcblower
  \[
  \lambda = 2\times10^5
  \qquad
  l_0 = 2
  \]
  \lipsum[4-10]
\end{question}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.