To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

From Wikipedia, the free encyclopedia

PSTricks is a set of macros that allow the inclusion of PostScript drawings directly inside TeX or LaTeX source code. It was originally written by Timothy Van Zandt and has been maintained in recent years by Denis Girou, Sebastian Rahtz and Herbert Voss (de).

YouTube Encyclopedic

  • 1/3
    Views:
    8 895
    3 037
    738
  • Graficando en LaTeX con Pstricks - Uso de pscurve -
  • Graficando en LaTeX con pstricks
  • LaTeX & PsTricks : Créer un graphe pondéré

Transcription

Basic usage

PSTricks example (scaled)

There is a wide array of commands available for making graphics. Coordinates in PSTricks are always represented in parentheses, as the following example (scaled) illustrates:

 \begin{pspicture}(5,5)
   %% Triangle in red:
   \pspolygon[linecolor=red](1,1)(5,1)(1,4)
   %% Bezier curve in green:
   \pscurve[linecolor=green,linewidth=2pt,%
     showpoints=true](5,5)(3,2)(4,4)(2,3)
   %% Circle in blue with radius 1:
   \pscircle[linecolor=blue,linestyle=dashed](3,2.5){1}
 \end{pspicture}

Extensions

Plotting sin(x) with pst-plot

PSTricks commands are low level, so many LaTeX packages have been made in order to ease the creation of several kinds of graphics that are commonly used on mathematical typesetting.

pst-plot provides commands for creating function graphs.

Consider the following example:

 \begin{pspicture*}(-7,-2)(7,2)
   \psaxes[labels=none](0,0)(-7,-2)(7,2)        % sets up axis
   \psplot[linecolor=blue, linewidth=1.5pt]%    % plots the sinewave
     {-7}{7}{x 0.01745329252 div sin}           % notice the RPN expression
   \uput[45](3.1415926,0){$\pi$}                % these are the labels
   \uput[90](-1.570796,0){$-\pi/2$}             % \uput is a box positioned at [angle]
   \uput[-90](1.570796,0){$\pi/2$}              % relative to (x,y) coordinate
   \uput[-135](-3.1415926,0){$-\pi$}            % and putting { content } on the box
   \psline[linewidth=1pt,linecolor=red,linestyle=dotted]%   % red dotted lines
     (1.57079632,1)(1.57079632,0)
   \psline[linewidth=1pt,linecolor=red,linestyle=dotted]%
     (-1.57079632,-1)(-1.57079632,0)
 \end{pspicture*}

The previous example also illustrate that TeX commands can be used as elements into the pictures. Since PostScript uses RPN style for mathematical operations, the argument to pst-plot must be supplied in the same form. An alternative is to use the optional argument algebraic, then the formula can be described as an algebraic expression.

pstricks-add extends pst-plot enabling also polar graphs and allowing the use algebraic notation for plots instead of RPN.

pst-math provides trigonometric functions in radians (since PostScript defaults to using degrees) and hyperbolic trigonometric functions.

pst-3dplot is used for creating 3D graphics like the following:

Hyperbolic paraboloid drawn using PSTricks package pst-3dplot

multido provides basic loop functionality for programming graphs with repeating elements:

Plotting a graph while varying parameters with multido

pst-eucl is a beta extension for easy creation of geometrical drawings.

Circumcircle of a triangle, illustrated with pst-eucl

There are many other extensions, for drawing Circuit diagrams, barcodes, graphs, trees, visualizing data, etc.

Compatibility

PSTricks is only fully compatible with TeX systems using PostScript intermediates, including but not limited to eTeX and others. However, it is not compatible with the widely used pdfTeX engine in PDF mode. As pdfTeX is the default engine in most current installations, users of PSTricks must either force pdfTeX to DVI mode or use auto-pst-pdf. PGF/TikZ is an alternative to PSTricks that is compatible with pdfTeX.

Software which supports PSTricks output

See also

Further reading

  • Herbert Voss; PSTricks – Grafik für TeX und LaTeX, 7th edition, DANTE e.V. and Lehmanns.media, 1008 pages, Heidelberg and Berlin 2016, ISBN 978-3-86541-858-6.
  • Herbert Voss; PSTricks – Graphics for TeX and LaTeX, 1st edition, UIT, 916 pages, Cambridge 2011, ISBN 978-1-906860-13-4; review in TUGboat

External links

This page was last edited on 27 April 2022, at 09:17
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.