summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/luatex/luaintro/04-04-11.lualtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/luatex/luaintro/04-04-11.lualtx')
-rw-r--r--Master/texmf-dist/doc/luatex/luaintro/04-04-11.lualtx46
1 files changed, 46 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/luatex/luaintro/04-04-11.lualtx b/Master/texmf-dist/doc/luatex/luaintro/04-04-11.lualtx
new file mode 100644
index 00000000000..451fda7fb13
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/luaintro/04-04-11.lualtx
@@ -0,0 +1,46 @@
+%%
+%% Ein Beispiel der DANTE-Edition
+%%
+%% 1. Auflage
+%%
+%% Beispiel 04-04-11 auf Seite 95.
+%%
+%% Copyright (C) 2013 Herbert Voss
+%%
+%% It may be distributed and/or modified under the conditions
+%% of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%%
+%% See http://www.latex-project.org/lppl.txt for details.
+%%
+%%
+%% ====
+% Show page(s) 1
+%%
+%%
+\documentclass[]{exaarticle}
+\pagestyle{empty}
+\setlength\textwidth{352.81416pt}
+\setlength\parindent{0pt}
+%StartShownPreambleCommands
+\usepackage{luacode,libertine}
+\begin{luacode}
+function checknode(List)
+ for t in node.traverse(List) do
+ if t.id==0 or t.id==1 then checknode(t.head) end
+ if t.id==37 then
+-- tex.print(unicode.utf8.char(t.char))
+ if (t.char>96 and t.char<122) or
+ t.char==228 or t.char==246 or t.char==252 then t.char=t.char-32 end
+ end
+ end
+return true
+end
+\end{luacode}
+\def\MUC#1{\setbox0=\hbox{#1}\directlua{checknode(tex.box[0].head)}\box0}
+%StopShownPreambleCommands
+\begin{document}
+\MUC{Freie Universität Berlin}
+\def\TU{Technische Universität Berlin}\MUC{\TU}
+\MUC{ÄÖÜäöüß}%196 214 220 228 246 252 223
+\end{document}