Jesteś w: Start / Przedsięwzięcia/Projects / TeX Pearls / 2008 Pearls / karl-berry / bachotex2008-karl-berry-pearl1.tex

bachotex2008-karl-berry-pearl1.tex

TeX document icon bachotex2008-karl-berry-pearl1.tex — TeX document, 1 KB

Zawartość pliku

%%% word double-hyphenation
% (saw in Peter Szabo's papers)

% How about this macro for an explicit hyphen that does not inhibit
% further hyphenation within the word?  (It's not original with me; the
% \TeX{}nique was first described by Knuth, I believe.)

\def\xhyphen{\leavevmode\nobreak-\hskip0pt }

% Let's compare the following two paragraphs:

\hsize=2.5in

How about this macro for an explicit hyphen that does not inhibit
further-hyphenation within the word?

How about this macro for an explicit hyphen that does not inhibit
further\xhyphen hyphenation within the word?

% All the magic is done by the \hskip0pt, which essentially
% starts a new word as far as \TeX\ is concerned (in the middle
% of the hyphenated word), thus giving it a new chance at
% hyphenation. The \leavemode merely avoids the penalty being added
% to the vertical list, in case the macro is used at the beginning of a
% paragraph.

\end