保证金注释与乳胶中的标签环境

时间:2010-06-03 16:54:26

标签: latex

我需要在标签环境旁边添加保证金说明。如果我尝试在环境中使用\ marginpar,我会收到错误:LaTeX Error: Not in outer par mode.

我已经尝试将\ marginpar放在环境的\ begin开头之前,但它最终与前一段的最后一行对齐,而不是与标签环境的第一行对齐。

在下面的示例中,第一个边距注释在标签文本上方对齐,第二个在下面对齐。我尝试使用\ vspace将顶部音符向下移动,除非在标签环境和前一段之间发生分页,否则这样可以正常工作 - 然后边缘注释和标签文本最终会出现在不同的页面上。

任何想法如何让保证金说明与标签文本的顶部对齐?

\documentclass{memoir}
\begin{document}

Now is the time for all good men to come to the aid of their country.
\marginpar{a margin note}\begin{tabbing}
tabbing text a\\
tabbing text b\\
\end{tabbing}\marginpar{another margin note}
Now is the time for all good men to come to the aid of their country.

\end{document}

1 个答案:

答案 0 :(得分:2)

marginnote package为此提供了解决方法:

enter image description here

\documentclass{memoir}
\usepackage{marginnote}% http://ctan.org/pkg/marginnote
\begin{document}

Now is the time for all good men to come to the aid of their country.
\begin{tabbing}
  tabbing text a \marginnote{a margin note} \\
  tabbing text b
\end{tabbing}
Now is the time for all good men to come to the aid of their country.

\end{document}
相关问题