如何在 Context 中做悬挂缩进?

如何在 Context 中做悬挂缩进?

如何在 Context 中执行悬挂缩进?我一直在查看我找到的几个示例,例如http://wiki.contextgarden.net/MLA_style,但无法按我想要的方式运行。此外,workscitedContext 中的函数也不适合我。

我只是想做一个悬挂缩进,但找不到直接的方法来做到这一点。下面是一个尝试使用 TeX 的绝望(最小不起作用)示例hangindent

\setupindenting[1em]
\setuppapersize[A5][A5]


\starttext
\indenting[yes, next] % turn on regular indenting of first line of paragraph, excluding the first paragraph

\subject{A normal section}

This paragraph is not indented since it is the first one!

Hello and miau, this is the second paragraph that is indented by exactly one em, isn't it?

\subject{Works cited}

% We want those to be indented hanging: The first line should begin at the margin while following lines of each paragraph is indented by one em.

\hangindent=1em
\hangafter=1

Jaynes, Julian. {\os 1990}. {\em The Origin of Consciousness in the Breakdown of the Bicameral Mind}. New York City: Houghton Mifflin Company.

Pye, David. {\os 1995}. {\em The Nature and Art of Workmanship}. London: The Herbert Press.

Persson, Tomas. {\os 2008}. {\em Pictorial Primates: A Search for Iconic Abilities in Great Apes}. Lund: Lund University Cognitive Studies.

\stoptext

非常感谢您的帮助!谢谢!

答案1

definition、、enumeration等ConTeXt 环境list提供了控制悬挂的键,但没有为所有段落设置悬挂的环境。

设置 TeX 基元\hangindent\hangafter你设置的方式不起作用,因为 TeX 会重置每个段落的悬挂缩进!因此,要设置悬挂缩进段落,删除宏后的空格\hang...。因此

\hangindent=1em
\hangafter=1
% No new paragraph here!
Jaynes, Julian. {\os 1990}. {\em The Origin of Consciousness in the Breakdown of the Bicameral Mind}. New York City: Houghton Mifflin Company.

因此,如果要对多个段落进行悬挂缩进,请使用

\EveryPar{\hangafter=1\hangindent=1em\relax}

无论哪种情况,都可以使用以下方法禁用正常缩进\setupindenting[no]

相关内容