为了使其看起来像这样,我想删除环境 tcolorbox 名称后面的第二个编号。 但以下代码会产生
\documentclass[a4paper,12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[margin=0.5in]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath, amssymb, amsthm, mathtools, amsfonts, mathrsfs}
\usepackage{fancybox,framed}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtheoremstyle{defn-break}%
{\topsep}{\topsep}
{\normalfont\itshape}{0pt}
{\bfseries}{}
{\newline}{}
% Switch to the newly-defined theorem style
\theoremstyle{defn-break}
% Define 'definition' as an unnumbered theorem-like environment:
%\newtheorem*{definition}{\textbf{Définition}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[most]{tcolorbox}
\tcbuselibrary{theorems, breakable, skins}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtcbtheorem{Exercice}{\large\color{black}\textbf{\fbox{Exercise \fbox{\centering\thetcbcounter}}}#2}%
{
enhanced, % tcolorbox styles
colback=white, colframe=black, colbacktitle=white, coltitle=black,
boxed title style={size=small,colframe=white},
fonttitle=\bfseries,
rounded corners=all,
boxrule=0.4mm,
left=1.5mm,
right=1.5mm,
bottomtitle=-1.5mm,
toptitle=0.5ex, top=0.7ex, % a little extra space at top, a little less before content
titlerule=-0.5ex, % get rid of separator rule
title={#1},
fontupper=\itshape, % make theorem content italics
description delimiters parenthesis, % parentheses around theorem title
description font=\normalfont,% no bold for theorem title
separator sign none,% no punctuation after theorem name
breakable
}{exo}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------
\begin{document}
\begin{Exercice}{}{}
$ABC$ un triangle et soit $I$ le milieu de $[BC]$, soient $D$ un point vérifiant: $\overrightarrow{AD}=\dfrac{3}{5}\overrightarrow{AI}$, $E$ le projeté de $D$ sur $(BC)$ parallèlement à $(AB)$ et $F$ le projeté de $D$ sur $(BC)$ parallèlement à $(AC)$.
\end{Exercice}
\end{document}
%----------------------------------------------
答案1
制表定理似乎会自动对事物进行编号。因此,最好使用基本颜色框。这是我能够获得所需结果的实现。
\documentclass[a4paper,12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[margin=0.5in]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath, amssymb, amsthm, mathtools, amsfonts, mathrsfs}
\usepackage{fancybox,framed}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtheoremstyle{defn-break}%
{\topsep}{\topsep}
{\normalfont\itshape}{0pt}
{\bfseries}{}
{\newline}{}
% Switch to the newly-defined theorem style
\theoremstyle{defn-break}
% Define 'definition' as an unnumbered theorem-like environment:
%\newtheorem*{definition}{\textbf{Définition}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[most]{tcolorbox}
\tcbuselibrary{theorems, breakable, skins}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtcolorbox[auto counter]{exer}[2][]{%
enhanced, % tcolorbox styles
colback=white, colframe=black, colbacktitle=white, coltitle=black,
boxed title style={size=small,colframe=white},
fonttitle=\bfseries,
rounded corners=all,
boxrule=0.4mm,
left=1.5mm,
right=1.5mm,
bottomtitle=-1.5mm,
toptitle=0.5ex, top=0.7ex, % a little extra space at top, a little less before content
titlerule=-0.5ex, % get rid of separator rule
title={\large\textbf{\fbox{Exercise \fbox{\centering\thetcbcounter}}} #2},
fontupper=\itshape, % make theorem content italics
description delimiters parenthesis, % parentheses around theorem title
description font=\normalfont,% no bold for theorem title
separator sign none,% no punctuation after theorem name
breakable}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------
\begin{document}
\begin{exer}{}{}
$ABC$ un triangle et soit $I$ le milieu de $[BC]$, soient $D$ un point vérifiant: $\overrightarrow{AD}=\dfrac{3}{5}\overrightarrow{AI}$, $E$ le projeté de $D$ sur $(BC)$ parallèlement à $(AB)$ et $F$ le projeté de $D$ sur $(BC)$ parallèlement à $(AC)$.
\end{exer}
\begin{exer}{Second Test}{}
$ABC$ un triangle et soit $I$ le milieu de $[BC]$, soient $D$ un point vérifiant: $\overrightarrow{AD}=\dfrac{3}{5}\overrightarrow{AI}$, $E$ le projeté de $D$ sur $(BC)$ parallèlement à $(AB)$ et $F$ le projeté de $D$ sur $(BC)$ parallèlement à $(AC)$.
\end{exer}
\end{document}
%----------------------------------------------