![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
On Mon, 2 Mar 2020 12:22:26 +0100
Tomas Hala
Hi all,
in composed words in Czech and Slovak languages, the hyphen must be repeated at the beginning of the new line. How can I make it hanging at the left margin?
1. You have to enable hanging punctuation which is missing in your example. 2. You have to create your own protrusion vector because the predefined vectors set hanging for hyphens only for the right margin. The following example uses code shown in the fonts manual (fonts-mkiv.pdf) to create a custom protrusion vector: %%%% begin example \startluacode fonts.protrusions.classes.tomas_hala = { vector = 'tomas_hala', factor = 1, } fonts.protrusions.vectors.tomas_hala = table.merged ( fonts.protrusions.vectors.quality, { [0x002D] = { 0.4, 0.7 }, -- hyphen } ) \stopluacode \definebreakpoints [czcompound] \definebreakpoint [czcompound] [-] [nleft=3,nright=3,type=4] \startsetups [czech] \setbreakpoints [czcompound] \stopsetups \setuplanguage [cz] [setups=czech] \definefontfeature [default] [default] [protrusion=tomas_hala] \setupalign [hanging] \mainlanguage [cz] \showframe [text] [text] \starttext \hsize=0pt modro-zelený \stoptext %%%% end example Wolfgang