当几个例子接连出现时,我想减少空间。我的例子都很长(几行),而且我提供了自由翻译(无注释)。
[编辑]这是一个最小工作示例的尝试:
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\newcounter{ex}
\usepackage{enumitem}
\usepackage{gb4e}
\noautomath
\makeatletter
\apptocmd{\@exe}{\singlespacing}{}{}
\makeatother
\begin{document}
... François Bayrou:
\begin{exe}
\ex \begin{otherlanguage*}{french}\textsc{Lucien Degauchy (UMP)} [majority]: C’est Bayrou qui a écrit ce discours ! (FR 2006.12.12) \end{otherlanguage*} \\
\begin{small} \emph{\textsc{Lucien Degauchy (UMP)} [majority]: Bayrou has written this speech!} \end{small}
\end{exe}
It is thus widely acknowledged... \\
... the corpus:
\begin{exe}
\exr{ex:wrote}
{\textsc{Mr. David Cameron (Tories)} [majority]: \textbf{The right hon. Gentleman} clearly wrote his questions before coming to the House and listening to my statement. (UK 2011.12.12)}
\end{exe}
\begin{exe}
\ex \textsc{Sir Edward Leigh (Tories)} [majority]: We are all being a bit unfair on the Labour party. After all, 40 years ago it was the Labour party that gave us a referendum and, to be fair to the Liberals, they promised one in the last Parliament, although I do not understand why they have gone wobbly on trusting \textbf{the people}. Perhaps it is because \textbf{the people} may give the wrong answer. (UK 2015.03.23)
\end{exe}
\begin{exe}
\ex \textsc{Mr. David Cameron (Tories)} [majority]: The problem is, though, that \textbf{the people who have lent the money to Greece} want their money back, and they believe that Greece should carry out a series of reforms before they give it any more money. (UK 2015.03.23)
\end{exe}
\end{document}
还有更多软件包,但它们应该与问题无关。[编辑部分结束]
在序言中我使用:
\usepackage{gb4e}
\noautomath
和
\makeatletter
\apptocmd{\@exe}{\singlespacing}{}{}
\makeatother
以使示例为单倍行距。
我在用https://www.latextemplates.com/template/masters-doctoral-thesis。
当我仅提到一个例子时,它看起来就像我想要的那样:
这是示例8对应的代码:
\begin{exe}
\ex \begin{otherlanguage*}{french}\textsc{Lucien Degauchy (UMP)} [majority]: C’est Bayrou qui a écrit ce discours ! (FR 2006.12.12) \end{otherlanguage*} \\
\begin{small} \emph{\textsc{Lucien Degauchy (UMP)} [majority]: Bayrou has written this speech!} \end{small}
\end{exe}
但是我列出了几个例子,但事实并非如此,而且例子之间的间距太大:
这是与示例 5、34 和 35 对应的代码:
\begin{exe}
\exr{ex:wrote}
{\textsc{Mr. David Cameron (Tories)} [majority]: \textbf{The right hon. Gentleman} clearly wrote his questions before coming to the House and listening to my statement. (UK 2011.12.12)}
\end{exe}
\begin{exe}
\ex \textsc{Sir Edward Leigh (Tories)} [majority]: We are all being a bit unfair on the Labour party. After all, 40 years ago it was the Labour party that gave us a referendum and, to be fair to the Liberals, they promised one in the last Parliament, although I do not understand why they have gone wobbly on trusting \textbf{the people}. Perhaps it is because \textbf{the people} may give the wrong answer. (UK 2015.03.23)
\end{exe}
\begin{exe}
\ex \textsc{Mr. David Cameron (Tories)} [majority]: The problem is, though, that \textbf{the people who have lent the money to Greece} want their money back, and they believe that Greece should carry out a series of reforms before they give it any more money. (UK 2015.03.23)
\end{exe}
一个可能的解决方案是为每个示例添加\begin{singlespace*}
和\end{singlespace*}
,但是示例和下面的文本之间没有足够的空间。
另一个解决方案是在列表末尾只使用\begin{exe}
once 然后,但这样示例之间几乎没有任何空间,阅读起来非常不舒服。\end{exe}
我非常感谢你的帮助!
答案1
\ex
如果连续有多个es,则应将它们放在同一个环境中。这可避免因结束和开始新环境而导致 esexe
之间出现过多空格。\ex
exe
如果您觉得在这种情况下两个示例项之间的空间太窄,您可以在设置 时通过修改值来增加\itemsep
它。\singlespacing
\@exe
在下面的例子中,我们将两个项目之间的空间设置为其正常空间的两倍exe
,我认为这看起来不错,但您可以选择任何您喜欢的值。
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french,british]{babel}
\usepackage{libertine}
\usepackage{setspace}
\usepackage{etoolbox}
\usepackage{gb4e}
\noautomath
\makeatletter
\apptocmd{\@exe}{%
\singlespacing
\setlength{\itemsep}{2\itemsep}%
}{}{}
\makeatother
\newcommand*{\person}[1]{\textsc{#1}}
\newcommand*{\important}[1]{\textbf{#1}}
\begin{document}
\begin{exe}
\exr{ex:wrote} \person{Mr.\ David Cameron (Tories)} [majority]:
\important{The right hon.\ Gentleman} clearly wrote his questions before
coming to the House and listening to my statement. (UK 2011.12.12)
\ex \person{Sir Edward Leigh (Tories)} [majority]:
We are all being a bit unfair on the Labour party. After all, 40 years ago
it was the Labour party that gave us a referendum and, to be fair to the
Liberals, they promised one in the last Parliament, although I do not
understand why they have gone wobbly on trusting \important{the people}.
Perhaps it is because \textbf{the people} may give the wrong answer.
(UK 2015.03.23)
\ex \person{Mr.\ David Cameron (Tories)} [majority]:
The problem is, though, that \important{the people who have lent the money to
Greece} want their money back, and they believe that Greece should carry out
a series of reforms before they give it any more money. (UK 2015.03.23)
\end{exe}
Neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur,
adipisci velit
\begin{exe}
\ex
\begin{otherlanguage*}{french}
\person{Lucien Degauchy (UMP)} [majority]:
C’est Bayrou qui a écrit ce discours ! (FR 2006.12.12)
\end{otherlanguage*} \\
{\small \emph{\person{Lucien Degauchy (UMP)} [majority]: Bayrou has written this speech!}}
\end{exe}
\end{document}