2

enter image description here

I'm trying to clone the box shown in the image above. But I'm having trouble to copy the style of the title box. The title box is inside the box, but I don't know how to make it in the box. How can I solve this problem?

\documentclass[a4paper]{memoir}
\usepackage[most]{tcolorbox}
\usepackage{amsmath,amssymb}
\newtcolorbox{opening}[1][]{
boxsep=1mm,
left=1mm,
sharp corners,
colback=green!15!white,
fonttitle=\bfseries\sffamily,
colbacktitle=green!65!black, enhanced,
title=OPENING PROBLEM,
frame hidden,#1}
\newenvironment{thinkabout}{Things to think about:\begin{enumerate}}{\end{enumerate}}
\begin{document}
\begin{opening}
The population of rodents on an island is currently $500$. Its graowth rate is expected to be given by $\dfrac{dP}{dt}=0.1P\left( 1-\dfrac{P}{3000} \right) $, where $t$ is the time in years from now. 

\begin{thinkabout}
\item How would we describe the relationship between the variables $P$ and $t$ ?
\item What would the graph of $P$ against $t$ look like?
\item How can we write $P$ as a function of $t$?
\item Can you find:
\begin{enumerate}
    \item the expected population after $8 $ years
    \item the expected time taken for the population to increase to $2000$
    \item the maximum population which the island can sustain?
\end{enumerate}
\end{thinkabout}
\end{opening}
\end{document}

1 Answer 1

2

Instead of hiding the frame, make it the same colour as your background and the title will look as if it is inside the box:

\documentclass[a4paper]{memoir}
\usepackage[most]{tcolorbox}
\usepackage{amsmath,amssymb}
\newtcolorbox{opening}[1][]{
boxsep=1mm,
left=1mm,
sharp corners,
colback=green!15!white,
fonttitle=\bfseries\sffamily,
colbacktitle=green!65!black, enhanced,
title=OPENING PROBLEM,
colframe=green!15!white,
boxrule=5pt,titlerule=5pt,
,#1}
\newenvironment{thinkabout}{Things to think about:\begin{enumerate}}{\end{enumerate}}
\begin{document}
\begin{opening}
The population of rodents on an island is currently $500$. Its graowth rate is expected to be given by $\dfrac{dP}{dt}=0.1P\left( 1-\dfrac{P}{3000} \right) $, where $t$ is the time in years from now. 

\begin{thinkabout}
\item How would we describe the relationship between the variables $P$ and $t$ ?
\item What would the graph of $P$ against $t$ look like?
\item How can we write $P$ as a function of $t$?
\item Can you find:
\begin{enumerate}
    \item the expected population after $8 $ years
    \item the expected time taken for the population to increase to $2000$
    \item the maximum population which the island can sustain?
\end{enumerate}
\end{thinkabout}
\end{opening}
\end{document}

enter image description here

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .