Overview | The picture Environment | The pstricks Package | ||
LaTeX Graphics | The pspicture Environment | LaTeX Graphics |
Contents
|
|||||||||||||||||||||
Unlike epic and eepic, the pstricks package brings with it its own environment, pspicture, with drawing commands different from those of the picture environment. A detailed description can be found in GOOSSENS, RAHTZ, MITTELBACH[2]. Remark. pdflatex cannot deal directly with commands of the pstricks package. The pictures in Section 3 were generated with the commands
latex dvips ps2pdf
and subsequently converted into png pictures. These were then imported with the \includegraphics
command.
Line Segments and Circles |
|||||||||||||||||||||
Regular polygon |
Source file | ||||||||||||||||||||
This example illustrates how line segments of arbitrary slopes can be drawn within the pspicture
environment. The command
\psset{unit=3cm}
sets the length unit to 3cm. (The pstricks default is 1cm.) The arguments
(0, 0)
and (2, 2) of \begin{pspicture}
determine the upper left corner and the lower right corner of the picture.
Line width ist set by
\psset{linewidth=1pt} \psset{linewidth=.1pt} The points are determined by |
|||||||||||||||||||||
Triangle |
Source file | ||||||||||||||||||||
This example illustrates that pstricks allows the drawing of circles with arbitrary radii.
The *
after {pspicture} causes the picture to be clipped to the frame determined by
(420, 420).
The upper left corner not being mentioned, it defaults to
(0, 0) .
In the picture, a triangle is drawn with the inscribed and the circumscribed circle (solid), the three adjacent circles (dashed), and the nine point (Feuerbach) circle (dotted). |
|||||||||||||||||||||
Loops and calculations |
Source file | ||||||||||||||||||||
As this example shows, with the calc and the ifthen packages, LATEX
assumes the capability of running through loops, taking decisions, and doing calculations.
The * after {pspicture} causes the picture to be clipped to the frame determined by
(100, 100) .
The upper left corner not being mentioned, it defaults to
(0, 0) .
|
|||||||||||||||||||||
A remark about latex2htmlUnlike the latex command, the latex2html command expects all\psset commands
to be placed within the pspicture environment. Otherwise, \psset is considered
unknown. Thus the arguments of the \begin{pspicture} command always have to be given in the
default unit, which is 1cm.
|
|||||||||||||||||||||
More ApplicationsThe following examples are taken from GOOSSENS, RAHTZ, MITTELBACH[2], with slight variations. They are intended to give some hints as to the versatility of the pstricks package, and the related packages,
pstcol, pst-grad, pst-text, pst-node, pst-tree.
While the latex2html command is capable of processing pstricks commands, it cannot process
pstcol, pst-grad, pst-text, pst-node, or pst-tree commands. Thus, we
get the following overview:
|
|||||||||||||||||||||
Tribox |
Source file | ||||||||||||||||||||
Curved text |
Source file | ||||||||||||||||||||
Logo |
Source file | ||||||||||||||||||||
Knots |
Source file | ||||||||||||||||||||
Family tree |
Source file | ||||||||||||||||||||
Bibliography
|