乳胶中具有制表环境的边注

发布于 2024-09-04 06:31:41 字数 687 浏览 3 评论 0原文

我需要在选项卡环境旁边添加页边注释。如果我尝试在环境中使用 \marginpar ,则会收到错误: LaTeX Error: Not in external 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}

I need to put a margin note next to a tabbing environment. If I try to use \marginpar within the environment I get an error: LaTeX Error: Not in outer par mode.

I've tried putting the \marginpar just before the \begin of the environment but it ends up aligned with the last line of the preceding paragraph instead of with the first line of the tabbing environment.

In the example below the first margin note gets aligned above the tabbing text and the second one below. I tried using \vspace to shift the top note down, and that works okay unless a page break occurs between the tabbing environment and the preceding paragraph -- then the margin note and the tabbing text end up on separate pages.

Any ideas how to get the margin note to line up with the top of the tabbing text?

\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}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吻风 2024-09-11 06:31:41

marginnote为此提供了解决方法:

在此处输入图像描述

\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}

The marginnote package provides a work-around for this:

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}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文