| 1 |
# the macros defined here are to help debugging pdftex |
| 2 |
set history save on |
| 3 |
set confirm off |
| 4 |
set print elements 256 |
| 5 |
|
| 6 |
# print scaled |
| 7 |
def ps |
| 8 |
print $0/65535.0 |
| 9 |
end |
| 10 |
|
| 11 |
def pvf |
| 12 |
echo "w=" |
| 13 |
p w |
| 14 |
echo "x=" |
| 15 |
p x |
| 16 |
echo "y=" |
| 17 |
p y |
| 18 |
echo "z=" |
| 19 |
p z |
| 20 |
end |
| 21 |
|
| 22 |
# print the value of a string |
| 23 |
def pstring |
| 24 |
print strpool[strstart[$arg0]]@strstart[$arg0+1]-strstart[$arg0] |
| 25 |
end |
| 26 |
|
| 27 |
# print font name as string |
| 28 |
def pfontname |
| 29 |
pstring fontname[$arg0] |
| 30 |
end |
| 31 |
|
| 32 |
# print various values related to a font |
| 33 |
def pfont |
| 34 |
echo "fontname = " |
| 35 |
pfontname $arg0 |
| 36 |
echo "fontsize = " |
| 37 |
p fontsize[$arg0]/65536.0 |
| 38 |
echo "pdffontautoexpand = " |
| 39 |
p pdffontautoexpand[$arg0] |
| 40 |
end |
| 41 |
|
| 42 |
# print type of node as string |
| 43 |
def pnodetype |
| 44 |
if $arg0 >= himemmin |
| 45 |
echo char_node\n |
| 46 |
else |
| 47 |
if zmem[$arg0].hh.u.B0 == 0 |
| 48 |
echo hlist_node\n |
| 49 |
end |
| 50 |
if zmem[$arg0].hh.u.B0 == 1 |
| 51 |
echo vlist_node\n |
| 52 |
end |
| 53 |
if zmem[$arg0].hh.u.B0 == 2 |
| 54 |
echo rule_node\n |
| 55 |
end |
| 56 |
if zmem[$arg0].hh.u.B0 == 3 |
| 57 |
echo ins_node\n |
| 58 |
end |
| 59 |
if zmem[$arg0].hh.u.B0 == 4 |
| 60 |
echo mark_node\n |
| 61 |
end |
| 62 |
if zmem[$arg0].hh.u.B0 == 5 |
| 63 |
echo adjust_node\n |
| 64 |
end |
| 65 |
if zmem[$arg0].hh.u.B0 == 6 |
| 66 |
echo ligature_node\n |
| 67 |
end |
| 68 |
if zmem[$arg0].hh.u.B0 == 7 |
| 69 |
echo disc_node\n |
| 70 |
end |
| 71 |
if zmem[$arg0].hh.u.B0 == 8 |
| 72 |
echo whatsit_node\n |
| 73 |
end |
| 74 |
if zmem[$arg0].hh.u.B0 == 9 |
| 75 |
echo math_node\n |
| 76 |
end |
| 77 |
if zmem[$arg0].hh.u.B0 == 10 |
| 78 |
echo glue_node\n |
| 79 |
end |
| 80 |
if zmem[$arg0].hh.u.B0 == 11 |
| 81 |
echo kern_node\n |
| 82 |
end |
| 83 |
if zmem[$arg0].hh.u.B0 == 12 |
| 84 |
echo penalty_node\n |
| 85 |
end |
| 86 |
if zmem[$arg0].hh.u.B0 == 13 |
| 87 |
echo unset_node\n |
| 88 |
end |
| 89 |
end |
| 90 |
end |
| 91 |
|
| 92 |
# print type of a node |
| 93 |
# def ptype |
| 94 |
# print mem[$arg0].hh.u.B0 |
| 95 |
# end |
| 96 |
# |
| 97 |
# def psubtype |
| 98 |
# print mem[$arg0].hh.u.B1 |
| 99 |
# end |
| 100 |
# |
| 101 |
# def pfont |
| 102 |
# ptype $arg0 |
| 103 |
# end |
| 104 |
# |
| 105 |
# def pchar |
| 106 |
# psubtype($arg0) |
| 107 |
# end |
| 108 |
# |
| 109 |
# def pinfo |
| 110 |
# print mem[$arg0].hh.v.LH |
| 111 |
# end |
| 112 |
# |
| 113 |
# def plink |
| 114 |
# print mem[$arg0].hh.v.RH |
| 115 |
# end |
| 116 |
# |
| 117 |
# def pmarginchar |
| 118 |
# pinfo($arg0+2) |
| 119 |
# end |
| 120 |
# |
| 121 |
# def setpdflatex |
| 122 |
# set args -fmt=pdflatex $arg0 |
| 123 |
# end |