summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/chickenize/chickenize.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-08-23 22:23:28 +0000
committerKarl Berry <karl@freefriends.org>2013-08-23 22:23:28 +0000
commit36d1d77df4b427cbfe704728c105d21f7309501e (patch)
tree20f8d4389f0c7cef02c77710795ee565053267f2 /Master/texmf-dist/tex/luatex/chickenize/chickenize.tex
parentb44a7f20775186141f597af51da768dfdb3a65f1 (diff)
chickenize (23aug13)
git-svn-id: svn://tug.org/texlive/trunk@31505 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/chickenize/chickenize.tex')
-rw-r--r--Master/texmf-dist/tex/luatex/chickenize/chickenize.tex20
1 files changed, 17 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/luatex/chickenize/chickenize.tex b/Master/texmf-dist/tex/luatex/chickenize/chickenize.tex
index 36aff989800..955102e8a41 100644
--- a/Master/texmf-dist/tex/luatex/chickenize/chickenize.tex
+++ b/Master/texmf-dist/tex/luatex/chickenize/chickenize.tex
@@ -8,7 +8,7 @@
%%
%% EXPERIMENTAL CODE
%%
-%% This package is copyright © 20012 Arno L. Trautmann. It may be distributed and/or
+%% This package is copyright © 2013 Arno L. Trautmann. It may be distributed and/or
%% modified under the conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version. This work has the LPPL mainten-
%% ance status ‘maintained’.
@@ -78,15 +78,29 @@
\directlua{luatexbase.remove_from_callback("post_linebreak_filter","stretch_expansion")}}
\def\countglyphs{
- \directlua{glyphnumber = 0
+ \directlua{glyphnumber = 0 spacenumber = 0
luatexbase.add_to_callback("post_linebreak_filter",countglyphs,"countglyphs")
luatexbase.add_to_callback("stop_run",printglyphnumber,"printglyphnumber")
}
}
+\def\countwords{
+ \directlua{wordnumber = 0
+ luatexbase.add_to_callback("pre_linebreak_filter",countwords,"countwords")
+ luatexbase.add_to_callback("stop_run",printwordnumber,"printwordnumber")
+ }
+}
+
+\def\detectdoublewords{
+ \directlua{
+ luatexbase.add_to_callback("post_linebreak_filter",detectdoublewords,"detectdoublewords")
+ luatexbase.add_to_callback("stop_run",printdoublewords,"printdoublewords")
+ }
+}
+
\def\dosomethingfunny{
%% should execute one of the “funny” commands, but randomly. So every compilation is completely different. Maybe a list of commands could be specified to exclude total nonesense-functions. Maybe also on a per-paragraph-basis?
- }
+}
\def\dubstepenize{
\chickenize