Je souhaiterais enchaîner mes "Exercice" avec reprise de numérotations.
Or mon environnement étoilé me permet de numéroter ou pas sauf qu'il ne reprend pas la numérotation où elle en était précédemment.
Mon problème doit être relativement difficile, enfin selon moi.
Si quelqu'un a une idée, elle serait la bienvenue.
Merci.
Code : Tout sélectionner
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{xparse}
\tcbuselibrary{skins}
\DeclareTColorBox[auto counter]{mybox}{ O{} O{} s }%
{skin = enhanced,
arc = 0.35ex,
boxrule = 0.15ex,
colback = white,
colframe = orange,
left = 0ex,
right = 0ex,
bottom = 0ex,
top= -2.2mm + \tcboxedtitleheight,
#2,
%
IfBooleanTF = {#3}{title = \color{black}\footnotesize #1 \thetcbcounter}%
{title =\color{black} \footnotesize #1},
%
attach boxed title to top left = {xshift = 1.5mm, yshift = -\tcboxedtitleheight/2},
%
boxed title style = {arc = 0.7ex,
boxrule =0.1ex,
colframe = black,
colback = blue!15,
left = 0.2ex,
right = 0.2ex,
bottom = -0.1ex,
top = 0ex,
},
}
\begin{document}
\begin{mybox}[Exercice][colback=purple!10!white]*
Ceci est une tcolorbox.
\end{mybox}
\begin{mybox}[Exercice][]*
Ceci est une tcolorbox.
\end{mybox}
\begin{mybox}[Exercice][colframe= red, boxrule=0.25ex]
Ceci est une tcolorbox.
\end{mybox}
\begin{mybox}[Solution][sharp corners]
Ceci est une tcolorbox.
\end{mybox}
\begin{mybox}[Exercice][]*
Ceci est une tcolorbox.
\end{mybox}
\end{document}