summaryrefslogtreecommitdiff
path: root/tmac/pspic.tmac
diff options
context:
space:
mode:
authorwlemb <wlemb>2002-03-11 10:55:26 +0000
committerwlemb <wlemb>2002-03-11 10:55:26 +0000
commit7dc818289c733115e78e2db269d3a1700f618399 (patch)
tree6f095f2b28179a5d7b65ca59a45317c1eeff07d5 /tmac/pspic.tmac
parent11b2f6077872bff4c6485498f2d118546e6d005d (diff)
downloadgroff-7dc818289c733115e78e2db269d3a1700f618399.tar.gz
* tmac/pspic.tmac: Add support for -Tdvi.
* tmac/dvi.tmac: Include pspic.tmac. * src/devices/grodvi/grodvi.man: Document it. * NEWS: Updated. * font/devlj4/generate/Makefile: Fix URL of metric files.
Diffstat (limited to 'tmac/pspic.tmac')
-rw-r--r--tmac/pspic.tmac42
1 files changed, 34 insertions, 8 deletions
diff --git a/tmac/pspic.tmac b/tmac/pspic.tmac
index 30fa61db..6382d917 100644
--- a/tmac/pspic.tmac
+++ b/tmac/pspic.tmac
@@ -2,8 +2,9 @@
.\"
.\" Define the PSPIC macro.
.\"
-.\" When used other than with -Tps, it will draw a box around where
+.\" When used other than with -Tps or -Tdvi, it will draw a box around where
.\" the picture would go.
+.
.de PSPIC
. nr ps-offset-mode 0
. ie '\\$1'-L' \{\
@@ -55,16 +56,37 @@
.
. ne (\\n[ps-desht]u + 1v)
.
-. if (\\n[ps-offset-mode] = 0) \
+. if (\\n[ps-offset-mode] == 0) \
. nr ps-offset (\\n[.l] - \\n[.i] - \\n[ps-deswid] / 2)
-. if (\\n[ps-offset-mode] = 1) \
+. if (\\n[ps-offset-mode] == 1) \
. nr ps-offset 0
-. if (\\n[ps-offset-mode] = 2) \
+. if (\\n[ps-offset-mode] == 2) \
. nr ps-offset (\\n[.l] - \\n[.i] - \\n[ps-deswid])
-. ie (\\n[.$] >= 3) \
-. ds ps-desht \\n[ps-desht]
-. el \
-. ds ps-desht \" empty
+.
+. ie '\*[.T]'dvi' \{\
+. ie (\\n[ps-wid]p == \\n[ps-deswid]) \{\
+. ds ps-scale \" empty
+. ds ps-hoffset hoffset=-\\n[llx]
+. ds ps-voffset voffset=-\\n[lly]
+. \}
+. el \{\
+. nr ps-scale (\\n[ps-deswid] * 100 / \\n[ps-wid]p)
+. nr ps-hoffset (-\\n[llx] * \\n[ps-scale] / 100)
+. nr ps-voffset (-\\n[lly] * \\n[ps-scale] / 100)
+. ds ps-scale hscale=\\n[ps-scale] vscale=\\n[ps-scale]
+. ds ps-hoffset hoffset=\\n[ps-hoffset]
+. ds ps-voffset voffset=\\n[ps-voffset]
+. \}
+.
+\h'\\n[ps-offset]u'\
+\v'\\n[ps-desht]u'\
+\X'psfile=\\$1 \\*[ps-hoffset] \\*[ps-voffset] \\*[ps-scale]'
+. \}
+. el \{\
+. ie (\\n[.$] >= 3) \
+. ds ps-desht \\n[ps-desht]
+. el \
+. ds ps-desht \" empty
.
\h'\\n[ps-offset]u'\
\X'ps: invis'\
@@ -73,8 +95,12 @@
\v'\\n[ps-desht]u'\
\X'ps: import \
\\$1 \\n[llx] \\n[lly] \\n[urx] \\n[ury] \\n[ps-deswid] \\*[ps-desht]'
+. \}
+.
. br
. sp \\n[ps-desht]u
. \}
. HTML-IMAGE-END
..
+.
+.\" end of pspic.tmac