我计划创建一个.sty
用于记录笔记的文件。在修改一个已经存在的在线文件时,我发现我无法使用
\renewcommand{\qedsymbol}{\blacksquare}
或者
\renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}
要么将通常的白色方块改为黑色方块。那么,我该怎么做呢?
类似地,如果我想添加一个黑三角形,我该怎么做?
如果答案取决于文件其余部分的外观.sty
,我最愿意指向我正在修改的文件。
我的.sty
文件:
\newtheoremstyle{myplain} {10pt}{10pt}{\itshape}{}{\scshape}{.}{.5em}{}
\newtheoremstyle{mydefinition} {10pt}{10pt}{}{}{\scshape}{.}{.5em}{}
\newtheoremstyle{myremark} {10pt}{10pt}{}{}{\scshape}{.}{.5em}{}
\renewcommand{\qedsymbol}{\blacksquare} %replacing this line with
%\renewcommand{\qedsymbol}{\ensuremath{\blacksquare}}
% does not work either.
\newcounter{lecture}
\theoremstyle{myplain}
\newtheorem{thm}{Theorem}[lecture]
\newtheorem{lem} [thm]{Lemma}
\newtheorem{pro} [thm]{Proposition}
\newtheorem{cor} [thm]{Corollary}
\newtheorem{claim} [thm]{Claim}
\newtheorem{fact} [thm]{Fact}
\theoremstyle{mydefinition}
\newtheorem{defn} [thm]{Definition}
\newtheorem{eg} [thm]{Example}
\newtheorem{assumption} [thm]{Assumption}
\newtheorem{openproblem}[thm]{Open Problem}
\newtheorem{problem} [thm]{Problem}
\theoremstyle{myremark}
\newtheorem{remark} [thm]{Remark}
\newtheorem{conjecture} [thm]{Conjecture}
\numberwithin{equation} {lecture}
\numberwithin{figure} {lecture}
\numberwithin{table} {lecture}
\renewcommand{\fnum@figure}{\textsc{Figure~\thefigure}}
\renewcommand{\fnum@table}{\textsc{Table~\thetable}}
\renewcommand{\thesection}{\thelecture.\arabic{section}}
\renewcommand{\thepage}{\thelecture-\arabic{page}}
答案1
您可能忘记加载amssymb
:
\documentclass{amsart} % just to have `amsthm` preloaded
\usepackage{amssymb}
\renewcommand{\qedsymbol}{$\blacksquare$}
\begin{document}
\begin{proof}
a
\end{proof}
\end{document}