如果我有较大的外边距(偶数页和奇数页),我怎样才能将示例(和解决方案)放在外边距的两页中?
答案1
这是一个将示例环境视为定理的解决方案,其名称必须位于外边缘。有一个编号版本和一个未编号版本。使用 ntheorem 可以交叉引用示例并制作示例列表。
\documentclass[12pt, twoside]{article}% http://ctan.org/pkg/amsproc
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[showframe,nohead,nomarginpar,textwidth =15cm, textheight=23cm,marginratio=3:5]{geometry}
\usepackage{ntheorem,ifoddpage}
\makeatletter%
\newtheoremstyle{nonumoutermargin}%
{\item[\checkoddpage\ifoddpageoroneside\rlap{\hskip\linewidth\theorem@headerfont {\hskip18pt##1}}%
\else\llap{\theorem@headerfont{##1}\hskip6pt}\fi]}%
{\item[\checkoddpage\ifoddpageoroneside\rlap{\hskip\linewidth\theorem@headerfont {\hskip18pt##1}}%
\else\llap{\theorem@headerfont{##1}\hskip6pt}\fi]}
\newtheoremstyle{outermargin}%
{\item[\checkoddpage\ifoddpageoroneside\rlap{\hskip\linewidth\theorem@headerfont {\hskip18pt##1\hskip\labelsep##2}}%
\else\llap{\theorem@headerfont{##1\hskip\labelsep##2}\hskip6pt}\fi]}%
{\item[\checkoddpage\ifoddpageoroneside\rlap{\hskip\linewidth\theorem@headerfont{\hskip18pt##1\hskip\labelsep##2}}%
\else\llap{\theorem@headerfont{##1\hskip\labelsep##2}\hskip6pt}\fi]}
\makeatother
\theoremheaderfont{\upshape\bfseries}
\theorembodyfont{\upshape}
\theoremstyle{outermargin}
\newtheorem{example}{Example}
\theoremstyle{nonumoutermargin}
\newtheorem{unnumberedexample}{Example}
\begin{document}
\begin{example}
First example.
\end{example}
\clearpage
\begin{example}
Second example
\end{example}
\clearpage
\begin{unnumberedexample}
Third example
\end{unnumberedexample}
请注意,由于边距空间不足,所以不能有可选参数。
答案2
也许这个命令可以帮助你解决你的问题:
\marginpar [left side notice] {right side notice}
只需将您的通知放在括号中就可以了。