【问题标题】:margin note with tabbing environment in latex在乳胶中带有标签环境的边注
【发布时间】:2011-10-17 15:35:09
【问题描述】:

我需要在标签环境旁边放一个边注。如果我尝试在环境中使用 \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}

【问题讨论】:

  • 您在寻找类似todonotes 包的东西吗?还是我误解了这个问题?
  • 我想在一些使用制表符格式化的文本旁边的边距中放置一个相应的文件名。我不确定 todonotes 是否可以做到这一点。我需要将名称格式化为灰色的小斜体字体,周围没有任何框。
  • 我刚刚尝试了 todonotes -- 它生成与 \marginpar 相同的 Not in outer par mode 错误。

标签: latex


【解决方案1】:

marginnote package 提供了一种解决方法:

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

【讨论】:

    猜你喜欢
    • 2011-02-28
    • 1970-01-01
    • 2017-08-11
    • 1970-01-01
    • 1970-01-01
    • 2022-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多