Tikz 定理

Tikz 定理

我正在寻找一个定理包(可以框架化、阴影化等)。我使用过,ntheorem但我发现当我使用阴影定理时会涉及到 PSTricks,我想使用 Tiz 而不是 PSTricks。我做了一些研究,但定理包太多了,我迷茫了。

我见过tcolorbox,但例如,我不希望我的示例周围有方框(我只希望在方框中显示名称“Example”,当然,带有计数器)。而且文档tcolorbox超过 500 页,都是英文的,而我是法国人)。

我的文档超过 600 页(包含定理、引理......),当然,我只想修改序言中环境的定义。

所以如果有人能告诉我我可以使用哪些包......

答案1

如果我的水晶球没问题的话,这就是你要找的东西:

\documentclass{book}
\usepackage[most]{tcolorbox}
\tcbuselibrary{theorems}
\newtcbtheorem[number within=chapter]{theorem}{Theorem}%
    {enhanced,
    enhanced jigsaw,
    breakable, 
    sharp corners,
    boxrule=0pt,
    boxsep=0pt,
    left=0pt,
    right=0pt,
    bottom=0pt,
    opacityback=0,
    opacityframe=0,
    coltitle=black,
    fonttitle=\bfseries,
    fontupper=\itshape,
    attach boxed title to top left,
    boxed title style={colframe=cyan,
    colback=cyan!30},
    }{th}

\begin{document}
\chapter{My chapter}
\section{My section}
In the following you have two examples with \texttt{tcolorbox}.
Theorem \ref{th:without} is has no name, but only the number. Pay attention to how we refer to it, the label is a parameter of the environment, with the prefix \texttt{th:}. The prefix is choosed in the tcbtheorem definition
\begin{theorem}{}{without}
Paulo is a duck. He always says quack, hence he's a duck.
\end{theorem}
Whereas the other theorem,
Theorem \ref{th:with}, has a name:
\begin{theorem}{Pythagoras}{with}
The area of the square whose side is the hypotenuse is equal to the sum of the areas of the squares on the two catheti. 
\end{theorem}
I numbered the theorems within chapters.
\end{document}

在此处输入图片描述

答案2

也许这样的事情可以让你开始:

\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}

\usepackage{lipsum}

\newtcbtheorem[number within=section]{mytheo}{Example}%
{oversize, left=5pt, right=5pt, bottom=0pt, sharp corners, boxrule=0mm, colback=black!0, colframe=black!0, colbacktitle=blue!25!black, fonttitle=\bfseries}{th}

\begin{document}

\lipsum[1]

\begin{mytheo}{This is my title}{theoexample}
This is the text of the theorem. The counter is automatically assigned and,
in this example, prefixed with the section number.
\end{mytheo}

\lipsum[1]

\end{document}

在此处输入图片描述

相关内容