113 lines
3.8 KiB
HTML
113 lines
3.8 KiB
HTML
<!-- Creator : groff version 1.24.1 -->
|
|
<!-- CreationDate: Mon Mar 16 21:28:01 2026 -->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta name="Content-Style" content="text/css">
|
|
<style type="text/css">
|
|
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
h1 { text-align: center }
|
|
</style>
|
|
<title>pic-18.html</title>
|
|
|
|
</head>
|
|
<hr>
|
|
[ <a href="pic-17.html">prev</a> | <a href="pic-19.html">next</a> | <a href="pic.html">top</a> ]
|
|
<hr>
|
|
|
|
|
|
<h2>18. Interface to TeX
|
|
<a name="18. Interface to TeX"></a>
|
|
</h2>
|
|
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">TeX mode
|
|
is enabled by the <b>−t</b> option. In TeX mode, pic
|
|
defines a vbox called <b>\graph</b> for each picture; the
|
|
name can be changed with the pseudo-variable <b>figname</b>
|
|
(which is actually a specially parsed command). You must
|
|
yourself print that vbox using, for example, the
|
|
command</font></p>
|
|
|
|
|
|
<p style="margin-left:28%; margin-top: 1em"><font color="#000000">\centerline{\box\graph}</font></p>
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">Actually,
|
|
since the vbox has a height of zero (it is defined with
|
|
\vtop) this produces slightly more vertical space above the
|
|
picture than below it;</font></p>
|
|
|
|
|
|
<p style="margin-left:28%; margin-top: 1em"><font color="#000000">\centerline{\raise
|
|
1em\box\graph}</font></p>
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">would
|
|
avoid this.</font></p>
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">To make
|
|
the vbox having a positive height and a depth of zero (as
|
|
used e.g. by LaTeX’s graphics.sty), define the
|
|
following macro in your document:</font></p>
|
|
|
|
|
|
<p style="margin-left:28%; margin-top: 1em"><font color="#000000">\def\gpicbox#1{%
|
|
<br>
|
|
\vbox{\unvbox\csname #1\endcsname\kern 0pt}}</font></p>
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">Now you
|
|
can simply say <b>\gpicbox{graph}</b> instead of
|
|
\box\graph.</font></p>
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">You must
|
|
use a TeX driver that supports the <b>tpic</b> specials,
|
|
version 2.</font></p>
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">Lines
|
|
beginning with <b>\</b> are passed through transparently; a
|
|
<b>%</b> is added to the end of the line to avoid unwanted
|
|
spaces. You can safely use this feature to change fonts or
|
|
to change the value of <b>\baselineskip</b>. Anything else
|
|
may well produce undesirable results; use at your own risk.
|
|
Lines beginning with a period are not given any special
|
|
treatment.</font></p>
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">The TeX
|
|
mode of <i>pic</i>(1) does <i>not</i> translate <b>troff</b>
|
|
font and size changes included in text strings!</font></p>
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">Here an
|
|
example how to use <b>figname</b>.</font></p>
|
|
|
|
|
|
<p style="margin-left:28%; margin-top: 1em"><font color="#000000">.PS
|
|
<br>
|
|
figname = foo; <br>
|
|
... <br>
|
|
.PE</font></p>
|
|
|
|
|
|
<p style="margin-left:28%; margin-top: 1em"><font color="#000000">.PS
|
|
<br>
|
|
figname = bar; <br>
|
|
... <br>
|
|
.PE</font></p>
|
|
|
|
|
|
<p style="margin-left:28%; margin-top: 1em"><font color="#000000">\centerline{\box\foo
|
|
\hss \box\bar}</font></p>
|
|
|
|
<p style="margin-top: 1em"><font color="#000000">Use this
|
|
feature sparsingly and only if really needed: A different
|
|
name means a new box register in TeX, and the maximum number
|
|
of box registers is only 256. Also be careful not to use a
|
|
predefined TeX or LaTeX macro name as an argument to
|
|
<b>figname</b> since this inevitably causes an
|
|
error.</font></p>
|
|
<hr>
|
|
[ <a href="pic-17.html">prev</a> | <a href="pic-19.html">next</a> | <a href="pic.html">top</a> ]
|
|
<hr>
|