使用 tcolorbox 5.1.1 覆盖 tcolorboxes

使用 tcolorbox 5.1.1 覆盖 tcolorboxes

我遇到了一个问题tcolorbox 5.1.1:有时框会重叠。一切正常tcolorbox 5.0.2

在此处输入图片描述

在此处输入图片描述

分数维:

\documentclass[DIV=45,landscape,a4paper,headinclude=true,footinclude=true,french,twocolumn,twoside=semi,open=any,numbers=enddot,parskip=half,chapterprefix=true,listof=totoc,toc=indentunnumbered]{scrbook}
\setlength{\marginparwidth}{0pt}
\setlength{\marginparsep}{0pt}
%
\RequirePackage{scrhack}
\RequirePackage{luacode,luatextra}
\RequirePackage[fleqn]{mathtools,stmaryrd}
\RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
\RequirePackage{pdflscape}
\setlength{\columnsep}{0.4cm}
\PassOptionsToPackage{hyphens}{url}
\RequirePackage{hyperref}
%
\RequirePackage[capitalize,nameinlink]{cleveref}
\newcommand{\crefrangeconjunction}{ et~}
\newcommand{\crefpairconjunction}{ et~}
\newcommand{\crefmiddleconjunction}{, }

\RequirePackage{totcount}
%
\ExplSyntaxOn
\DeclareExpandableDocumentCommand{\IfNoValueOrEmptyTF}{mmm}
    {
     \IfNoValueTF{#1}
      {#2} % true
      {\tl_if_empty:nTF {#1} {#2} {#3}} % false
    }
\ExplSyntaxOff
%
\RequirePackage{xargs}
\RequirePackage{centernot,cancel}
\RequirePackage{ifthen}
% Inverse version * et normale de mathtools
\newcommand{\DeclarePairedDelimiterY}[3]{%
    \expandafter\DeclarePairedDelimiter\csname#1Temp\endcsname{#2}{#3}
    \expandafter\newcommand\csname#1\endcsname[2][leftright]{%
        \ifthenelse{\equal{##1}{leftright}}%
        {\csname#1Temp\endcsname*{##2}}%
        {%
            \ifthenelse{\equal{##1}{normal}}{\csname#1Temp\endcsname{##2}}{}%
            \ifthenelse{\equal{##1}{big}}{\csname#1Temp\endcsname[\big]{##2}}{}%
            \ifthenelse{\equal{##1}{Big}}{\csname#1Temp\endcsname[\Big]{##2}}{}%
            \ifthenelse{\equal{##1}{bigg}}{\csname#1Temp\endcsname[\bigg]{##2}}{}%
            \ifthenelse{\equal{##1}{Bigg}}{\csname#1Temp\endcsname[\Bigg]{##2}}{}%
        }%
    }%
}
\RequirePackage{etoolbox,refcount}
\RequirePackage{xpatch}
\RequirePackage{color}
\RequirePackage[usenames,dvipsnames,svgnames,table,x11names]{xcolor}
\RequirePackage[output-decimal-marker={,}]{siunitx}
\RequirePackage{adjustbox}
\RequirePackage{footnote} % charger après xcolor
\RequirePackage{fontawesome5} % logos divers
\RequirePackage{graphicx,eso-pic}
\RequirePackage[font=]{caption}
\RequirePackage{here}
\RequirePackage[font=footnotesize]{subcaption}
%Mes couleurs
\definecolor{monnoir}{HTML}{2D2A2E}
\definecolor{monbleu}{HTML}{003366}
\definecolor{monbleuclair}{HTML}{e8e4fc}
\definecolor{mongris}{HTML}{404040}
\definecolor{mongrisclair}{HTML}{F1EFEF}
\definecolor{monrouge}{HTML}{DD3333}
\definecolor{monrougeclair}{HTML}{F2DEDE}
\definecolor{monvert}{HTML}{57AB69}
\definecolor{monvertclair}{HTML}{e8f4e4}
\definecolor{monviolet}{HTML}{483d8b}
\definecolor{monorange}{HTML}{e25303}
\definecolor{monorangeclair}{HTML}{fff4e4}
\definecolor{monrose}{HTML}{F92672}
\definecolor{monokai}{HTML}{272821}
%--------------
%Tikz
\RequirePackage{tikz,tikzpagenodes,tikz-cd}
\RequirePackage{tkz-tab,tkz-fct,tkz-euclide}
\RequirePackage[european,straightvoltages,RPvoltages]{circuitikz}
%\RequirePackage{nl-interval}%Pour les intervalles
\RequirePackage{tikzsymbols}
\usetikzlibrary{tikzmark,backgrounds,shadows,matrix,arrows,arrows.meta,decorations.pathmorphing,shapes,plotmarks,shapes.geometric,decorations.markings,positioning,calc,shapes.misc,automata,cd,fit,datavisualization,datavisualization.formats.functions,patterns,ipe,decorations.shapes,decorations.pathreplacing,shapes.arrows,snakes}
%

%Encadrement
\RequirePackage[skins,breakable,xparse,many]{tcolorbox}
\tcbsetforeverylayer{%
    enhanced,
    coltitle                = black   ,
    colbacktitle        = white   ,
    boxrule             = 0.5pt   ,
    colframe            = mongris ,
    colback             = white   ,
    arc                 = 2mm     ,
    size                = title   ,
    toprule at break    = 0mm     ,
    bottomrule at break = 0mm     ,
    lower separated     = false   ,
    boxed title style ={size=small, boxrule=0pt, colframe=white,} ,
    fonttitle           = \bfseries\sffamily ,
    varwidth boxed title ,
}
%--------------
%Enumerate/Itemize
\RequirePackage{enumitem}
\setlist{nolistsep,align=left,labelsep=*,leftmargin=*}
%
\setlistdepth{9}
%
\newlist{myEnumerate}{enumerate}{9}
\setlist[myEnumerate]{
    font        = {\bfseries\sffamily} ,
    topsep      = 0pt }
\setlist[myEnumerate,1]{label=\arabic*.,ref=\arabic*,labelindent=0pt}
\setlist[myEnumerate,2]{label=\arabic{myEnumeratei}.\arabic*),ref=\themyEnumeratei.\arabic*,labelwidth=2em,leftmargin=!}
\setlist[myEnumerate,3]{label=\roman*),ref=\themyEnumerateii.\roman*}
\setlist[myEnumerate,4]{label=\Roman*.,ref=\themyEnumerateiii.\Roman*}
\setlist[myEnumerate,5]{label=\themyEnumerateiiii.\roman*.,ref = \themyEnumerateiiii.\roman*}
\setlist[myEnumerate,6]{label=(\arabic*)}
\setlist[myEnumerate,7]{label=(\Roman*)}
\setlist[myEnumerate,8]{label=(\Alph*)}
\setlist[myEnumerate,9]{label=(\roman*)}
\newcommand{\ben}{\begin{myEnumerate}}
\newcommand{\benc}{\begin{myEnumerate}[resume]}
\newcommand{\een}{\end{myEnumerate}}
%
\newlist{myItemize}{itemize}{9}
\setlist[myItemize]{
    topsep      = 0pt,
    leftmargin  = 8mm}
\setlist[myItemize,1]{label=\faCaretRight}
\setlist[myItemize,2]{label=---}
\setlist[myItemize,3]{label=---}
\setlist[myItemize,4]{label=---}
\setlist[myItemize,5]{label=---}
\setlist[myItemize,6]{label=---}
\setlist[myItemize,7]{label=---}
\setlist[myItemize,8]{label=---}
\setlist[myItemize,9]{label=---}
\newcommand{\bit}{\begin{myItemize}}
\newcommand{\eit}{\end{myItemize}}

\RequirePackage{lastpage}
\RequirePackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\automark{chapter}
%

\RequirePackage{ulem}
%Cache en ne laissant rien
\newcommand{\cache}{%
    \begingroup
    \par
    \setbox0\vbox\bgroup
}
\newcommand{\montre}{%
    \egroup
    \setbox1\vbox{}%
    \ht1=\ht0
    \wd1=\wd0
    \dp1=\dp0
    \box1
    \endgroup
}
%
\newcommand{\cacheetu}{%
    \ifetu
    \cache
    \else
    \itshape
    \fi
}
%
\newcommand{\montreetu}{%
    \ifetu
    \montre
    \else
    \normalfont
    \fi 
}
%Cache en laissant un trou
\newcommand\troublanc[1]{~
    \enca{\faPenFancy}
    \cacheetu 
    #1
    \montreetu
    }
%--------------
%Définition/Théorème/etc.
%
\BeforeBeginEnvironment{tcolorbox}{\savenotes}
\AfterEndEnvironment{tcolorbox}{\spewnotes}
%
\newcommand*\ifcounter[1]{%
  \ifcsname c@#1\endcsname
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
%
\NewDocumentCommand\DefinirTheoreme{m m m m m m}{%
    \DeclareTColorBox[auto counter,
        number within       = chapter,
        crefname            = {#5}{#6}]{#1}{ o o }{
        enhanced ,
        coltitle            = #3    ,
        colframe            = #4    ,
        colbacktitle        = white ,
        boxrule             = 0.5pt ,
        toprule at break    = 0mm   ,
        bottomrule at break = 0mm   ,
        breakable                   ,
        attach boxed title to top left={xshift=3mm, yshift=-3mm, yshifttext=-1mm},
        IfValueTF={##1}{title=#2 \thetcbcounter {~|~} {\color{black}\normalfont\bfseries ##1}}{title=#2 \thetcbcounter},
        IfValueTF={##2}{##2}{},
        before upper=\def\@mpfn{footnote}\def\thempfn{\thefootnote}
        }
    \makesavenoteenv{#1}
   }%
%
\DefinirTheoreme{defi}{Définition}{monbleu}{monbleu}{Définition}{Définitions}
\DefinirTheoreme{defiprop}{Définition/Proposition}{monrouge}{monbleu}{Définition/Proposition}{Définition/Proposition s}
\DefinirTheoreme{prop}{Proposition}{monrouge}{black}{Proposition}{Propositions}
\DefinirTheoreme{lem}{Lemme}{monorange}{monorange}{Lemme}{Lemmes}
\DefinirTheoreme{theo}{Théorème}{monrouge}{monrouge}{Théorème}{Théorèmes}
\DefinirTheoreme{coro}{Corollaire}{monvert}{monvert}{Corollaire}{Corollaires}
%
%Remarque
\newcounter{Rem}[section]
\setcounter{Rem}{0}
\newenvironment{rema}[1][\unskip]{%
    \refstepcounter{Rem}
    \par\vspace{0.1pt}%
    \noindent\textcolor{monbleu}{\sffamily\tbf{Remarque \thesection.\theRem\:---}} \: \textcolor{monbleu}{\tbf{#1}}\quad}{\smallskip}
\crefname{Rem}{Remarque}{Remarques}
%
%Boite générique
\DeclareTColorBox{boitecouleur}{ o }{
    frame hidden ,
    arc                      = 0mm ,
    outer arc                = 0mm ,
    titlerule                = 0mm ,
    colbacktitle             = white ,
    breakable                        ,
    IfValueTF={#1}{#1}{},
}%
%Boites de couleur (Attention, Notation, Méthode)
%
\newcommand\boxLogo{[draw=none] circle (0.3cm)}
%
\newcommand{\CreerIconeBoite}[2]{
   \begin{tikzpicture} %
   \fill (0, 0.15) [color=#1] \boxLogo; %
   \draw (0, 0.15) \boxLogo node[draw=none, text=white, text width=0.5cm, align=flush center] {\sffamily #2}; %
   \end{tikzpicture} %
}
\newcommand{\Cross}{\mathbin{\tikz [x=1.4ex,y=1.4ex,line width=.2ex] \draw (0,0) -- (1,1) (0,1) -- (1,0);}}
%
\NewDocumentCommand\DefinirBoiteCouleur{ m m m m o O{} }{%
    \DeclareTColorBox{#1}{ o }{
      enhanced jigsaw ,
      frame hidden ,
      arc                      = 0mm ,
      outer arc                = 0mm ,
      colback                  = #2 ,
      coltext                  = #3 ,
      coltitle                 = #4 ,
      titlerule                = 0mm ,
      colbacktitle             = white ,
      breakable                        ,
      #6 ,
      attach boxed title to top left={yshift=0in,xshift=0.12in} ,
      IfValueTF={##1}{title=#5 \quad {##1}}{title={#5} \quad} ,
      before upper=\def\@mpfn{footnote}\def\thempfn{\thefootnote} ,
   }%
   \makesavenoteenv{#1}
}

%
\DefinirBoiteCouleur{attention}{monrougeclair}{black}{monrouge}[Attention][overlay={\node at (frame.north west) {\CreerIconeBoite{monrouge}{\( \Cross \)}};}]
\DefinirBoiteCouleur{nota}{monbleuclair}{black}{monbleu}[Notation][overlay={\node at (frame.north west) {\CreerIconeBoite{monbleu}{\( \Sigma \)}};}]
\DefinirBoiteCouleur{methode}{monvertclair}{black}{monvert}[Méthode][overlay={\node at (frame.north west) {\CreerIconeBoite{monvert}{\faWrench}};}]
\DefinirBoiteCouleur{resum}{monorangeclair}{black}{monorange}[Résumé][overlay={\node at (frame.north west) {\CreerIconeBoite{monorange}{\faHeart}};}]
\DefinirBoiteCouleur{resumchapitre}{monorangeclair}{black}{monorange}[Résumé \& Plan][]
\DefinirBoiteCouleur{cadre}{white}{mongris}{mongris}[Cadre][overlay={\node at (frame.north west) {\CreerIconeBoite{mongris}{\faCogs }};},fontupper=\bfseries]
\DefinirBoiteCouleur{objectifs}{mongrisclair}{mongris}{mongris}[Objectifs][]
\DefinirBoiteCouleur{resultat}{mongrisclair}{mongris}{mongris}[Résultat][]
%
%Preuves
\DeclareTColorBox{preuve}{ o }{
    frame hidden, 
    fontupper       = \small ,
    flush right,
    width           = 0.95\linewidth ,
    arc             = 0mm ,
    outer arc       = 0mm ,
    coltitle        = mongris ,
    titlerule       = 0mm ,
    breakable             ,
    detach title,
    before upper = \def\@mpfn{footnote}\def\thempfn{\thefootnote},
    attach title to upper={\quad \ },
    IfValueTF={#1}{title=Preuve \quad \tit{(#1)}}{title=Preuve \quad},
}
\makesavenoteenv{preuve}
\ExplSyntaxOn
\NewDocumentCommand{\espaceblanc}{ m }{
    \int_step_inline:nn {\fpeval{3*(#1)}}{\par\mbox{~}}}
\ExplSyntaxOff

%Exemple
\newcounter{Exem}[chapter]
\setcounter{Exem}{0}
\newenvironment{exem}[1][\unskip]{%
    \refstepcounter{Exem}
    \par\vspace{0.1pt}%
    \noindent\textcolor{monorange}{\sffamily\tbf{Exemple \theExem\:---}} \:\tbf{#1}
    }{\vspace{0.1pt}%
    }
\crefname{Exem}{Exemple}{Exemples}
%--------------
%Mise en page des PARTES / CHAPITRES
\newcommand\titlerule[1][2pt]{{\color{mongrisclair}\rule{\columnwidth}{#1}}}
%
\colorlet{partcolor}{monbleu}
\setkomafont{part}{\color{partcolor}\Huge\bfseries}
\setkomafont{partprefix}{\Huge}
\renewcommand\partlineswithprefixformat[3]{%
    \thispagestyle{empty}%
    \begin{tikzpicture}[remember picture,overlay]%
    \node at (current page.north west){
        \begin{tikzpicture}[remember picture,overlay]%  
        \fill[mongrisclair](0cm,0cm) rectangle (\paperwidth,-\paperheight);
        \node[anchor=north] at (4cm,-3.25cm){\color{mongris}\fontsize{220}{100}\sffamily\bfseries\thepart}; 
        \node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{white}\fontsize{30}{30}\sffamily\bfseries #2#3}};
        \end{tikzpicture}};
    \end{tikzpicture}%
}
%
\colorlet{chaptercolor}{mongris}
\setkomafont{chapter}{\bfseries\LARGE}
\setkomafont{chapterprefix}{\Huge}
%
\renewcommand\chapterlineswithprefixformat[3]{%
    {\color{partcolor} #2\nobreak}%
    \Ifstr{#2}{}{}{\kern-\dp\strutbox}%
    \titlerule\par\nobreak%
    \parbox[l]{\columnwidth}{#3}%
    \par\nobreak\titlerule%
}
%--------------
%Mise en page des SECTIONS
\renewcommand\thesection{\arabic{section}}
\colorlet{sectioncolor}{monbleu}
\setkomafont{section}{\color{sectioncolor}}
%
\renewcommand\sectionformat{%
  \setlength\fboxsep{5pt}%
  \raisebox{-4pt}{\colorbox{monbleu}{%
    \enskip\textcolor{white}{\thesection\autodot}\enskip}%
  \quad%
}}
%Mise en page des SOUS-SECTIONS
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\colorlet{subsectioncolor}{mongris}
\setkomafont{subsection}{\color{subsectioncolor}}
%
\renewcommand\subsectionformat{%
  \setlength\fboxsep{5pt}%
  \raisebox{0pt}{\colorbox{mongris}{%
    \enskip\textcolor{white}{\thesubsection\autodot}\enskip}%
  \quad%
}}
%Mise en page des SOUSSOUS-SECTIONS
\renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}
\colorlet{subsubsectioncolor}{monvert}
\setkomafont{subsubsection}{\color{subsubsectioncolor}}
%
\renewcommand\subsubsectionformat{%
  \setlength\fboxsep{5pt}%
  \raisebox{0pt}{\colorbox{monvert}{%
    \enskip\textcolor{white}{\thesubsubsection\autodot}\enskip}%
  \quad%
}}
%Mise en page des PARAGRAPHES
\colorlet{paragraphcolor}{monbleu}
\setkomafont{paragraph}{\scshape\bfseries\color{paragraphcolor}}
% Packages/Commandes MATHS
\RequirePackage{pdfpages}
\RequirePackage{xspace}
%--------------
%Droits d'auteur
\RequirePackage[
    type={CC},
    modifier={by-nc-sa},
    version={3.0},imagewidth=5em]{doclicense}
%--------------
%Espaces verticaux
\newcommand{\ssv}{\smallskip{}}
\newcommand{\sv}{\bigskip{}}
\newcommand{\SV}{\vskip 12mm plus 6mm minus 6mm}
\newcommand{\minsep}{\noindent\begin{center}\rule{5cm}{1.2pt}\end{center}}
\newcommand{\separplanche}
            {\newpage
            \begin{center}
            \rule{180mm}{0.01cm}
            \end{center}
            \vspace*{2mm}
            \pagebreak[2]}
%--------------
%Français
\newcommand{\Gauss}{Gau\ss\xspace}
\newcommand{\applicationcontseg}{\tit{fonction continue sur un segment}\xspace}
\newcommand{\cad}{c'est-\`a-dire\xspace}
\newcommand{\Cad}{C'est-\`a-dire\xspace}
\newcommand{\ie}{\tit{i.e.}\xspace}
\newcommand{\eg}{\tit{e.g.}\xspace}
\newcommand{\cf}{\tit{cf.}\xspace}
\newcommand{\ssi}{si et seulement si\xspace}
\newcommand{\afo}{\tit{a fortiori}\xspace}
\newcommand{\apr}{\tit{a priori}\xspace}
\newcommand{\Apr}{\tit{A priori}\xspace}
\newcommand{\infra}{\tit{infra}\xspace}
\newcommand{\supra}{\tit{supra}\xspace}
\newcommand{\apo}{\tit{a posteriori}\xspace}
\newcommand{\Apo}{\tit{A posteriori}\xspace}
\newcommand{\resp}{\tit{resp.}\xspace}
\newcommand{\etc}{\tit{etc.}\xspace}
\newcommand{\via}{\tit{via}\xspace}
\newcommand{\ipp}{intégration par parties\xspace}
\newcommand{\dse}{développement en série entière\xspace}
\newcommand{\des}{décomposition en éléments simples\xspace}
\newcommand{\ipps}{intégrations par parties\xspace}
\newcommand{\mq}{Montrer que\xspace}
\newcommand{\tq}{,\:}
\newcommand{\ou}{\quad \text{ou}\quad}
\newcommand{\et}{\quad \text{et}\quad}
\newcommand{\important}[1]{\tbf{\uline{#1}}%
}
%
\newcommand{\egalnotation}{\underset{\tbf{\text{\footnotesize (nota.)}}}{=}}
\newcommand{\egaldefi}{\underset{\tbf{\text{\footnotesize (défi.)}}}{=}}
\newcommand{\egalresteaprouver}{\underset{\tbf{\text{\footnotesize !}}}{(=)}}
%--------------
%Mathématique
\newcommand{\e}{\mathrm{e}}
\renewcommand{\i}{\mathrm{i}\:}
\renewcommand{\j}{\mathrm{j}\:}
\newcommand{\pa}[1]{\left( #1 \right)}
\newcommand{\parfrac}[2]{\left( \frac{#1}{#2} \right)}
\newcommand{\dsum}{\mathop{}\displaystyle\sum}
\newcommand{\dint}{\mathop{}\displaystyle\int}
\newcommand{\dprod}{\mathop{}\displaystyle\prod}
\newcommandx{\suite}[2][1=]{\left(#2\right)_{#1}}
\newcommand{\suiteN}[2]{\pa{#1}_{#2 \in \N}}
\newcommand{\suiteNet}[2]{\pa{#1}_{#2 \in \N*}}
\newcommandx{\serie}[2][1=]{
\ifstrempty{#1}{\left(\displaystyle\dsum #2\right)}{
\left(\displaystyle\dsum #2\right)_{#1}}}
\newcommand{\famille}[3]{\pa{#1}_{#2 \in #3}}
%
\newcommand{\analyse}{\noindent \faSquare\:\: \:\tbf{\textsf{Analyse –}}\quad}
\newcommand{\synthese}{\noindent \faSquare\:\: \:\tbf{\textsf{Synthèse.}}\quad}
\newcommand{\initia}{\par\smallskip\noindent\faSquare\:\: \tbf{\textsf{Initialisation.}}\quad}
\newcommand{\hered}{\par\smallskip\noindent\faSquare\:\: \tbf{\textsf{Hérédité.}}\quad}
\newcommand{\unicite}{~
\vspace{0.1cm}\noindent\faSquare\:\: \tbf{\textsf{Unicité.}}\quad}
\newcommand{\existence}{~
\vspace{0.1cm}\noindent\faSquare\:\: \tbf{\textsf{Existence.}}\quad}
\newcommand{\implique}{\:\Longrightarrow \:}
\newcommand{\impliquerecip}{\:\Longleftarrow\:}
\newcommand{\nimpliquepas}{\:\nRightarrow\:}
\newcommand{\equivaut}{\:\Longleftrightarrow\:}
\newcommand{\incldir}{~
\vspace{0.1cm}\newline
\noindent\(\boxed{\subset}\quad\)}
\newcommand{\inclindir}{~
\vspace{0.1cm}\newline
\noindent\(\boxed{\supset}\quad\)}
%--------------
%Intervalles
\renewcommand{\setminus}{\backslash}
%
\providecommand\tqens{}
% can be useful to refer to this outside \Set
\newcommand\SetSymbol[1][]{%
  \nonscript\:#1\vert
  \allowbreak
  \nonscript\:
  \mathopen{}}
\DeclarePairedDelimiterX\Set[1]\{\}{%
  \renewcommand\tqens{\SetSymbol[\delimsize]}
  #1
}
\newcommand{\ensemble}[1]{\Set*{#1}}
%
\newcommand{\ensembleint}[2]{\llbracket #1 \:,\: #2
\rrbracket}
\newcommand{\ensembleintfo}[2]{\llbracket #1 \:,\: #2
\llbracket}
%
\DeclarePairedDelimiterY{intervff}{[}{]}
\DeclarePairedDelimiterY{intervoo}{]}{[}
\DeclarePairedDelimiterY{intervof}{]}{]}
\DeclarePairedDelimiterY{intervfo}{[}{[}

%Italique
\newcommand{\tit}[1]{\textit{#1}}
%Gras
\newcommand{\tbf}[1]{\textbf{#1}}
\newcommand{\R}{\ensuremath{\textbf{R}}}
\newcommand{\Ret}{\ensuremath{\textbf{R}^\star}}
\newcommand{\CC}{\ensuremath{\textbf{C}}}
\newcommand{\CCet}{\ensuremath{\textbf{C}^\star}}
\newcommand{\Eet}{\ensuremath{\textbf{E}^\star}}
\newcommand{\F}{\ensuremath{\textbf{F}}}
\newcommand{\HH}{\ensuremath{\textbf{H}}}
\newcommand{\K}{\ensuremath{\textbf{K}}}
\renewcommand{\L}{\ensuremath{\textbf{L}}}
\newcommand{\Q}{\ensuremath{\textbf{Q}}}
\newcommand{\Qet}{\ensuremath{\textbf{Q}^\star}}
\newcommand{\N}{\ensuremath{\textbf{N}}}
\newcommand{\Net}{\ensuremath{\textbf{N}^\star}}
\newcommand{\V}{\ensuremath{\textbf{V}}}
\newcommand{\Z}{\ensuremath{\textbf{Z}}}
\newcommand{\Zet}{\ensuremath{\textbf{Z}^\star}}
\newcommand{\U}{\ensuremath{\textbf{U}}}
\newcommand{\E}{\ensuremath{\textbf{E}}}
\newcommand{\PP}{\ensuremath{\textbf{P}}}
\newcommand{\B}{\ensuremath{\textbf{B}}}
\newcommand{\X}{\ensuremath{\textbf{X}}}
%Caligraphié
\newcommand{\mcA}{{\mathcal A}} 
\newcommand{\mcB}{{\mathcal B}} 
\newcommand{\mcC}{{\mathcal C}}
\newcommand{\mcD}{{\mathcal D}} 
\newcommand{\mcE}{{\mathcal E}} 
\newcommand{\mcF}{{\mathcal F}}
\newcommand{\mcG}{{\mathcal G}}
\newcommand{\mcSL}{\mathcal{SL}} 
\newcommand{\mcH}{{\mathcal H}} 
\newcommand{\mcI}{{\mathcal I}}
\newcommand{\mcJ}{{\mathcal J}} 
\newcommand{\mcK}{{\mathcal K}} 
\newcommand{\mcL}{{\mathcal L}}
\newcommand{\mcM}{{\mathcal M}} 
\newcommand{\mcN}{{\mathcal N}} 
\newcommand{\mcO}{{\mathcal O}}
\newcommand{\mcP}{{\mathcal P}}
\newcommand{\mcQ}{{\mathcal Q}} 
\newcommand{\mcR}{{\mathcal R}} 
\newcommand{\mcS}{{\mathcal S}}
\newcommand{\mcT}{{\mathcal T}} 
\newcommand{\mcU}{{\mathcal U}} 
\newcommand{\mcV}{{\mathcal V}}
\newcommand{\mcW}{{\mathcal V}}
\newcommand{\mcX}{{\mathcal X}} 
\newcommand{\mcY}{{\mathcal Y}} 
\newcommand{\mcZ}{{\mathcal Z}}
%Doublé
\newcommand{\mbbA}{{\mathbb A}} 
\newcommand{\mbbB}{{\mathbb B}} 
\newcommand{\mbbC}{{\mathbb C}}
\newcommand{\mbbD}{{\mathbb D}} 
\newcommand{\mbbE}{{\mathbb E}} 
\newcommand{\mbbF}{{\mathbb F}}
\newcommand{\mbbG}{{\mathbb G}} 
\newcommand{\mbbH}{{\mathbb H}} 
\newcommand{\mbbI}{{\mathbb I}}
\newcommand{\mbbJ}{{\mathbb J}} 
\newcommand{\mbbK}{{\mathbb K}} 
\newcommand{\mbbL}{{\mathbb L}}
\newcommand{\mbbM}{{\mathbb M}} 
\newcommand{\mbbN}{{\mathbb N}} 
\newcommand{\mbbO}{{\mathbb O}}
\newcommand{\mbbP}{{\mathbb P}}
\newcommand{\mbbQ}{{\mathbb Q}} 
\newcommand{\mbbR}{{\mathbb R}} 
\newcommand{\mbbS}{{\mathbb S}}
\newcommand{\mbbT}{{\mathbb T}} 
\newcommand{\mbbU}{{\mathbb U}} 
\newcommand{\mbbV}{{\mathbb V}}
\newcommand{\mbbW}{{\mathbb V}}
\newcommand{\mbbX}{{\mathbb X}} 
\newcommand{\mbbY}{{\mathbb Y}} 
\newcommand{\mbbZ}{{\mathbb Z}}
%Variable epsilon
\newcommand{\eps}{\varepsilon}
%%%%
\begin{document}

\chapter{First chapter}

\newpage

\begin{exem}
Écrire la négation de la phrase « Si je gagne au loto, je change de voiture»
\end{exem}

\begin{attention}
\bit
\item Affirmer que l’implication : \( P \implique Q \) est vraie n’implique ni que \( P \) est vraie, ni que \( Q \) est vraie. Il est parfaitement vrai que : « Si Pinocchio est président de la République, alors il est chef des armées », et pourtant Pinocchio n’est pas plus président de la République qu’il n’est chef des armées.
\item Une implication : \( P \implique Q \) peut être vraie alors que \( P \) et \( Q \) n’ont rien de commun, car après tout seules leurs valeurs de vérité comptent. Par exemple, il est vrai que : « Si 0 = 0, alors les oiseaux ont des plumes ».
\item Il ne faut pas confondre l'assertion «\(P \implique Q\)» qui peut être vraie ou fausse et l'affirmation en Français « si \(P\) est vraie alors \(Q\) est vraie». Généralement quand un exercice vous demande de montrer qu'une implication est vraie on se place dans la seconde acception du terme: on vous demande de montrer que, si \(P\) est vraie, alors \(Q\) est vraie. On n'utilise donc pas le symbole « \( \implique \) » pour abréger « donc » !
\eit    
\end{attention}

\begin{defiprop}[Contraposée \& Réciproque d'une implication]
Soient \(P\) et \(Q \) deux assertions. On définit la proposition :
\bit
\item \tit{contraposée de \( P \implique Q \)} comme étant :
\[ \left( \neg P \right) \implique \left(\neg Q \right).\]
Toute implication est équivalente à sa contraposée.
\item \tit{réciproque de \( P \implique Q \)} comme étant :
\[ Q \implique P.\]
\eit
\end{defiprop}

\begin{preuve}
Pour montrer l'équivalence entre \( P \implique Q \)     et \( \left( \neg P \right) \implique \left(\neg Q \right) \), on peut construire la table de vérité.
\end{preuve}

%
\section{Ensembles}

La notion d'ensemble est difficile à définir proprement, on s'appuiera plutôt sur l'intuition que l'on a de cette notion, en le qualifiant vaguement de « collection d'éléments ». 

%
\subsection{Généralités}

\begin{defi}
\bit
\item Un \tit{ensemble} \(E\) est une collection d'éléments \(x\) qui sont dits \tit{appartenir} à l'ensemble \(E\), ce que l'on note \(x \in E\). 
\item Il existe un unique ensemble ne contenant aucun élément, on l'appelle l'\tit{ensemble vide} et on le note \(\emptyset\).
\eit
\end{defi}

\paragraph{Modes de définition d'un ensemble.} On peut décrire un ensemble en \tit{extension}, c'est-à-dire en donnant la liste de ses éléments, ou en \tit{compréhension}, c'est-à-dire en donnant une propriété caractérisant de manière unique les éléments de \(E\). Par exemple, l'ensemble ci-après est donné par extension et compréhension:
\[E=\ensemble{1,2,3,4}=\ensemble{n \in \N \tq n \geqslant 1, n <5}\egalnotation\ensembleint{1}{4}.\]
En résumé on a les deux modes suivants :
\bit
\item\tbf{Extension} \( E = \ensemble{x_1, \dots, x_n} \).
\item\tbf{Compréhension} \( E = \ensemble{x \in \R \tq \text{condition sur } x} \).
\eit

On rappelle également à toutes fins utiles la notation ci-après.

\begin{nota}[Intervalle d'entiers]
Soient \( a,b \in \Z \) deux entiers. On notera 
\[\ensembleint{a}{b} = \ensemble{n \in \Z\tq a \leqslant n \leqslant b} = \intervff{a, b} \cap \Z.\]
\end{nota}

Quand on définit un ensemble en compréhension il faut toujours le situer comme sous-ensemble d'un ensemble plus grand: on n'écrit pas\footnote{Ou plutôt on évitera de l'écrire} \(\ensemble{x\tq \cos(x) \geqslant 0 }\) mais \(\ensemble{x \in \R\tq \cos(x) \geqslant 0 }\).

\begin{defi}[Inclusion]
Soient \(A\) et \(E\) deux ensembles. On dit que \(A\) est un \tit{sous-ensemble de \(E\)} ou que \tit{\(A\) est inclus dans \(E\)} si tout élément de \(A\) est un élément de \(E\), \cad :
\[ \forall x \in A, \quad x \in E.\]
On note cela \(A \subset E\).
\end{defi}

\begin{attention}
Appartenance \( \neq \) Inclusion ! Un élément appartient à un ensemble, et une \textbf{partie} est incluse dans un ensemble. 
\end{attention}

\begin{defi}[Égalité]
Deux ensembles \(E\) et \(F\) sont dits égaux si :
\[ E \subset F \et F \subset E.\]
Autrement dit, \( E \) et \( F \) ont exactement les mêmes éléments. On note cela \( E=F \).
\end{defi}

\begin{defi}[Ensemble des parties]
Soit \(E\) un ensemble. On peut définir l'\tit{ensemble des parties de \(E\)}, noté \( \mcP(E) \), comme étant l'ensemble des sous-ensembles \( A \) de \( E \). 
\end{defi}

On a donc 
\[ A \in \mcP(E) \equivaut A \subset E.\]
Remarquons que l'on a toujours 
\[ E \in \mcP(E), \et \emptyset \in \mcP(E).\]

\begin{exem}
Soit \(E=\ensembleint{1}{3}\), alors :
\[ \mcP(E)=\ensemble{\emptyset, \ensemble{ 1 }, \ensemble{ 2 }, \ensemble{ 3 } , \ensemble{ 1,2 }, \ensemble{ 1,3 }, \ensemble{ 2,3 }, E}.\] 
\end{exem}

\subsection{Opérations sur les ensembles}

\begin{defi}[Réunion \& Intersection]
Soit \(E\) un ensemble, soit \(A \in \mcP(E)\) et \(B \in \mcP(E)\). On définit:
\bit
\item l'\tit{union de \(A\) et de \(B\)}, notée \(A \cup B\) (et lue « \(A\) union \(B\)») par :
\[ A\cup B =\ensemble{x \in E \tq x \in A \ou x \in B},\]
et on a : \quad \( x \in A \cup B \equivaut x \in A \ou x \in B \).\footnote{On rappelle ici que par défaut, en Mathématiques, le « ou » n'est pas exclusif. Ainsi, un élément peut appartenir aux deux ensembles \( A \) et \( B \).}
\item L'\tit{intersection de \(A\) et de \(B\)}, notée \(A \cap B\) (et lue « \(A\) inter \(B\)») par :
\[ A \cap B = \ensemble{ x \in E\tq x \in A \et x \in B },\]
et on a : \quad \( x \in A \cap B \equivaut x \in A \et x \in B \).
\eit
\end{defi}

\end{document}

答案1

也许这个答案中最有用的(或者唯一有用的)信息就是这个解决方法:添加autoparskip\tikzsetforeverylayer{...}

结果 在此处输入图片描述

我怀疑楼主遇到的 tcolorbox v5.1.1 和 v5.0.2 之间的差异主要是由于默认设置的变化造成/tcb/before/tcb/after。另请参阅 tcolorbox 问题#115#182

  • 在 v4.40(不含)之前以及 v5.0.0(含)和 v5.1.1(不含)之间autoparskip是默认设置。
  • 自 v4.40 (含) 起但不在回归时间范围内 [v5.0.0, v5.1.1),beforeafter skip balanced=0.5\baselineskip plus 2pt是默认值。

很难说它是否是一个错误或限制(TeX 的分页机制),但它似乎beforeafter skip balanced不如 那样强大且对值更敏感autoparskip

一个简化但不最小的例子:

\documentclass[DIV=45,landscape,a4paper,twocolumn,openany,parskip=half]{scrbook}
\usepackage[breakable]{tcolorbox}

\begin{document}
\def\dummyitem{\item a\\b\\c \[ x + y \]}

\def\test#1{
  \tcbset{#1} % equivalent to \tcbsetforeverylayer{...} for level 1 boxes
  \chapter{First chapter}
  \leavevmode\llap{\color{red}Example} text text
  
  \begin{tcolorbox}[breakable]
    \begin{itemize}
      \item a\\b\\c\\d\\e
      \item a\\b\\c
      \item a\\b\\c\\d\\e\\f
    \end{itemize}
  \end{tcolorbox}
  
  \begin{tcolorbox}[breakable]
    text
    \begin{itemize}
      \dummyitem \dummyitem \dummyitem \dummyitem
    \end{itemize}
  \end{tcolorbox}

  \vskip.2\textheight
  {\Huge Setting:\\[10pt]
   \ttfamily
   \string\tikzsetforeverylayer\\
   \mbox{}\space\space\detokenize{{#1}}}
}

\test{autoparskip}
\test{beforeafter skip balanced= 0.5\baselineskip plus 1pt}
\test{beforeafter skip balanced= 0.5\baselineskip plus 2pt}
\test{beforeafter skip balanced= 0.5\baselineskip plus 3pt}

\end{document}

在此处输入图片描述

相关内容