我正在使用 ntheorem,并对阴影定理有以下定义:
\theoremclass{Theorem}
\theoremstyle{break}
\shadecolor{red}
\def\theoremframecommand{%
\psshadowbox[fillstyle=solid,fillcolor=cyan,linecolor=black]}
\theoremsymbol{\ensuremath{\diamondsuit}}
\newshadedtheorem{sthm}{Theorem}[section]
但每次编译时都会出现错误:
undefined control sequence
我有:
begin{sthm}
以下是 MWE:
\documentclass[12pt,a4paper,oneside]{report}
\usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry}
\usepackage{amsmath,amssymb,amscd,color,enumitem,epsfig}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor}
\usepackage[amsmath,framed,thmmarks]{ntheorem}
\pagestyle{fancy}
\setcounter{chapter}{-1}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}{}}
\lhead{\leftmark}
\rhead{\rightmark}
\cfoot{\thepage}
\theoremstyle{marginbreak}
\theoremheaderfont{\normalfont\bfseries}\theorembodyfont{\slshape}
\theoremsymbol{\ensuremath{\diamondsuit}}
\theoremseparator{:}
\newtheorem{thm}{Theorem}[section]
\theoremclass{Theorem}
\theoremstyle{break}
\shadecolor{red}
\def\theoremframecommand{%
\psshadowbox[fillstyle=solid,fillcolor=cyan,linecolor=black]}
\theoremsymbol{\ensuremath{\diamondsuit}}
\newshadedtheorem{sthm}{Theorem}[section]
\title{Calculus Notes}
\author{}
\date{\today}
\begin{document}
\maketitle
\chapter{Limits}
\begin{sthm}[Basic Limits]
\end{sthm}
\end{document}
任何帮助是极大的赞赏!
—MD
答案1
您没有显示完整的错误消息,该消息显示哪个命令未定义:
! Undefined control sequence.
<recently read> \c@lor@to@ps
pdflatex
这是由于使用 pstricks而不是 而导致的众所周知的故障latex
。
如果您处理该文档则latex
没有错误。