diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/chickenize/chickenize.tex')
-rw-r--r-- | Master/texmf-dist/tex/luatex/chickenize/chickenize.tex | 119 |
1 files changed, 97 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/luatex/chickenize/chickenize.tex b/Master/texmf-dist/tex/luatex/chickenize/chickenize.tex index 955102e8a41..185c8e6326e 100644 --- a/Master/texmf-dist/tex/luatex/chickenize/chickenize.tex +++ b/Master/texmf-dist/tex/luatex/chickenize/chickenize.tex @@ -8,25 +8,46 @@ %% %% EXPERIMENTAL CODE %% -%% This package is copyright © 2013 Arno L. Trautmann. It may be distributed and/or +%% This package is copyright © 2015 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’. -\input{luatexbase.sty} \directlua{dofile(kpse.find_file("chickenize.lua"))} +\def\ALT{% + \bgroup% + \fontspec{Latin Modern Sans}% + A% + \kern-.37em \raisebox{.7ex}{\scalebox{0.25}{L}}% + \kern-.0em \raisebox{-0.98ex}{T}% + \egroup% +} + +\def\allownumberincommands{ + \catcode`\0=11 + \catcode`\1=11 + \catcode`\2=11 + \catcode`\3=11 + \catcode`\4=11 + \catcode`\5=11 + \catcode`\6=11 + \catcode`\7=11 + \catcode`\8=11 + \catcode`\9=11 +} + \def\BEClerize{ \chickenize \directlua{ - chickenstring[1] = "noise noise" - chickenstring[2] = "atom noise" - chickenstring[3] = "shot noise" - chickenstring[4] = "photon noise" - chickenstring[5] = "camera noise" - chickenstring[6] = "noising noise" - chickenstring[7] = "thermal noise" - chickenstring[8] = "electronic noise" - chickenstring[9] = "spin noise" + chickenstring[1] = "noise noise" + chickenstring[2] = "atom noise" + chickenstring[3] = "shot noise" + chickenstring[4] = "photon noise" + chickenstring[5] = "camera noise" + chickenstring[6] = "noising noise" + chickenstring[7] = "thermal noise" + chickenstring[8] = "electronic noise" + chickenstring[9] = "spin noise" chickenstring[10] = "electron noise" chickenstring[11] = "Bogoliubov noise" chickenstring[12] = "white noise" @@ -53,6 +74,11 @@ \def\unboustrophedoninverse{ \directlua{luatexbase.remove_from_callback("post_linebreak_filter","boustrophedon_inverse")}} +\def\bubblesort{ + \directlua{luatexbase.add_to_callback("post_linebreak_filter",bubblesort,"bubblesort")}} +\def\unbubblesort{ + \directlua{luatexbase.remove_from_callback("bubblesort","bubblesort")}} + \def\chickenize{ \directlua{luatexbase.add_to_callback("pre_linebreak_filter",chickenize,"chickenize") luatexbase.add_to_callback("start_page_number", @@ -78,7 +104,12 @@ \directlua{luatexbase.remove_from_callback("post_linebreak_filter","stretch_expansion")}} \def\countglyphs{ - \directlua{glyphnumber = 0 spacenumber = 0 + \directlua{ + counted_glyphs_by_code = {} + for i = 1,10000 do + counted_glyphs_by_code[i] = 0 + end + glyphnumber = 0 spacenumber = 0 luatexbase.add_to_callback("post_linebreak_filter",countglyphs,"countglyphs") luatexbase.add_to_callback("stop_run",printglyphnumber,"printglyphnumber") } @@ -168,6 +199,19 @@ \def\unleetspeak{ \directlua{luatexbase.remove_from_callback("post_linebreak_filter","1337")}} +\def\leftsideright#1{ + \directlua{luatexbase.add_to_callback("pre_linebreak_filter",leftsideright,"leftsideright")} + \directlua{ + leftsiderightindex = {#1} + leftsiderightarray = {} + for _,i in pairs(leftsiderightindex) do + leftsiderightarray[i] = true + end + } +} +\def\unleftsideright{ + \directlua{luatexbase.remove_from_callback("pre_linebreak_filter","leftsideright")}} + \def\letterspaceadjust{ \directlua{luatexbase.add_to_callback("pre_linebreak_filter",letterspaceadjust,"letterspaceadjust")}} \def\unletterspaceadjust{ @@ -187,13 +231,18 @@ \def\matrixize{ \directlua{luatexbase.add_to_callback("pre_linebreak_filter",matrixize,"matrixize")}} \def\unmatrixize{ - \directlua{luatexbase.remove_from_callback("pre_linebreak_filter",matrixize)}} + \directlua{luatexbase.remove_from_callback("pre_linebreak_filter","matrixize")}} \def\milkcow{ %% FIXME %% to be implemented \directlua{}} \def\unmilkcow{ \directlua{}} +\def\medievalumlaut{ + \directlua{luatexbase.add_to_callback("post_linebreak_filter",medievalumlaut,"medievalumlaut")}} +\def\unmedievalumlaut{ + \directlua{luatexbase.remove_from_callback("post_linebreak_filter","medievalumlaut")}} + \def\pancakenize{ \directlua{luatexbase.add_to_callback("stop_run",pancaketext,"pancaketext")}} @@ -203,8 +252,8 @@ \def\unrainbowcolor{ \directlua{luatexbase.remove_from_callback("post_linebreak_filter","rainbowcolor") rainbowcolor = false}} - \let\nyanize\rainbowcolor - \let\unnyanize\unrainbowcolor +\let\nyanize\rainbowcolor +\let\unnyanize\unrainbowcolor \def\randomcolor{ \directlua{luatexbase.add_to_callback("post_linebreak_filter",randomcolor,"randomcolor")}} @@ -248,16 +297,42 @@ \directlua{addtosubstitutions("#1","#2")} } +\def\suppressonecharbreak{ + \directlua{luatexbase.add_to_callback("pre_linebreak_filter",suppressonecharbreak,"suppressonecharbreak")}} +\def\unsuppressonecharbreak{ + \directlua{luatexbase.remove_from_callback("pre_linebreak_filter","suppressonecharbreak")}} + \def\tabularasa{ \directlua{luatexbase.add_to_callback("post_linebreak_filter",tabularasa,"tabularasa")}} \def\untabularasa{ \directlua{luatexbase.remove_from_callback("post_linebreak_filter","tabularasa")}} +\def\tanjanize{ + \directlua{luatexbase.add_to_callback("post_linebreak_filter",tanjanize,"tanjanize")}} +\def\untanjanize{ + \directlua{luatexbase.remove_from_callback("post_linebreak_filter","tanjanize")}} + \def\uppercasecolor{ \directlua{luatexbase.add_to_callback("post_linebreak_filter",uppercasecolor,"uppercasecolor")}} \def\unuppercasecolor{ \directlua{luatexbase.remove_from_callback("post_linebreak_filter","uppercasecolor")}} +\def\upsidedown#1{ + \directlua{luatexbase.add_to_callback("post_linebreak_filter",upsidedown,"upsidedown")} + \directlua{ + upsidedownindex = {#1} + upsidedownarray = {} + for _,i in pairs(upsidedownindex) do + upsidedownarray[i] = true + end + } +} +\def\unupsidedown{ + \directlua{luatexbase.remove_from_callback("post_linebreak_filter","upsidedown")}} + +\def\unuppercasecolor{ + \directlua{luatexbase.remove_from_callback("post_linebreak_filter","upsidedow")}} + \def\variantjustification{ \directlua{luatexbase.add_to_callback("post_linebreak_filter",variantjustification,"variantjustification")}} \def\unvariantjustification{ @@ -267,13 +342,13 @@ \directlua{luatexbase.add_to_callback("post_linebreak_filter",zebranize,"zebranize")}} \def\unzebranize{ \directlua{luatexbase.remove_from_callback("post_linebreak_filter","zebranize")}} -\newluatexattribute\leetattr -\newluatexattribute\letterspaceadjustattr -\newluatexattribute\randcolorattr -\newluatexattribute\randfontsattr -\newluatexattribute\randuclcattr -\newluatexattribute\tabularasaattr -\newluatexattribute\uppercasecolorattr +\newattribute\leetattr +\newattribute\letterspaceadjustattr +\newattribute\randcolorattr +\newattribute\randfontsattr +\newattribute\randuclcattr +\newattribute\tabularasaattr +\newattribute\uppercasecolorattr \long\def\textleetspeak#1% {\setluatexattribute\leetattr{42}#1\unsetluatexattribute\leetattr} |