是否可以将校样环境中的正文设为粗红色而不是黑色?

是否可以将校样环境中的正文设为粗红色而不是黑色?

是否有可能(使用定理) 将证明环境的默认文本颜色(当然是黑色)更改为粗体红色?我正在排版一本分析书,我和一位朋友正在寻找 [内容和风格目的] 一种相当独特的外观。因此,我们考虑将证明设为粗体红色字体。那么,我想知道这是否可以实现?谢谢!目前,这些是我定义定理类环境的方式,这里是 MWWE:

\documentclass[12pt,a4paper]{article}

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 

\usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{pstricks}
\usepackage{framed}
\usepackage[amsmath,framed,thmmarks]{ntheorem}
\usepackage{textcomp}

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

\newtheorem{Theorem}{Thm}
\theoremclass{Theorem}
\theoremstyle{break}
\shadecolor{blue}
\newshadedtheorem{thm}[Theorem]{Theorem}

\theoremclass{Theorem}
\theoremstyle{break}
\shadecolor{gray}
\newshadedtheorem{prop}[Theorem]{Proposition}

\theoremclass{Theorem}
\theoremstyle{plain}
\newframedtheorem{lem}[Theorem]{Lemma}

\theoremclass{Theorem}
\theoremstyle{plain}
\newframedtheorem{cor}[Theorem]{Corollary}


\theoremstyle{plain}
\theoremsymbol{\ensuremath{\blacktriangle}}
\theoremseparator{.}
\theoremprework{\bigskip\hrule}
\theorempostwork{\hrule\bigskip}
\newtheorem{defn}{Definition}

\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\bullet}}
\theoremseparator{}
\newtheorem{exam}{Example}

\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\bullet}}
\newtheorem{exer}{Exercise}[section]


\theoremheaderfont{\sc}
\theorembodyfont{\textcolor{red}}
\theoremstyle{nonumberplain}
\theoremseparator{.}
\theoremsymbol{\rule{1ex}{1ex}}
\newtheorem{proof}{Proof}

\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\bigstar}}
\theoremseparator{.}
\newtheorem{rem}{Remark}

% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

\begin{document}

\begin{thm}[Bolzano-Weirstrass Theorem]
Every bounded sequence in $\mathbb{K}^m$ has a convergent subsequence ...
\end{thm}

\begin{proof}
We consider first the case where $\mathbb{K} = \mathbb{R}$ and prove     the  case by induction on $m \ldots$
\end{proof}

\begin{exam}\mbox{}
Let the universe be the set of real numbers. Then:
\begin{enumerate}
   \item  $(\exists x)(x \ge 3)$ is true because the truth set of $x \ge 3$ contains $3, \pi, 5$, and many other real numbers; and hence is nonempty.
   \item sdfdkjwfdwsjfdws
\end{enumerate}
\end{exam}


\begin{rem}
Note that the previous proposition is quite useful in helping us to find negations for quantified propositions.
\end{rem}


\begin{defn}[Logical Equivalence] 
Two propositions are said to be logically equivalent iff ...
\end{defn}  

\end{document}

我之前发过一个非常类似的问题,涉及我遇到的一个问题普斯特里克,cmhughes 帮了我大忙。但现在,我只想将 proof 环境中的字体更改为粗体红色,我(认为)我应该不再摆弄这些该死的环境了!感谢 cmhughes 和所有参与的人所以这里对我有很大帮助!!!

开始会是类似下面的情况吗(不确定,但我会尝试一下):

\renewenvironment{proof}[1]{proof}{}
\theoremstyle{plain}
\theoremheaderfont{sc}\theorembodyfont{\textcolor{\red[1]{\bfseries}}}
\theoremseparator{}
\theoremsymbol{\rule{1ex}{1ex}}
\newtheorem{proof}{Proof}

我真的不确定这是否有用,但我确实想至少在这次“盲目”提问之前付出一些努力。再次感谢。-MD

答案1

一些评论

  • 发布一些实际编译的内容
  • 您永远不会加载提供颜色的包
  • \textcolor接受两个参数,但从未向其提供文本。请使用\color{...}
  • \sc在 LaTeX 中不是一个好习惯
  • mdframed您可能也想看看,并给出更好的框架定理。

此外,无需手动加载amstextamsmath已经加载了。

\theorembodyfont{\color{red}\bfseries\boldmath}

工作正常。

相关内容