blob: b93c9f49b5aec78f7c6b8d9d0ee454cb3cb661e8 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
%%
%% This is file `testhyphens.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% testhyphens.dtx (with options: `package')
%% Copyright 2014 Claudio Beccari All rights reserved.
%%
%% This system is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%% This file is distributed under the LPPL licence, version 1.3c
%% dated 2008-05-04 or later as it appears in
%% CTAN/macros/latex/base/lppl.tex.
%% See the end of the file.
%%
%% IMPORTANT NOTICE:
%%
%% You are allowed to distribute this file under the conditions that are
%% specified in the source file testhyphens.dtx.
%%
%% If you receive only some of these files from someone, complain!
%%
%% You are NOT ALLOWED to distribute this file alone.
%% You are NOT ALLOWED to take money for the distribution or use
%% of either this file or a changed version, except for a nominal
%% charge for copying, etc.
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{testhyphens}[%
2014/09/13 v.0.6
Prints list of hyphenated words]
\def\t@sthyphens{\everypar{\setbox0\lastbox \setbox1\hbox{\strut}\vbox\bgroup
\offinterlineskip
\everypar{\setbox0\lastbox \nobreak\hskip\z@}\dimen0=\hsize
\hsize=\z@ \hfuzz\maxdimen \def\par{\endgraf \hsize=\dimen0\getlastline
\egroup\endgraf}}\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}
\let\testhyphens\t@sthyphens
\newenvironment{checkhyphens}[1][\lefthyphenmin-\righthyphenmin]{%
\@tempcnta=\lefthyphenmin
\@tempcntb=\righthyphenmin
\s@thyphenpars[#1]\par\bgroup\t@sthyphens
}{%
\egroup\par
}
\def\s@thyphenpars[#1-#2]{%
\@tempcnta=#1\relax
\@tempcntb=#2\relax
\unless\ifnum\@tempcnta=\lefthyphenmin \lefthyphenmin=\@tempcnta\fi
\unless\ifnum\@tempcntb=\righthyphenmin \righthyphenmin=\@tempcntb\fi
}
\endinput
%%
%% End of file `testhyphens.sty'.
|