![如何为证明添加框架?](https://linux22.com/image/260532/%E5%A6%82%E4%BD%95%E4%B8%BA%E8%AF%81%E6%98%8E%E6%B7%BB%E5%8A%A0%E6%A1%86%E6%9E%B6%EF%BC%9F.png)
我正在尝试将我写的证明框起来
例如
\documentclass[11pt]{article}
\begin{document}
\framebox{
\emph{Proof} \\
\text{content of proof goes here}
}
\end{document}
但 \ 什么都没做。所有文本都挤在框里
答案1
答案提供于框定理陈述cmhughes 的布局应该很有用。这是从文档中获取并修改的略有不同的布局mdframed
。
\documentclass[11pt]{article}
\usepackage[framemethod=tikz]{mdframed}
\mdfdefinestyle{proofstyle}{%
linecolor=red,middlelinewidth=2pt,%
frametitlerule=true,%
apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={%
shade,left color=white, right color=blue!20}}},
frametitlerulecolor=green!60,
frametitlerulewidth=1pt,
innertopmargin=\topskip,
}
\mdtheorem[style=proofstyle]{proof}{Proof}
%% \mdtheorem[style=proofstyle]{proof}{\itshape Proof}
\begin{document}
\begin{proof}[Some heading]
content of proof goes here
\end{proof}
\bigskip
\begin{proof*}%%[Some heading]
content of proof goes here
\end{proof*}
\end{document}
要删除颜色,只需注释掉一些行,例如:
\mdfdefinestyle{proofstyle}{%
%linecolor=red,
middlelinewidth=1pt,%
frametitlerule=true,%
%apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={%
%shade,left color=white, right color=blue!20}}},
%frametitlerulecolor=green!60,
frametitlerulewidth=.5pt,
innertopmargin=\topskip,
}