summaryrefslogtreecommitdiff
path: root/info/examples/luaintro/03-11-4.lualtx
blob: 1bc7c7db45b722c91b9bfd8c6aaa442fde2d77b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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}