gb4e:幻影,间距

gb4e:幻影,间距

为了给我的直行例子提供上下文的序言,我使用\pream\pgltgb4e:删除前言/标题行下方的多余空格

这完全没问题,除非我想包含可接受性判断。显然,我不能使用 的固有判断功能gb4e,因为这会将判断放在上下文之前而不是第一行之前。作为一种解决方法,我想到将判断放在示例本身的第一行中,并{}在第二行中使用空的词素注释。然而,这会导致翻译行出现奇怪的间距,即使使用\hphantom。有人有解决这个问题的方法吗?

\documentclass{scrbook}   
\usepackage{gb4e}  
\usepackage{lipsum}  
\newcommand{\pream}[1]{#1:\\[-4.5ex]} % for preamble lines, supplies a colon and removes some vertical space
\newcommand{\pglt}{\vspace*{-2ex}\glt} % for use in examples that have a preamble
\begin{document}  

The judgement function of gb4e does not yield an acceptable result with $\backslash$ pream:
\begin{exe}
\ex[\#]{\pream{Context: Somebody has arrived late.}
\gll Ich bin schon da\\
I am already there\\
\pglt \lq I am here already.'}
\end{exe}

Putting the judgement in the example line yields unacceptable spacing in the gloss line, even with $\backslash$ hphantom:
\begin{exe}
\ex \pream{Context: Somebody has arrived late.}
\gll \# Ich bin schon da\\
{} I am already there\\
\pglt \lq I am here already.'
\ex \pream{Context: Somebody has arrived late.}
\gll \# Ich bin schon da\\
{} I am already there\\
\pglt \hphantom{\#} \lq I am here already.'
\end{exe}
\end{document}

MWE 的屏幕截图

答案1

格布

这个问题的解决方案与alexis 提供的解决方案关于如何在翻译行前面放置判断标记的问题:您可以使用\llap。请参阅该答案以获取有关其工作原理的更多解释。

在下面的例子中,我定义了\context而不是\pream,它添加了“Context:”并且没有最后的冒号。

\documentclass{scrbook}   
\usepackage{gb4e}  
\newcommand{\context}[1]{Context: #1\\[-4.5ex]} % for context lines, supplies Context: and removes some vertical space
\newcommand{\cglt}{\vspace*{-2ex}\glt} % for use in examples that have a context
\begin{document}  

\begin{exe}
\ex{\context{Somebody has arrived late.}
\gll \llap{\#}Ich bin schon da\\
I am already there\\
\cglt \lq I am here already.'}
\end{exe}

\end{document}

在此处输入图片描述

专家

正如您在问题中引用的我的另一个答案中所提到的,expex开箱即用地提供序言支持,并且该\ljudge命令可以放在任何行上。

\documentclass{scrbook}   

\usepackage{expex}
\lingset{ % sets expex options
    everygla=, % top line of gloss is not italics
    belowglpreambleskip=-0.5ex, % removes some vertical space between the preamble and gloss lines
    aboveglftskip=-0.5ex, % removes some vertical space between the gloss and free translation lines
    everyglpreamble={Context:\ }, % puts the Context: at the beginning of each preamble; you could define this locally to a lingstyle if you want this for some but not all examples
}

\begin{document}  

\ex
    \begingl
    \glpreamble Somebody has arrived late. //
    \gla\ljudge{\#}Ich bin schon da //
    \glb I am already there //
    \glft \lq I am here already.' //
    \endgl
\xe

\end{document}

在此处输入图片描述

相关内容