PSTricks is a set of macros that allow the inclusion of PostScript code (e.g. drawings) directly inside (La)TeX code. This tag is compatible with the tag {diagrams}.

learn more… | top users | synonyms

56
votes
3answers
41k views

How to use PSTricks in pdfLaTeX?

I thought that PSTricks package was not possible to use in pdfLaTeX but the user Dima claims otherwise. How can I force pdfLaTeX to use PSTricks then?
90
votes
8answers
9k views

Simulating hand-drawn lines

I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar package). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear ...
12
votes
2answers
4k views

PSTricks error “Undefined control sequence <recently read> \c@lor@to@ps”

I have a problem with this file tex: \begin{document} \begin{figure} \begin{center} \begin{pspicture}(0,0)(1,3.8) \psline{-<}(0,0)(0,.2) \psline{-}(0,.2)(0,.4) \psline{*->}(0,.4)(0,.9) ...
25
votes
2answers
561 views

Is there a TikZ equivalent to the PSTricks \ncbar command?

Although I now use TikZ, every so often I find myself looking for very useful PSTricks commands which don't seem to exist in TikZ. The pst-node package has an \ncbar command which allows one to ...
77
votes
3answers
4k views

Fundamental differences : PSTricks, TikZ/PGF and others

OK, since this is a pretty vague and subjective question. I need to set up some borders around the discussion that I intend to benefit from. But before anything, I certainly do NOT want to excite the ...
22
votes
2answers
2k views

How to convert pstricks animation to GIF file?

As an example, let's take this animation. How can I convert it to GIF file?
16
votes
2answers
8k views

Using psfrag with pdflatex

Is there any way of using psfrag with pdflatex? It seems fairly similar to the problem of using pstricks with pdflatex. Do they both depend on the same things, or does psfrag include pstricks? Can I ...
41
votes
5answers
3k views

3D helix torus with hidden lines

How can I generate the above image using TikZ (possibly other methods will work if they produce better looking results)? I would like to have a nicely shaded (not so dark image) without gridlines ...
12
votes
3answers
26k views

eps figures with pdflatex

In a recent discussion on this site I learned that using \usepackage[pdf]{pstricks} makes it possible to run pdflatex on files containing eps and pstricks files (and psfrag usage as well). Now a ...
29
votes
2answers
4k views

What is the clearest way to graph a piecewise function?

I have a function defined as: How can I graph that using functions instead of coordinates? I'm currently working with pgfplots but I'm open to something else if it's better.
17
votes
4answers
2k views

How to generate all possible Venn diagrams (with the case below) efficiently?

I can draw Venn diagrams but now my question is more complicated than just drawing Venn diagrams one by one. I need to draw all possible Venn diagrams efficiently. I need a combinatorical approach ...
21
votes
3answers
1k views

Letterpress effect through PSTricks or Tikz

I have already typed in the META section of the website a post addressing the question as to how the letterpress (or engraving-like) effect in the headers of the site had been achieved. I know it can ...
4
votes
2answers
2k views

Center flow chart horizontally

I have the following flow chart but it appears uncentered. How can I center it? \documentclass{article} \usepackage{pstricks} \usepackage{pst-node} \usepackage{pst-blur} \pagestyle{empty} ...
52
votes
11answers
2k views

How can I define a mathematical function as a LaTeX macro?

I am attempting to create a usable function within LaTeX such that its inputs are transformed mathematically. However, I cannot find any documentation that can perform such mathematical function ...
30
votes
1answer
2k views

Topological Quantum Field Theory diagrams with pstricks or tikz

This question led to a new package: tqft — Blog: The TQFT Package I'm going to write a brief note about topological quantum field theories, so I need to draw some copies of the "pair of ...
17
votes
3answers
1k views

How to draw these diagrams (closed contours) using TikZ or PSTricks?

First, I must say I have no knowledge about PGF/TikZ nor PSTricks, but I would like to draw the following or similar closed contours using one of them or another adequate package. Where can I find the ...
19
votes
2answers
3k views

Draw a prism in TikZ or PSTricks

Is there a way to define an polygon in plane and output an (orthogonal) prism with that polygon as its base? The prism should be drawn in 3D in parallel oblique perspective with controllable height h, ...
73
votes
11answers
8k views

What are the advantages of TikZ/PGF over PSTricks?

The first time I saw the PSTricks' 3D Galleries, I immediately felt in love with it. I have spent much time to learn and use it. In this forum, I see many people using TikZ. I have not used TikZ yet. ...
30
votes
6answers
7k views

Why draw diagrams using LaTeX when there are open source tools like OpenOffice?

I was looking at recent questions here and was surprized that people were drawing diagrams in LaTeX, when it can be done in SmartDraw, OpenOffice or other programs. Is there any benefit to using LaTeX ...
13
votes
2answers
2k views

Which package can easily write a graph, as an arbitrary curve or area, just for indication

Which package can easily write a graph, as an arbitrary curve or area, just for indication? The circle and ellipse don't be considered for their particular shape. TIKZ's Bézier curve is too ...
31
votes
3answers
3k views

How to draw tangent vectors and component vectors on a curve

I am searching for a way to have a figure drawn using LaTeX. I am aware of some packages TikZ and PSTricks that could accomplish this, and have been tinkering around with them recently but do not have ...
30
votes
5answers
2k views

How to draw a coffee cup

Topologists need to explain that coffee cups are homeomorphic to donuts. There are nice ways to draw donuts. So far, my best attempt is \documentclass{standalone} \usepackage{tikz} ...
19
votes
2answers
2k views

How to make dominoes falling?

How to maker a LaTex drawing of dominoes falling as the following figure?
10
votes
3answers
1k views

Drawing of Sun–Earth–Moon system

Is there a package (or packages) for drawing the Sun–Earth–Moon system with either PSTricks, TikZ, or some other vector graphics language to illustrate Lunar and Solar eclipses, the phases of the ...
15
votes
1answer
1k views

Drawing 3D crystal lattice with tikz/pstricks

I need to draw 3D lattice of DO3 type (Ni-Mn-Al, DO3) and more complex ones. Both TiKZ and PSTricks packages draw following objects on top of previously drawn disregarding "real" 3D position. For ...
13
votes
2answers
390 views

Polygon drawn with an offset

I'm looking for a more automated way to draw an area around a number of PStricks nodes. The area should be offset by a specific amount so that it will completely contain the vertices inside ...
13
votes
1answer
494 views

How do we explain the behavior of \rput, \psGetNodeCenter and saveNodeCoors?

Introduction I am writing a tutorial on a short introduction to PSTricks for newbies. I got obstacles to explain how a node A (for example), \rput, (!\psGetNodeCenter{A} A.x A.y) and (!N-A.x N-A.y) ...
9
votes
1answer
664 views

Using [pdf]{pstricks} with beamer doesn't work, but auto-pst-pdf does, why?

\documentclass{beamer} %\usepackage{pstricks,auto-pst-pdf} % works \usepackage[pdf]{pstricks} \usepackage{pst-tree} \begin{document} \begin{frame}{Test} \begin{postscript} ...
9
votes
2answers
379 views

Can we use a single frame to create the following effect?

I want to create a slide to show how the clipping works as shown in the following animation. I used two frames, the last frame is needed because I want to hide the unwanted (trimmed) parts of ...
8
votes
1answer
210 views

Can TikZ emulate PSTricks' inline \Rnodes, scattered along a complex equation?

PSTricks' \Rnode makes it easy to add annotations to a complex equation typeset by (La)TeX: Simply add \Rnodes around existing elements of the equation, and the mathematical typesetting is ...
5
votes
2answers
778 views

PSTricks + pdfLaTeX resulting in fonts not embedding into eventual PDF

I want my eventual PDF to have all fonts embedded. Using special psdots in pstricks is causing this to fail. Here is a MWE of something which results in non-embedded fonts: ...
6
votes
1answer
259 views

PSTricks figure turned 90 degrees

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \def\RPut(#1)#2{% \rput[r]{90}(!#1 1980 sub 2 div 0){#2 \quad} \rput[l]{90}(!#1 1980 sub 2 div 0){\quad #1} } ...
3
votes
2answers
615 views

Offset for node - psbrace around nodes

I already asked in the question Describing leaves of a tree with an underbrace using pstree/pstricks how to use a underbrace. Now I'd like to use \Tfan instead of \Tf, but the trick with the angle ...
26
votes
2answers
2k views

Making a Calendar for TUG

This question is triggered by a post from Peter Wilson in comp.text.tex`. Peter wrote: TUG members produced a calendar for 2012 and, if I remember correctly, for some previous years as well. I really ...
25
votes
6answers
1k views

Spirograph, Continuous Rotations in TikZ or PSTricks

Spirograph-like drawings are obtained when one repeatedly draws a closed curve on a continuously rotated canvas. Is there a nice way to make spirograph drawings using TikZ or PSTricks? There is a nice ...
18
votes
5answers
1k views

Convert font letters to vector format and fill with a pattern

I have worked with Illustrator and CorelDraw and I usually take fonts and convert them to curves after which I would fill in the curves with patterns, merge them with other vectors or the sort. Is it ...
35
votes
5answers
2k views

Please improve my logo to resemble our TeX.SX logo

It is free to use TikZ or PSTricks to answer my question. I want to recreate our TeX.SX logo. But my attempt is far from perfect. Please help me to make it more similar to the original one. ...
25
votes
6answers
2k views

Are there examples written in PSTricks and they cannot be done using TikZ?

I am comparing the cores of PSTricks with TikZ and their capabilities. I am not considering whether or not a library has been implemented. Are there examples written in PSTricks and they cannot be ...
8
votes
3answers
2k views

How to draw a circular cone

I want to draw the circular cone given by the equation z²=x²+y². (I do not mind using any given package.) I tried to use the pst-solides3d package with the help of its manual to generate the ...
6
votes
1answer
2k views

2D surface on a 3D surface plot external data in a file

I am drawing a 3D surface from external data. Here they are: 0 0 -0.64 1 0 -0.5 2 0 -0.4 3 0 -0.31 4 0 -0.23 5 0 -0.2 6 0 -0.24 7 0 -0.32 8 0 -0.42 9 0 -0.59 10 0 -0.76 0 1 -0.54 1 1 -0.4 2 1 -0.27 ...
3
votes
2answers
342 views

How can I draw this diagram of my function's domain?

How can I do this? I do not know how to do this. Is it possible to do it in LaTeX or should I create a figure with GeoGebra and insert it?
16
votes
3answers
943 views

Draw a 3D diamond structure

I want to draw a 3D diamond crystal structure. The point where I struggle is quite in the beginning to draw connecting 3D rods: \documentclass{article} \usepackage[utf8]{inputenc} ...
5
votes
2answers
1k views

Drawing checkered torus (doughnut)

How to draw a checkered torus (doughnut) in LaTeX? I have seen the example of drawing a torus. But I also need to make a $4 \cross 4$ chess board on it. It'll be more helpful if I can also change the ...
2
votes
2answers
3k views

When converting PDF to EPS, how to prevent pdftops from rasterizing fonts and transparent regions?

Compiling the following code % Circle.tex \documentclass[cmyk]{minimal} \usepackage{pstricks} \pagestyle{empty} \topmargin=-72.27pt \oddsidemargin=-72.27pt \topskip=0pt \parindent=0pt ...
12
votes
1answer
223 views

What is the equivalent for ([nodesep=10pt]{B}A) in TikZ?

\documentclass[pstricks,border=20pt]{standalone} \usepackage{pst-eucl} \begin{document} \begin{pspicture}(3,3) \pstGeonode(0,0){A}(3,3){B} \pnode([nodesep=10pt]{B}A){A'} ...
3
votes
2answers
4k views

Vertical alignment with subfig and pstricks

I'm working with pstricks to add illustrations to a paper, as I found that it allows me to save much time compared to editing files with dia/xfig/visio/etc. and including pngs. But I'm having a few ...
2
votes
1answer
125 views

How to make Derive work with a parameter other than x and how to invoke Derive in postfix notation?

In my investigation Derive can only evaluate the derivative of function f(x) with respect to x. My attempt below does not produce the expected result because I try to find the derivative of x(t) and ...
2
votes
1answer
1k views

pdflatex and pstricks

Sometimes ago I wrote a style file for drawing GANNT charts with pstricks. I typically compile my code with latex+dvips+ps2pdf, and everything works fine. However, I am now preparing a presentation ...
48
votes
6answers
2k views

How to automatically draw tree diagram of prime factorization with LaTeX?

I want to have a simple interface to automatically draw tree diagrams of prime factorization. For example, by invoking the following code, \PrimeTree{36} \PrimeTree{90} \PrimeTree{112} ...
29
votes
2answers
1k views

How to plot a lattice of points on the surface of a torus?

I am doing a report on the Ising model, without going into the complex details of the model, in its two-dimensional form it involves a lattice of points. Which, when periodic boundary conditions ...