如何删除练习的标题?

如何删除练习的标题?
\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage[spanish]{babel} 

\RequirePackage[framemethod=default]{mdframed}
\newtheorem{exerciseT}{exercise}[section]

\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
backgroundcolor=green,
linecolor=red,
innerleftmargin=5pt,
innerrightmargin=100pt,
innertopmargin=5pt,
innerbottommargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=4pt]{eBox}

\newenvironment{exercise}{\begin{eBox}\begin{exerciseT}}{\hfill{\color{yellow}\tiny\ensuremath{}}\end{exerciseT}\end{eBox}}

\begin{document}
\section{chapter}
\begin{exercise}
qwert
\par
\begin{minipage}[c]{0.5\linewidth}
ddddd
\end{minipage} \hfill\begin{minipage}[c]{0.5\linewidth}
zzzzzzzzzzzzzzzzz
\end{minipage}
\end{exercise}
\end{document}

答案1

如果您不需要“练习 1.1”,也许您不需要定义练习环境:\newtheorem{exerciseT}{exercise}[section]也不需要使用它(参见下面带注释的命令):

\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage[spanish]{babel} 

\usepackage[framemethod=default]{mdframed}
%\newtheorem{exerciseT}{exercise}[section]

\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
backgroundcolor=green,
linecolor=red,
innerleftmargin=5pt,
innerrightmargin=100pt,
innertopmargin=5pt,
innerbottommargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=4pt]{eBox}

\newenvironment{exercise}{\begin{eBox}%\begin{exerciseT}
    }{\hfill{\color{yellow}\tiny\ensuremath{}}%\end{exerciseT}
\end{eBox}}

\begin{document}
    \section{chapter}
    \begin{exercise}
        qwert
        \par
        \begin{minipage}[c]{0.5\linewidth}
            ddddd
        \end{minipage} \hfill\begin{minipage}[c]{0.5\linewidth}
            zzzzzzzzzzzzzzzzz
        \end{minipage}
    \end{exercise}
\end{document}

在此处输入图片描述

相关内容