![如何在页边空白处写定理标题(如定理、引理、定义等),同时定理编号照常。](https://linux22.com/image/236986/%E5%A6%82%E4%BD%95%E5%9C%A8%E9%A1%B5%E8%BE%B9%E7%A9%BA%E7%99%BD%E5%A4%84%E5%86%99%E5%AE%9A%E7%90%86%E6%A0%87%E9%A2%98%EF%BC%88%E5%A6%82%E5%AE%9A%E7%90%86%E3%80%81%E5%BC%95%E7%90%86%E3%80%81%E5%AE%9A%E4%B9%89%E7%AD%89%EF%BC%89%EF%BC%8C%E5%90%8C%E6%97%B6%E5%AE%9A%E7%90%86%E7%BC%96%E5%8F%B7%E7%85%A7%E5%B8%B8%E3%80%82.png)
如何使定理风格如下:
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