[texhax] Preserving dash when hyphenating compound words

Uwe Lueck uwe.lueck at web.de
Sat Aug 28 14:22:18 CEST 2010

Hello Alex,

Aleksandar Zec , 27.08.2010 21:41:03
>2010/8/19 Uwe Lueck :
>> \hyp or that macro it calls according to the hyphenat documentation might be redefined (about as follows) or you use some \dhyp or so instead of \hyp with
>>    \newcommand{\dhyp}{\discretionary{-}{-}{-}}
>> (not tested, sorry; if it works, why use hyphenat?) cf. TeXbook on \discretionary.
>This \dhyp indeed produces intended additional dash, but it disables
>hyphenation of compound words. I actually need

you are right, I didn't think of this. 

>and hyphenat's \BreakableHyphen serves this purpose. So, some
>experimenting shows that this code gives good results in all cases:
>  \ifmmode-\else\BreakableHyphen\fi}
>and electroencephalography\\
>Not very elegant, though.

I should be able to find a more elegant solution, once I studied these things -- but must do other things right now.



More information about the texhax mailing list