[tex-hyphen] Why does "\-" not work?

Claudio Beccari claudio.beccari at gmail.com
Tue Aug 23 17:56:45 CEST 2016


Adrian,
hyphenation with original tex-the-program, and with its descendants such 
as pdftex and xetex (luatex is an exception) with or without the 
corresponding latex format, is inhibited after an explicit or an 
implicit font change (this is why it does not work after a sectioning 
command, and when certain macros are too close to the end of a string 
that might be a word;  this seems to be your case. You might leave that 
\paragraph{ddd} in place and \flushleft in place if you put some glue 
around the the word; try this:
\paragraph{ddd}\hskip 1sp
ddd
\hskip1sp\flushleft
(in place of 1sp, you might specify a zero width glue blob: \hskip0pt; 
it should work the same).

What I said at the beginning is written in clearer words in appendix H 
of the TeXbook.
Claudio


On 23/08/2016 11:12, Adrian Fronda wrote:
> Thank you Arthur for your idea.
>
> The problem is that no word is hyphenated after the lines quoted below. Also when I comment out \flushleft, the hyphenating does happen.
>
> Again, many thanks,
> Adrian
>
>
>> On 22 Aug 2016, at 17:11, Arthur Reutenauer <arthur.reutenauer at normalesup.org> wrote:
>>
>>> If before the word to be hyphenated I have the two subsequent commands:
>>>
>>> \paragraph{ddd}
>>> ddd
>>> \flushleft
>>>
>>> then that blocks any sort of hypenating. Commenting out any of these two commands solves the problem.
>>   It’s likely that your problem is simply a consequence of TeX not
>> hyphenating the first word in a paragraph (except for LuaTeX), and you
>> may run into this in other situations.
>>
>> 	Best,
>>
>> 		Arthur
>



More information about the tex-hyphen mailing list