blob: 6c3c554f394dbdd093f88bb45940352069aa145c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
% Dichiarazione per sostituire \showhyphens al fine di eseguire le
% prove necessarie per verificare i pattern di divisione in sillabe.
%
% Uso:
% \begingroup\printhyphens
% <lista di parole>
% \endgroup
%
% oppure:
% \begin{printhyphens}
% <lista di parole>
% \end{printhyphens}
%
% Riferimento: Victor Eijkout, ``The bag of tricks'', TUGboat 14.4 (1993)
% p.424
%
\def\printhyphens{\everypar{\setbox0\lastbox \setbox1\hbox{\strut}\vbox\bgroup
\everypar{\setbox0\lastbox \nobreak\hskip\z@\relax}\dimen0=\hsize
\hsize=\z@ \hfuzz\maxdimen \def\par{\endgraf \hsize=\dimen0\getlastline
\egroup\endgraf}}\offinterlineskip\breakafterword}
\def\breakafterword{\catcode`\^^M\active\catcode`\ \active}
{\breakafterword\gdef^^M{\par}\global\let ^^M}
\def\getlastline{\setbox0\lastbox\ifvoid0\let\next\nomorelines
\else\unskip\unpenalty\setbox1\hbox{\unhbox0\strut\discretionary{}{}{}%
\unhbox1}\let\next\getlastline\fi\next}
\def\nomorelines{\unhbox1}
\endinput
|