summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-drawing.html
blob: 2714ba016a8826c2426cae7d3eaf0a8b81498a48 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<head>
<title>UK TeX FAQ -- question label drawing</title>
</head><body>
<h3>Drawing with TeX</h3>
<p/>There are many packages to do pictures in (La)TeX itself (rather than
importing graphics created externally), ranging from simple use of
LaTeX <code>picture</code> environment, through enhancements like
<i>eepic</i>, to 
sophisticated (but slow) drawing with PicTeX. Depending on your type
of drawing, and setup, here are a few systems you may consider:
<ul>
<li> PicTeX is a venerable, and very powerful, system, that draws
  by placing dots on the page to give the effect of a line or curve.  While
  this has the potential of great power, it is (of course) much slower
  than any of the other established packages.  What&#8217;s more, there
  are problems with its <a href="FAQ-docpictex.html">documentation</a>.
<li> <i>epic</i> was designed to make use of the LaTeX
  <code>picture</code> environment somewhat less agonising;
  <i>eepic</i> extends it, and is capable of using <i>tpic</i>
  <code>\</code><code>special</code> commands to improve printing performance.  (If the
  <code>\</code><code>special</code>s aren&#8217;t available, the <i>eepicemu</i> will do the
  business, far less efficiently.
<li> <i>pict2e</i>; this was advertised in 
  <a href="FAQ-books.html">the LaTeX manual</a>, but didn&#8217;t appear for nearly
  ten years after publication of the book!  It removes all the petty
  restrictions that surround the use of the <code>picture</code>
  environment.  It therefore suffers <em>only</em> from the rather
  eccentric drawing language of the environment, and is a far more
  useful tool than the original environment has ever been.  (Note that
  <i>pict2e</i> supersedes David Carlisle&#8217;s stop-gap
  <i>pspicture</i>.)
<li> <i>PSTricks</i>; this gives you access to all the power of
  PostScript from TeX itself, by sophisticated use of
  <a href="FAQ-specials.html"><code>\</code><code>special</code> commands</a>.  Since PostScript is itself a
  pretty powerful programming language, many astounding things can in
  principle be achieved using <i>PSTricks</i> (a wide range of
  contributed packages, ranging from world mapping to lens design
  diagrams, is available).
  <i>Pstricks</i>&#8217; <code>\</code><code>special</code>s are
  by default specific to <i>dvips</i>, but VTeX (both in its
  commercial and in its free versions) understands them.  PDFTeX
  users may use <i>pst-pdf</i>, which (like
  <i>epstopdf</i> &#8212; see 
  <a href="FAQ-pdftexgraphics.html">PDFLaTeX graphics</a>) generates
  PDF files using an auxiliary program, from <i>PSTricks</i>
  commands (<i>pst-pdf</i> also requires a recent installation of
  the <i>preview</i> package).
<p/>  There is a <i>PSTricks</i> mailing list
  (<a href="mailto:pstricks@tug.org"><i>pstricks@tug.org</i></a>) which you may
  <a href="http://tug.org/mailman/listinfo/pstricks">join</a>, or you may
  just browse the 
  <a href="http://tug.org/pipermail/pstricks/">list archives</a>.
<li> <i>pgf</i>: while <i>pstricks</i> is very powerful and
  convenient, using it with PDFLaTeX is an awful fidget: if you
  simply want the graphical capabilities, <i>pgf</i>, together with
  its rather pleasing &#8220;user-oriented&#8221; interface <i>tikz</i>, may be a good
  bet for you.  While PDF has (in essence) the same graphical
  capabilities as PostScript, it isn&#8217;t programmable; <i>pgf</i> provides
  common LaTeX commands that will utilise the graphical
  capabilities of both PostScript and PDF equally.
<li> MetaPost; you liked Metafont, but never got to grips with font files?
  Try <a href="FAQ-MP.html">MetaPost</a> &#8212;
  all the power of Metafont, but it generates PostScript figures; MetaPost
  is nowadays part of most serious (La)TeX distributions.  Knuth
  uses it for all his work&#8230;
<p/>  Note that you can &#8220;embed&#8221; MetaPost source in your document (i.e.,
  keep it in-line with your LaTeX code), using the <i>emp</i>
  package.
<li> <i>Mfpic</i>; you liked Metafont, but can&#8217;t understand the
  language?  The package makes up Metafont or MetaPost code for you
  within using familiar-looking TeX macros.  Not <em>quite</em> the
  full power of MetaPost, but a friendlier interface; of course, with
  MetaPost output, the results can be used equally well in either
  LaTeX or PDFLaTeX.
<li> You liked PicTeX but don&#8217;t have enough memory or time?  Look
  at Eitan Gurari&#8217;s <i>dratex</i>, which is as powerful as most
  other TeX drawing packages, but is an entirely new
  implementation, which is not as hard on memory, is much more
  readable (and is fully documented).
<li> You fancy the idea of embedding the source of drawings (as with
  <i>emp</i>, but you like another drawing tool?  In principle,
  it&#8217;s possible to do the same with other tools; for example
  <i>asyfig</i> allows you to embed 
  <i>asymptote</i> code in your document.
</ul>
<p/>Some of the free-standing graphics applications may also be used
(effectively) in-line in LaTeX documents; examples are
<dl>
<dt>asymptote<dd>A package, <i>asymptote</i>, defines an environment
  <code>asy</code> which arranges that its contents are included
  (after &#8220;enough&#8221; runs, in the LaTeX way).
<p/>  Basically, you write
  <blockquote>
    <code>\</code><code>begin{asy}</code>
      <code>&lt;<i>asymptote code</i>&gt;</code>
    <code>\</code><code>end{asy}</code>
  </blockquote><p>
  and then execute
<blockquote>
<pre>
latex document
asy document-*.asy
latex document
</pre>
</blockquote><p>
<dt>egplot<dd>Allows you to incorporate <i>GNUplot</i>
  code in your document, again for processing outside of LaTeX; the
  design of this package was strongly influenced by that of <i>emp</i>
<dt>emp<dd>Another of the same, this time for MetaPost graphics.
</dl>
<dl>
<dt><tt><i>asymptote.sty</i></tt><dd><a href="http://mirror.ctan.org/graphics/asymptote.zip">graphics/asymptote</a> (or <a href="http://mirror.ctan.org/graphics/asymptote/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/asymptote.html">catalogue entry</a>
<dt><tt><i>dratex.sty</i></tt><dd><a href="http://mirror.ctan.org/graphics/dratex.zip">graphics/dratex</a> (or <a href="http://mirror.ctan.org/graphics/dratex/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/dratex.html">catalogue entry</a>
<dt><tt><i>egplot</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/egplot.zip">macros/latex/contrib/egplot</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/egplot/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/egplot.html">catalogue entry</a>
<dt><tt><i>emp</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/emp.zip">macros/latex/contrib/emp</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/emp/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/emp.html">catalogue entry</a>
<dt><tt><i>epic.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/epic.zip">macros/latex/contrib/epic</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/epic/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/epic.html">catalogue entry</a>
<dt><tt><i>eepic.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/eepic.zip">macros/latex/contrib/eepic</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/eepic/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/eepic.html">catalogue entry</a>
<dt><tt><i>eepicemu.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/eepic.zip">macros/latex/contrib/eepic</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/eepic/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/eepic.html">catalogue entry</a>
<dt><tt><i>emp.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/emp.zip">macros/latex/contrib/emp</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/emp/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/emp.html">catalogue entry</a>
<dt><tt><i>mfpic</i></tt><dd><a href="http://mirror.ctan.org/graphics/mfpic.zip">graphics/mfpic</a> (or <a href="http://mirror.ctan.org/graphics/mfpic/">browse the directory</a>)
<dt><tt><i>preview.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/preview.zip">macros/latex/contrib/preview</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/preview/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/preview.html">catalogue entry</a>
<dt><tt><i>pspicture.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/pspicture.zip">macros/latex/contrib/pspicture</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/pspicture/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pspicture.html">catalogue entry</a>
<dt><tt><i>pst-pdf.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/pst-pdf.zip">macros/latex/contrib/pst-pdf</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/pst-pdf/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pst-pdf.html">catalogue entry</a>
<dt><tt><i>pgf.sty</i></tt><dd><a href="http://mirror.ctan.org/graphics/pgf.zip">graphics/pgf</a> (or <a href="http://mirror.ctan.org/graphics/pgf/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pgf.html">catalogue entry</a>
<dt><tt><i>pict2e.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/pict2e.zip">macros/latex/contrib/pict2e</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/pict2e/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pict2e.html">catalogue entry</a>
<dt><tt><i>pictex.sty</i></tt><dd><a href="http://mirror.ctan.org/graphics/pictex.zip">graphics/pictex</a> (or <a href="http://mirror.ctan.org/graphics/pictex/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pictex.html">catalogue entry</a>
<dt><tt><i>pstricks</i></tt><dd><a href="http://mirror.ctan.org/graphics/pstricks.zip">graphics/pstricks</a> (or <a href="http://mirror.ctan.org/graphics/pstricks/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pstricks.html">catalogue entry</a>
<dt><tt><i>tikz.sty</i></tt><dd>Distributed with <a href="http://mirror.ctan.org/graphics/pgf.zip">graphics/pgf</a> (or <a href="http://mirror.ctan.org/graphics/pgf/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/pgf.html">catalogue entry</a>
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=drawing">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=drawing</a>
</body>