练习环境后换行不起作用

练习环境后换行不起作用

运动完想换一条新路线。 

\documentclass[a4paper,12pt,pdftext]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[margin=0.5in]{geometry}
\usepackage{amsthm,amsmath}
\usepackage{tikz,lipsum,lmodern}
\usepackage{xcolor}
\usepackage{multicol}
\usepackage{enumitem}
\usepackage[most]{tcolorbox}
\tcbuselibrary{theorems, breakable, skins}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usetikzlibrary{calc} 
\usepackage{eso-pic}
\setlength{\columnsep}{30pt}
\setlength{\columnseprule}{0.2pt}
\setlength{\parindent}{0pt}%
\newtcolorbox[auto counter ]{Exercice}[1][]{
    enhanced,left=0pt,top=8pt,frame hidden,bottom=0pt,before upper={\hspace*{1cm}} ,colback=white,
    interior code app={\node[fill=white, anchor=west,text width=0.5cm,text badly centered]at ([shift={(0.1,-0.5)}]frame.north west){{\large\color{black}\textbf{Exercise\fbox{\centering\thetcbcounter}}} };},nobeforeafter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
    \begin{center}
    \textbf{Series d'exercices}
        \end{center}
    %\bigskip
    \hrule
    \begin{multicols*}{2} 
        %   \sect{}
        \begin{Exercice}
            let $n$ be an integer, we pose
                \[A=n^{2}+3n+4\]
            \begin{enumerate}[label=\textbf{\fbox{\arabic*}}]
                \item Show $A$ is an odd.
                \item Deduce that $A$ is not prime.
            \end{enumerate}
        \end{Exercice}  
        %%EX2
        \raggedcolumns 
    \end{multicols*} 
\end{document}

以下代码生成

在此处输入图片描述

答案1

例如增加top=1cm并使用{(shift={(0.1,-0.35)}

b

\newtcolorbox[auto counter ]{Exercice}[1][]{
    enhanced,left=0pt,top=1cm,
    frame hidden,bottom=0pt,before upper={\hspace*{1cm}} ,colback=white,
    interior code app={\node[fill=white, anchor=west,text width=0.5cm,text badly centered] at ([shift={(0.1,-0.35)}]frame.north west){{\large\color{black}\textbf{Exercise~\fbox{\thetcbcounter}}} };},nobeforeafter}

相关内容