File: FAQ-labelfig.html

package info (click to toggle)
tetex-base 3.0.dfsg.3-5
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 239,540 kB
  • ctags: 10,610
  • sloc: xml: 103,461; perl: 9,398; ruby: 2,850; python: 1,551; php: 1,067; sh: 981; lisp: 494; makefile: 371; awk: 88
file content (49 lines) | stat: -rw-r--r-- 3,543 bytes parent folder | download | duplicates (2)
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
41
42
43
44
45
46
47
48
49
<head>
<title>UK TeX FAQ -- question label labelfig</title>
</head><body>
<h3>Labelling graphics</h3>
<p>"Technical" graphics (such as graphs and diagrams) are often
labelled with quite complex mathematical expressions: there are few
drawing or graphing tools that can do such things (the honourable
exception being MetaPost, which allows you to program the labels, in
(La)TeX, in the middle of specifying your graphic).
<p>Labels on graphics produced by all those <em>other</em> tools is where
the <i>psfrag</i> package can help.  Place an unique
text in your graphic, using the normal text features of your tool, and
you can ask <i>psfrag</i> to replace the text with arbitrary
(La)TeX material.  <i>Psfrag</i>'s "operative" command is
<code>\</code><code>psfrag{<em>PS text</em>}{<em>Repl text</em>}</code>, which instructs
the system to replace the original ("<code>PS</code>") text with the
TeX-typeset replacement text.  Optional
arguments permit adjustment of position, scale and rotation; full
details may be found in <i>pfgguide</i> in the distribution.
(Unfortunately, <i>psfrag</i> can't be used with PDFLaTeX,
though one might hope that it would be susceptible to the same sort of
treatment as is used in the <i>pdftricks</i> package.  On the other
hand, <a href="FAQ-commercial.html">VTeX</a>'s GeX processor explicitly deals
with <i>psfrag</i>, both in its free and commercial instances.)
<p>Another useful approach is <i>overpic</i>, which overlays a
<code>picture</code> environment on a graphic included by use of
<code>\</code><code>includegraphics</code>.  This treatment lends itself to ready placement
of texts and the like on top of a graphic.  The package can draw a
grid for planning your "attack"; the distribution comes with simple
examples.
<p><i>Pstricks</i> can of course do everything that <i>overpic</i>
can, with all the flexibility of PostScript programming that it offers.
The <i>pstricks</i> web site has a page of 
<a href="http://pstricks.de/Examples/overlay.phtml">examples of labelling</a>
which will get you started; if <i>pstricks</i> is 
<a href="FAQ-drawing.html">an option for you</a>, this route is worth a try.
<p>The confident user may, of course, do the whole job in a picture
environment which itself includes the graphic.  I would recommend
<i>overpic</i> or the <i>pstricks</i> approach, but such things
are plainly little more than a convenience over what is achievable
with the do-it-yourself approach.
<dl>
<dt><tt><i>overpic.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/overpic.tar.gz">macros/latex/contrib/overpic</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/overpic.zip">zip</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/overpic/">browse</a>)
<dt><tt><i>psfrag.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/psfrag.tar.gz">macros/latex/contrib/psfrag</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/psfrag.zip">zip</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/psfrag/">browse</a>)
<dt><tt><i>pstricks.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/graphics/pstricks.tar.gz">graphics/pstricks</a> (<a href="ftp://cam.ctan.org/tex-archive/graphics/pstricks.zip">zip</a>, <a href="http://www.tex.ac.uk/tex-archive/graphics/pstricks/">browse</a>)
</dl>
<p>
<p><p><p><p><p><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=labelfig">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=labelfig</a>
</body>