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}