我正在尝试控制文档中的自动连字符数量。但我指定的所有选项似乎都没有任何效果。以下 MWE 显示两个段落中有六个带连字符的单词。整个文档的其余部分都是这种情况。欢迎提出任何建议。
另外,我想在边距文本中完全禁用连字符。align=flushleft
仍然给出带连字符的单词。在 latex 中, \hyphenpenalty=10000
完全禁用连字符。
有没有类似的选项context
?
平均能量损失
\setupbodyfont[modern,11pt]
\setuplayout[width=12cm]
\setuptolerance[horizontal,stretch]
\definefontfeature [default] [default] [expansion=quality]
\setupalign [hz]
\starttext
Various Monte Carlo methods are the most popular tool for propagating
uncertainty during robust design and optimisation. Theoretically, Monte Carlo
methods can generate arbitrarily accurate estimates of mean and variance.
However, the convergence is slow and many engineering scenarios do not justify
the computational expense demanded by the nonlinear Monte Carlo
methods.
The proposed Inexpensive Monte Carlo (IMC) method is a cost efficient
alternative to the nonlinear Monte Carlo method under certain assumptions.
Judicious use of IMC method can greatly speed-up uncertainty propagation for
robust design algorithms. This chapter outlines motivation behind the proposed
IMC method. Probable application areas are identified along with a survey
of various alternative methods available presently.
The basic formulation of IMC method is presented. The
implementation details and the effectiveness of the methods are explored using a
simple algebraic model problem. The limitations of the IMC method are also
demonstrated in a clear fashion using the model problem. Finally, the last
section compares performance of the proposed IMC methods with the more
traditional moment methods for the model problem.
\stoptext
答案1
[...]
\setupalign [hz]
\lefthyphenmin=4
\starttext
[...]
答案2
您也可以在 ConTeXt 中使用\hyphenpenalty1000
。但是,ConTeXt 原生的抑制连字符的方法是使用
\setupalign [nothyphenated]
要仅对\margintext
您禁止连字符,请使用命令\setupmargindata
\setupmargindata
[margintext]
[align=nothyphenated]
要应用多个键,请align
用逗号分隔它们并用括号括起来:
\setupmargindata
[margintext]
[align={nothyphenated, flushright}]
答案3
正如 Herbert 所说,您可以尝试更改 的值。如果您使用的是多语言文档,则可以更改每种语言lefthyphenmin
的值。lefthyphenmin
\setuplanguage[en][lefthyphenmin=4]
\setuplanguage[de][lefthyphenmin=3]
ConTeXt 还定义了两个宏:\lesshypens
和,分别增加和减少和\morehyphens
的值。lefthyphenmin
righthyphenmin