如何在 LyX 上改变定理的风格?

如何在 LyX 上改变定理的风格?

作为对这个问题的继续 -为什么 amstools 在这里不起作用?- 我想从不同的角度来问:
在此处输入图片描述
我在 Lyx 上使用它,我想改变定理的风格,如下所示: 如何生成定理,其中标题和定理主体的颜色可能不同?

前两个答案根本不起作用,并且会产生问题,如下所示:为什么 amstools 在这里不起作用?(与上文相同)

所以我的问题是:有没有办法改变定理的风格之类的没有创建新的?因为,正如我在答案中看到的 - 只是重新设计样式而不是创建新对象。
(请记住,我正在使用 LyX...)

谢谢你!!

% Preview source code
%% LyX 2.3.0 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,english,hebrew]{scrartcl}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{fontspec}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\parindent}{0bp}
\usepackage[unicode=true,pdfusetitle,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
 {hyperref}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\theoremstyle{plain}
    \ifx\thechapter\undefined
        \newtheorem{thm}{\protect\theoremname}
      \else
      \newtheorem{thm}{\protect\theoremname}[chapter]
    \fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}
\newfontfamily\hebrewfonttt[Script=Hebrew]{Miriam Mono CLM}
\newfontfamily\hebrewfontsf[Script=Hebrew]{Yehuda CLM}
\AtBeginDocument{
\renewcommand\footnoterule{%
  \kern -3pt
  \hbox to \textwidth{\hfill\vrule height 0.4pt width .4\textwidth}
  \kern 2.6pt
}}
% declare a new theorem style
\newtheoremstyle{mystyle}%
{3pt}% Space above
{3pt}% Space below 
{\itshape\color{red}}% Body font
{}% Indent amount
{\bfseries\color{blue}}% Theorem head font
{.}% Punctuation after theorem head
{.5em}% Space after theorem head 
{}% Theorem head spec (can be left empty, meaning ‘normal’)

% use the new theorem style
\theoremstyle{mystyle}
\newtheorem{thm}{Theorem}

\makeatother

\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\addto\captionsenglish{\renewcommand{\theoremname}{Theorem}}
\addto\captionshebrew{\renewcommand{\theoremname}{משפט}}
\providecommand{\theoremname}{משפט}

\begin{document}
\begin{thm}
שלום
\end{thm}

\end{document}

相关内容