diff options
author | Karl Berry <karl@freefriends.org> | 2014-07-12 22:24:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-07-12 22:24:39 +0000 |
commit | c59dc96c8263aaa3f471400ef7cab8336e7f1c1c (patch) | |
tree | c311c3a73373c0f90926d438674a8a0f94e055c9 /Master/texmf-dist/tex/latex/testhyphens/testhyphens.sty | |
parent | 805c1e3d89602317d7836d0876986ae090b0a403 (diff) |
testhyphens (12jul14)
git-svn-id: svn://tug.org/texlive/trunk@34581 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/testhyphens/testhyphens.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/testhyphens/testhyphens.sty | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/testhyphens/testhyphens.sty b/Master/texmf-dist/tex/latex/testhyphens/testhyphens.sty new file mode 100644 index 00000000000..383b7ea5f0d --- /dev/null +++ b/Master/texmf-dist/tex/latex/testhyphens/testhyphens.sty @@ -0,0 +1,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/07/07 v.0.5 +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'. |