制作课堂笔记的摘要版本

制作课堂笔记的摘要版本

我的目的是总结我的课堂笔记。更准确地说,我想在同一个文件中(每章)写下整个结构(章节、子章节),然后:

  • 默认情况下tcolorbox(定义/定理),并可以放置一个可选参数,表示这tcolorbox不能被复制。
  • 对于评论也是一样:我希望默认情况下它不会被复制,但我也想给自己这样做的可能性。

我不知道完成这一切的最佳方法是什么。

平均能量损失

\documentclass{scrbook}
\usepackage[skins,breakable,xparse,many]{tcolorbox}
\usepackage{xcolor}
\usepackage{cleveref}

%ENV 1
\NewDocumentCommand\DefinirTheoreme{m m m m m m}{%
    \DeclareTColorBox[auto counter,
        number within       = chapter,
        crefname            = {#5}{#6}]{#1}{ o o }{
        enhanced,
        top                 = 2mm,
        coltitle            = #3,
        colframe            = #4,
        colbacktitle        = white,
        boxrule             = 0.5pt,
        toprule at break    = 0mm,
        bottomrule at break = 0mm,
        attach boxed title to top left={yshift=-0.1in,xshift=0.2in},
        IfValueTF={##1}{title=#2 \thetcbcounter {~|~} {\color{black}\normalfont\bfseries ##1}}{title=#2 \thetcbcounter},
        IfValueTF={##2}{##2}{},
        }
   }%
%
\DefinirTheoreme{defi}{Définition}{blue}{blue}{Définition}{Définitions}

%ENV 2
\newcounter{Rem}[section]
\setcounter{Rem}{0}
\newenvironment{rema}[1][\unskip]{%
    \refstepcounter{Rem}
    \par\vspace{\topsep}%
    \noindent\textcolor{blue}{\sffamily Remarque \thesection.\theRem\:---} \: \textcolor{blue}{#1}}{\smallskip}

%
\begin{document}

\section{The first section (WRITED)}

\begin{defi}[WRITED]
    An important definition. 
\end{defi}

\begin{rema}
    Not very important, it is not written in the resume file.
\end{rema}

\section{The first section (WRITED)}

\begin{defi}[not writed]
    an unnecessary definition for the resume file.
\end{defi}

\end{document}

相关内容