expex 序言中的悬挂缩进

expex 序言中的悬挂缩进

expex\glhangindent通过定义全局变量 via ,可以很好地显示带有悬挂缩进的长注释行lingset。我也想为序言 ( \glpreamble) 和自由翻译 ( \glft) 实现这一点?

我已尝试设置\lingset{everyglpreamble=\hangindent=1em,everyglft=\hangindent=1em}但出现错误(下面已注释掉)。

或者,我尝试\hangindent=1em直接放置在每行之前,这适用于\glft但不适合\glpreamble(将其设置为glpreamble不会导致悬挂缩进,但整行都会缩进)。
有什么方法可以使其工作并全局设置?非常感谢帮助!

\documentclass{article}
\usepackage{expex}
%\lingset{everyglpreamble=\hangindent=1em,everyglft=\hangindent=1em}
\begin{document}
\ex \begingl
\glpreamble \hangindent=1em This is a very long sentence to be glossed and I would like the preamble also to have a hanging indent.//
\gla Gloss this//
\glb gl gl//
\glft \hangindent=1em This is a translation of a very long sentence to be glossed and I would like the free translation also to have a hanging indent.//
\endgl \xe
\end{document}

只是为了澄清悬挂缩进的意思:

This is a very long sentence to be glossed and I would 
        like it to have a hanging indent

答案1

括号中的值:

\documentclass{article}
\usepackage{expex}
\lingset{everyglpreamble={\hangindent=1em \hspace*{-\hangindent}},everyglft={\hangindent=1em }}
\begin{document}
\ex \begingl
\glpreamble This is a very long sentence to be glossed and I would like
            the preamble also to have a hanging indent.//
\gla Gloss this//
\glb gl gl//
\glft This is a translation of a very long sentence to be glossed and
      I would like the free translation also to have a hanging indent.//
\endgl \xe
\end{document}

在此处输入图片描述

相关内容