如何使定理风格如下:
1.1.3. There is a theorem. Theorem
it may be several lines.
The theorem 1.1.3 end.
1.1.1. There is a lemma. lemma
The lemma 1.1.1 end.
(针对单侧文档类)
答案1
使用ntheorem
:
\documentclass{article}
\usepackage{ntheorem}
\makeatletter
\newtheoremstyle{marginname}%
{\item[\hskip\labelsep \theorem@headerfont ##2\theorem@separator]\marginpar{\theorem@headerfont ##1}}%
{\item[\hskip\labelsep \theorem@headerfont ##2\ (##3)\theorem@separator]\marginpar{\theorem@headerfont ##1}}
\makeatother
\theoremstyle{marginname}
\newtheorem{thm}{Theorem}[section]
\begin{document}
\section{foo}
\begin{thm}
blah blah
\end{thm}
\end{document}
如果使用\marginnote
(来自marginnote
包)而不是,可能会效果更好\marginpar
。
或者您可以使用(不同的语法)来完成这个技巧amsthm
。\newtheoremstyle