summaryrefslogtreecommitdiff
path: root/info/examples/luaintro/03-11-4.lualtx
diff options
context:
space:
mode:
Diffstat (limited to 'info/examples/luaintro/03-11-4.lualtx')
-rw-r--r--info/examples/luaintro/03-11-4.lualtx35
1 files changed, 35 insertions, 0 deletions
diff --git a/info/examples/luaintro/03-11-4.lualtx b/info/examples/luaintro/03-11-4.lualtx
new file mode 100644
index 0000000000..1bc7c7db45
--- /dev/null
+++ b/info/examples/luaintro/03-11-4.lualtx
@@ -0,0 +1,35 @@
+%%
+%% Ein Beispiel der DANTE-Edition
+%%
+%% 1. Auflage
+%%
+%%
+%% 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}
+\setmonofont[Scale=0.82]{DejaVu Sans Mono}\ttfamily\small\parindent=0pt
+\begin{document}
+\setbox0=\hbox{d g} \setbox1=\hbox{d\rule[-2pt]{50pt}{5pt}g}
+Box0: \directlua{w,h,d=node.dimensions(
+ tex.box[0].glue_set, tex.box[0].glue_sign, tex.box[0].glue_order,
+ tex.box[0].head.next, node.tail(tex.box[0].head))
+ tex.print((w/2^16).."pt; "..(h/2^16).."pt; "..(d/2^16).."pt") }\quad
+Box1:\directlua{w,h,d=node.dimensions(
+ tex.box[1].glue_set, tex.box[1].glue_sign, tex.box[1].glue_order,
+ tex.box[1].head.next, node.tail(tex.box[1].head))
+ tex.print((w/2^16).."pt; "..(h/2^16).."pt; "..(d/2^16).."pt") }\\
+fontdimen=\the\fontdimen2\font\ Box0: \box0\ Box1: \box1
+\end{document}