我的部分数据是诗歌文本,我更喜欢逐行注释。我尝试了以下设置 (MWE):
\documentclass{article}
\usepackage{gb4e}
\begin{document}
\begin{exe}
\ex \gll der wídem vnd der zehent gar. \\
of endowments and of tithe even \\
\gll wærn \textbf{baidev} \textbf{warn} bar. \\
would\_be.PL both-NOM.PL.N.ST child[NOM.PL.NEUT] bereft \\
\trans `the children would be bereft of endowments and thithes'
\end{exe}
\end{document}
这样就可以生成所需的逐行注释,但是,'\gll
和 '之间的间距\trans
可能会延伸到愚蠢的长度——大约 10 毫米。有没有一种方便的方法可以让元素之间的垂直间距保持合理,比如将其固定在.5\baselineskip
,而无需\vspace{-somevalue}
手动粘贴示例?我当前的文档设置已经有
\renewcommand{\eachwordtwo}{\rule[-.5\baselineskip]{0pt}{0pt}}
到增加光泽之间的空间包含多行连续文本。
编辑
根据要求的最相关的实际设置@gernot我将问题追溯到enumitem
阻止在 exe 环境中操作空格的包:
\documentclass{memoir}
\usepackage{enumitem}
\usepackage{gb4e}
\begin{document}
\OnehalfSpacing
\begin{exe}
\topsep=0pt
\partopsep=0pt
\ex \gll der wídem vnd der zehent gar. \\
of endowments and of tithe even \\
\gll wærn \textbf{baidev} \textbf{warn} bar. \\
would\_be.PL both-NOM.PL.N.ST child[NOM.PL.NEUT] bereft \\
\trans `the children would be bereft of endowments and thithes'
\end{exe}
\end{document}
答案1
\gll
如果要通过连续使用多个 s 来控制换行符,请定义一个compactexe
如下所示的环境(放入序言中)并使用它来代替环境exe
。
\makeatletter
\newenvironment{compactexe}{%
\begin{exe}%
\topsep=0pt% if package enumitem is not used
\partopsep=0pt% if package enumitem is not used
% Otherwise, if package enumitem is used:
\expandafter\def\expandafter\@listi\expandafter{%
\@listi
\topsep=0pt
}%
}{%
\end{exe}%
}
\makeatother
如果您不介意换行符,请只使用一个,\gll
然后是完整的第一行,\\
完整的第二行,然后是另一个\\
。该包将根据需要引入换行符。
下面的例子中说明了两个版本。
\documentclass{memoir}
\usepackage{enumitem}
\usepackage{gb4e}
\makeatletter
\newenvironment{compactexe}{%
\begin{exe}%
\topsep=0pt% if package enumitem is not used
\partopsep=0pt% if package enumitem is not used
% Otherwise, if package enumitem is used:
\expandafter\def\expandafter\@listi\expandafter{%
\@listi
\topsep=0pt
}%
}{%
\end{exe}%
}
\makeatother
\begin{document}
\begin{compactexe}
\ex \gll der wídem vnd der zehent gar. \\
of endowments and of tithe even \\
\gll wærn \textbf{baidev} \textbf{warn} bar. \\
would\_be.PL both-NOM.PL.N.ST child[NOM.PL.NEUT] bereft \\
\trans `the children would be bereft of endowments and thithes'
\end{compactexe}
\begin{exe}
\ex \gll der wídem vnd der zehent gar. wærn \textbf{baidev} \textbf{warn} bar.\\
of endowments and of tithe even
would\_be.PL both-NOM.PL.N.ST child[NOM.PL.NEUT] bereft \\
\trans `the children would be bereft of endowments and thithes'
\end{exe}
\end{document}