3

I want to make a colorbox around Exercise (question only). I have used tcolorbox for theorems but unable to understand how it can be used for all Exercise. A suggestion will be appreciated.

\documentclass[a4paper, 11pt]{book}
\usepackage[lastexercise]{exercise}
\begin{document}
\begin{ExerciseList}
\Exercise Investigate convergence of the following integrals:
\end{ExerciseList}
\end{document}

1 Answer 1

0

I'm not sure to have understood what you exactly like, but this could be a starting point:

\documentclass[a4paper, 11pt]{book}
\usepackage{tcolorbox}
\usepackage[lastexercise]{exercise}
\renewcommand{\ExerciseListHeader}{\begin{tcolorbox}\ExerciseHeaderDifficulty%
\textbf{\ExerciseListName\ \ExerciseHeaderNB \ExerciseHeaderTitle}%
\ExerciseHeaderOrigin\end{tcolorbox}}
\BeforeBeginEnvironment{ExerciseList}{\vspace{10pt}\par}
\AfterEndEnvironment{ExerciseList}{\vspace{10pt}\par}
\begin{document}
Something before the list. Something before the list. Something before the list. Something before the list. Something before the list.
\begin{ExerciseList}
\Exercise Investigate convergence of the following integrals:
\Answer An answer.
\Exercise Another question:
\Answer Another answer.
\end{ExerciseList}
Something after the list.
Something after the list.
Something after the list.
Something after the list.
Something after the list.
\end{document}

enter image description here

You must log in to answer this question.

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