# [NTG-context] Hyphenation documentation

Wolfgang Schuster schuster.wolfgang at gmail.com
Sun Apr 21 10:26:01 CEST 2013

Am 20.04.2013 um 22:05 schrieb Sietse Brouwer <sbbrouwer at gmail.com>:

> Hello all,
>
> I've just pulled together some questions of mine and their answers,
> and written them up into a hyphenation Q&A.
> http://wiki.contextgarden.net/Hyphenation
> http://wiki.contextgarden.net/Command/definebreakpoint
>
> Unfortunately, there are still some holes in the documentation I
> wrote. Questions I still have, and which I now pose to the list:
>
> 1. how do I protect a single instance of a word against hyphenation?
> Does ConTeXt, like LaTeX, use \hbox{myfragileword}, or something
> different?

No, you have to use \hbox too but I think a command with a speaking
name would be better.

> 2. In the command \definebreakpoint, what do these keys do? I can't
> get them to do anything (MWE below)
> ** left
> ** middle
> ** right

The left, right and middle keys are used in combination with “type=5”.

\definebreakpoints[test]

\definebreakpoint [test] [?] [type=5,left=L,right=R,middle=M]

\setbreakpoints[test]

\setuppapersize[A7]

\starttext \showframe
xxxx?xxxx?xxxx?xxxx?xxxx?xxxx?xxxx?xxxx\par
\stoptext

> 3. Is there perhaps a bug in breakpoints of type 2 and 3. (MWE below.)
> The key 'type' seems to control where hyphens appear. If 1 is a
> hyphenation character of type 1, etc, this is the observed behaviour
> (/ is the linebreak):
> ...1...1  / ...
> ...2...   / 2-...   % I would expect: ...2... / -2...
> ...3...-3 / ...     % I would expect: ...3...3- / ...
> ...4...4  / 4...
> ......    / ...     % breakpoint of type 5 just disappears

Type 2 and 3 are used for braces to have line breaks which produce

(xxx-)
xxx

and

xxx
(-xxx)

> If this behaviour is not a bug: is there a way to set a breakpoint X
> that produces ...X...X- / …?

You have to use type 5 to create a rule for this, do you have a example
where this is needed besides the one mentioned in the duden [1] example
for a closing bracket.

[1] http://www.duden.de/sprachwissen/sprachratgeber/klammern-und-bindestrich-bei-der-worttrennung

Wolfgang