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 36 37 38 39 40
|
.PS
#
# Xtest.pic
# To produce Xtest.svg (the sed filter deletes the external latex lines):
# sed -e '/^\\/d' Xtest.pic | dpic -v > Xtest.svg
scale = 72 # set the scale to points (bp)
define grid { [
for x=0 to $1 by 50 do { line from (x,$2) down $2
sprintf("%g",x) below
if x < $1 then {
for dx = 10 to 40 by 10 do { line thick 0.4 from (x+dx,$2) down $2 } }
}
for y=0 to $2 by 50 do { line from (0,y) right $1
sprintf("%g",y) ljust
if y < $2 then {
for dy = 10 to 40 by 10 do { line thick 0.4 from (0,y+dy) right $1 } }
}
S: ($1/2,0)
W: (0,$2/2)
] }
B: box invis wid 6*scale ht 6*scale
Grid: grid(100,100) with .W at B.w+(50,00)
# textoffset = 0
if dpicopt == optPGF then {
command "\font\testfont=ptmr at 100bp"
# command "s_init(Xtest)sinclude(dpic-doc.dim)"
X: "\boxdims{Xtest_1}{\testfont X}" \
wid 72.47075*(scale/72.27) ht 67.5524*(scale/72.27)+0.0*(scale/72.27) with .s at Grid.S
}
if dpicopt == optSVG then { textht = 100
X: "X" wid 72 with .s at Grid.S
textht = 11
}
# box wid X.wid ht X.ht at X
.PE
|