Jesteś w: Start / Przedsięwzięcia/Projects / TeX Pearls / 2005 Pearls / david-kastrup / bachotex2005-david-kastrup-pearl2.tex


TeX document icon bachotex2005-david-kastrup-pearl2.tex — TeX document, 1 KB

Zawartość pliku

%%% David Kastrup: Words sorting
% ``Finnegans Wake'' by James Joyce is a book that is not easily
% comprehensible.  \TeX\ can systematize the approach to the text by
% confronting the reader with the longest, and consequently hardest
% words last.

   \parfillskip0pt\noindent#1\par}\sortvlist\unpack}\unvbox0 }
\def\sortvlist{{\unskip\unpenalty \setbox0\lastbox
  \ifvoid0\noindent\else\setbox0\hbox{\unhbox0\ }\sortvlist\sortin\fi}}

% example

\sorttext{riverrun, past Eve and Adam's, ... linsfirst loved livvy.}