使用 \ref 和 \colorbox 的定理样式

使用 \ref 和 \colorbox 的定理样式

昨天我发表了一个问题,链接:强调定理样式。但我还有其他问题。我的代码:

\documentclass{book}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[a4paper,top=1.5cm,bottom=1.5cm,left=2cm,right=2cm]{geometry}
\usepackage{relsize}
\usepackage{tikz-cd}
\usepackage{amscd}
%\usepackage{MnSymbol}
\usepackage[all]{xy}
\usepackage{stackrel}
\usepackage{color}
\usepackage{amsmath}
%\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{amsthm}
%\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{latexsym}
\usepackage{footmisc}
\usepackage{imakeidx}
\usepackage[tight, italian]{minitoc}
\usepackage{pstricks-add}
\usepackage{pst-plot}
\usepackage{pst-func}
\usepackage{caption}
\usepackage{ifsym}
\usepackage{stmaryrd}
%\usepackage{mathabx}
\usepackage{stix}
\usepackage{dsfont}
\usepackage{extarrows}
\usepackage{cancel}
\usepackage{xcolor}
\usepackage{tcolorbox}
\usepackage{amsthm}
\usepackage[customcolors,shade]{hf-tikz}
\usepackage{nicematrix}
\usepackage{diagbox}
\usepackage[bb=ams]{mathalpha}
\usetikzlibrary{calc,matrix,backgrounds}

\DeclareGraphicsExtensions{.pgn, .pdf}


\captionsetup{labelformat=empty,textfont=sl}


\renewcommand{\thefootnote}{\boxed{\arabic{footnote}}}

\renewcommand{\theequation}{\thesection.\arabic{equation}}

%\theoremstyle{definition}

\newtheoremstyle{colorednum}{}{} % Use default spacing before and after
{\itshape}{} % No indent and italic body (again the default settings)
{\bfseries}{.} % Print "Theorem 1.3.1" in bold with a period after
{ } % default space after theorem head
{\thname{#1}\thnumber{ \colorbox{orange}{#2}\thnmote{ (#3)}}
\theoremstyle{colorednum}
\newtheorem{theorem}{Theorem}[subsection]}

%\newtheorem{theorem}{Theorem}[subsection]\RenewExpandableDocumentCommand{\thetheorem}{}{\fcolorbox{blue}{orange}{\thesubsection.\arabic{theorem}}}

\begin{document}
\section{First Section}
\newtheorem{Pitagora}{Pitagora's Theorem}[subsection]
\label{PITAGORA}
\begin{Pitagora} ...
\begin{proof} ...
\end{proof}
\end{Pitagora}
In Theorem \ref{PITAGORA}... .
\section{Second Section}
\newtheorem{Cayley-Hamilton}{Cayley--Hamilton's Theorem}[subsection]
\label{Cayley_Hamilton}
\begin{Cayley-Hamilton} ...
\begin{proof} ...
\end{proof}
\end{Cayley-Hamilton}
\newtheorem{Cayley-Hamilton_C}{Corollary by the Theorem \ref{Cayley_Hamilton}}[subsection]
\label{CayleyHamilton}
\begin{Cayley-Hamilton_C} ...
\begin{proof} ...
\end{proof}
\end{Cayley-Hamilton_C}

\end{document}

这些都是我使用的软件包。有人会与我想要的发生冲突吗?如果会,其中有哪些?你能改进我的 tex-code 吗?非常感谢

第一次编辑:我想要的是:

  1. 中的定理数量\colorbox{orange}
  2. 当我写作时,\begin{proof}...\end{proof}我希望有\textbf{\textcolor{blue!50}{Dimostrazione}}%Dimostrazione 意思是证明(我是意大利人);
  3. 一个巧妙的定理引用,例如在我的代码中我写了凯莱-汉密尔顿定理 2.0.1当我写作时,Corollary of Theorem \ref{...}我希望定理 2.0.1 的推论 \colorbox{orange}{2.0.2}

相关内容