增加使用 gb4e 创建的示例后的距离

增加使用 gb4e 创建的示例后的距离

包裹格布用于创建语言示例。但是,我注意到,环境前设置的垂直空间exe大于gb4e环境后设置的空间。我不明白为什么会这样 - 在我看来,理想情况下它们应该相同。我怎样才能将它们设置为相同?

梅威瑟:

\documentclass{article}
\usepackage{setspace,gb4e}
\doublespacing
\begin{document}
\noindent Here is a German example:
\begin{exe}
    \ex
    \gll Den Hund des Mannes\\
         the.\textsc{acc} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
It would be better to write the following:
\begin{exe}
    \ex
    \gll Der Hund des Mannes\\
    the.\textsc{nom} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
These were two great examples!
\end{document}

在此处输入图片描述


编辑

实施 Werner 的建议(效果很好,看起来很棒)后,我注意到在exe包含在迷你页面中的环境之后出现了巨大的垂直空间(以便能够并排放置两个示例)。我怎样才能将此空间缩小到正常\topsep距离?

梅威瑟:

\documentclass{article}
\usepackage{setspace,gb4e}
\let\oldendexe\endexe
\def\endexe{\oldendexe\vspace{\topsep}}% Add \topsep gap below exe environment
\doublespacing
\begin{document}
\noindent Here is a German example:
\begin{exe}
    \ex
    \gll Den Hund des Mannes\\
    the.\textsc{acc} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
It would be better to write the following:
\begin{exe}
    \ex
    \gll Der Hund des Mannes\\
    the.\textsc{nom} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
These were two great examples! Below are some examples of German verbs and nouns.

\begin{table}[ht]
\begin{minipage}[t]{0.5\linewidth}
\doublespacing
\begin{exe}
    \ex
        \begin{tabular}[t]{l l}
            \multicolumn{2}{c}{Verbs}\\
            \textit{leben} & `live'\\
            \textit{haben} & `have'\\
            \textit{sehen} & `see'\\
        \end{tabular}
\end{exe}
\end{minipage}
\begin{minipage}[t]{0.5\linewidth}
\doublespacing
\begin{exe}
    \ex
        \begin{tabular}[t]{l l}
            \multicolumn{2}{c}{Nouns}\\
            \textit{Erde} & `earth'\\
            \textit{Hand} & `hand'\\
            \textit{Haus} & `house'\\
        \end{tabular}
\end{exe}
\end{minipage}
\end{table}
Aren't German words cool?
\end{document}

在此处输入图片描述

答案1

环境exe仅设置一个list,通常以 开头\topsep。您可以将其添加到\endexe

在此处输入图片描述

\documentclass{article}
\usepackage{setspace,gb4e}% http://ctan.org/pkg/{setspace,gb4e}
\let\oldendexe\endexe
\def\endexe{\oldendexe\vspace{\topsep}}% Add \topsep gap below exe environment
\doublespacing
\begin{document}
\noindent Here is a German example:
\begin{exe}
    \ex
    \gll Den Hund des Mannes\\
    the.\textsc{acc} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
It would be better to write the following:
\begin{exe}
    \ex
    \gll Der Hund des Mannes\\
    the.\textsc{nom} dog the.\textsc{gen} man.\textsc{gen}\\
\end{exe}
These were two great examples!
\end{document}

相关内容