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

4
votes
1answer
127 views

How to get the nodes on which a line intersects the hypothetical frame box of \ncput?

I want to get the nodes on which the \*cline intersects the hypothetical edge of \ncput. The following animation shows my attempt to find the nodes by a trial & error approach. I need the nodes ...
3
votes
4answers
172 views

What dimensions and how to insert an image as a cover?

I viewed any message but I don´t reach the solution. I want to make an imge to use as cover for my final job. What dimension do you recommend? in pixels(better) or cm? or What proportions? to the ...
3
votes
3answers
156 views

How to modify \pstInterFF to find the intersection point between a constant m and a function f'(x) without having to explicitly find f'(x) from f(x)?

\documentclass[preview,border=12pt]{standalone} \usepackage{pst-plot,pst-eucl} \def\f(#1){((#1)*(#1-5)*(#1-6)/4+1.5*(#1)-5)} \def\xi{1} \def\xf{6.5} \def\m{((\f(\xf)-\f(\xi))/(\xf-\xi))} ...
2
votes
1answer
99 views

How to change vertical and horizontal unit based on a fraction of width and height of an image?

I have to overlay some texts on a PDF form. As converting the PDF form to EPS with pdftops produces unsatisfying result, I will not use PSTricks code below. ...
2
votes
2answers
61 views

Could anyone help with vertical spaces over text in psmatrix?

I´m trying doing some examples with pstricks, but I´m having problems, because only changing a cell of the psmatrix.... I have problems. Could anyone help me with vertical spaces and and showing the ...
2
votes
1answer
175 views

How to use a \pstVerb constant as the angle arguments of \uput?

How to use alpha as the angle arguments of \uput? \documentclass[border=0pt]{standalone} \usepackage{pstricks-add} \pstVerb{ /theta 45 def /alpha theta 90 sub def /weight 1.5 def } ...
2
votes
4answers
706 views

Is there a simpler way to do arithmetic in PSTricks?

I want to animate PSTricks diagram, so looping is intensively used. I have 3 global variables \START, \STOP, \DELTA that should be declared in the preamble. The remaining variables in the body will ...
2
votes
1answer
1k views

Error with pstree

\documentclass{article} \usepackage{graphics,graphicx} \usepackage{pstricks,pst-node,pst-tree} \begin{document} \pstree[levelsep=35pt]{\Tcircle{10}} { \Tcircle{11} \Tcircle{21} } \end{document} Why ...
0
votes
1answer
584 views

How to mark/round an element of a table/tabular?

I´m creating a table for simplex, and I want to create a circle around a number in a table. How can I make this in LaTeX? I use PSTricks, but I prefer don´t create an image and a table/tabular ...
16
votes
6answers
473 views

How to automatically generate a stack diagram for a PostScript expression?

The following figure shows a PostScript expression and its stack diagrams step by step. Is there any package to generate it out of the box? If there is no such a package, how to generate it ...
15
votes
4answers
304 views

How to draw random simple closed smooth curves but with the same perimeter?

I want to draw some random simple smooth closed curves. Each smooth curve must have the same perimeter but different area. See the following figure to illustrate what I meant clearly. Each smooth ...
11
votes
2answers
584 views

Drawing a complex transformation using PStricks

I'm trying to draw the picture below showing a typical instance of mapping the z point from z plane to w plane by the f(z) transformation. It is almost OK, but when I'm trying to draw the dashed ...
9
votes
1answer
244 views

What makes my line get shifted to the left when I invoke \LoadConstants?

In the beginning I use the following code. So far so good. \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido} \usepackage[nomessages]{fp} \def\LoadConstants{} ...
8
votes
4answers
580 views

Drawing cylinder with PSTricks

I am trying to draw a simple cylinder with PSTricks, similar to what is attached. Is there a smart way to do this, or do I just have to manually draw each line? If there is no other way, then it is ...
8
votes
1answer
102 views

Why do I have to place % at the end of line preceding \pstVerb?

Please consider the position of the red dots. First Case When I don't activate \pstVerb{/xxx 1 def}, the red dot is properly positioned. \documentclass[border=12pt]{standalone} ...
8
votes
2answers
275 views

Cut off part of PSTricks parallelogram if

First: I have also posted this question at the LaTeX Community a few days ago but I have not got any answer. Consider the following MWE, illustrating rays of light coming from the Sun through the ...
7
votes
1answer
84 views

Error in the PSTricks package pst-poly?

Consider the following example: \documentclass{article} \usepackage{pst-poly} \begin{document} \begin{figure} \def\sidelaengde{5 } \def\myCoor{} \centering \psset{unit = 0.4} ...
7
votes
2answers
286 views

Why is beamer+pstricks+preview no longer compatible now?

The following code is taken from Gonzalo Medina' answer here (click). At the time he posted the answer the code was compilable. \documentclass{beamer} \usepackage{pstricks-add} ...
7
votes
1answer
95 views

Intersecting boxes in pst-solides3d

I need to make a picture of some 3D boxes (i.e., parallelepipeds) that intersect themselves in some complicated ways, so I tried pst-solides3d. Here's the minimal working example: A long and thin ...
7
votes
3answers
189 views

How to combine and simplify the following PostScript operators?

Background Let \def\RR#1{(2^(#1/10))} \def\TT#1{(#1)} be the radius and angle functions, respectively. Christoph defined a PS operator AAA as follows. /AAA {AlgParser cvx exec exch AlgParser cvx ...
7
votes
3answers
329 views

Improve PSTricks code for drawing of the Olympic flag

Consider the following example. Code % pdflatex -shell-escape test.tex \documentclass{article} \usepackage{auto-pst-pdf,pstricks-add} \usepackage[locale=DE]{siunitx} \ExplSyntaxOn \cs_new_eq:NN ...
7
votes
1answer
161 views

How to increase the accuracy of \psTangentLine?

I want to draw the tangent line as well as the normal line for an arbitrary curve as follows. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} ...
7
votes
1answer
167 views

Why is there a blinking cursor on a \psdots? What is it for?

The red dot is made by \psdots while the blue one is made by \pscircle. By clicking the red dot viewed by Adobe Acrobat, there will be a blinking cursor. But a blinking cursor does not exist on the ...
7
votes
4answers
2k views

PSTricks, draw line only knowing one point.

I would like to use PSTricks to draw a line. However, I only have one point, but I know at which angle I want to draw the line, and how long I want it. Is there some way to draw a line from a point ...
6
votes
1answer
89 views

What causes the red frame not to align with the grid correctly?

What causes the red frame not to align with the grid correctly? \documentclass[tikz,border=12pt]{standalone} \usepackage{filecontents} \begin{filecontents*}{diagram.tex} ...
6
votes
2answers
186 views

drawing figure to scale

I have a technical drawing of a mechanical setup which I would like to draw in either TikZ or PSTricks. My experience with these two packages is very limited. A "MWE" of the drawing is shown in the ...
6
votes
2answers
248 views

Clipping with PSTricks

Consider the following example. Code \documentclass{article} \usepackage{pstricks-add} \begin{document} \begin{figure} \psset{unit=0.05} \begin{pspicture}(120,216) ...
6
votes
1answer
1k views

When should we use \rput, \nput, and \uput?

I am writing a short tutorial for my friends about PSTricks. So I have to systematically explain the available macros such as \nput, \rput and \uput (among others) and reduce the possibility of ...
6
votes
1answer
102 views

Conflict between xparse and pstricks: pstricks doesn't believe xparse function is defined

I want to create a pspicture with a variety of parameters which are interdependent. I'm using expl3 for the interface. But I get an error when I try to use \getr Error: /undefined in \getr Operand ...
6
votes
2answers
298 views

How to rotate the label such that its base line is parallel to the bisector?

How to rotate the label counter clockwise such that its base line is parallel to the bisector? \documentclass[border=0pt,pstricks]{standalone} \usepackage{pst-eucl} ...
6
votes
1answer
2k views

pspicture environment overlays text in figure float

I have a strange problem witih PSTricks, pst-tree and the pspicture environment. I use a figure float and a simple tree. When I put a pspicture environment around it, the picture is placed above the ...
6
votes
3answers
822 views

pstree: How can I force a tree node to one side?

I'm drawing some binary search trees using pstricks and pstree, but I don't see anything in the docs to push a node to one side. In a binary search tree, every child must be either right or left, but ...
5
votes
1answer
165 views

How can I draw this radar graph in LaTeX?

when I enter below code: \rput*[l]{15}(20;15){\huge3} \rput*{60}(20;15){\huge1} \rput*[r]{105}(20;15){\huge3} \rput*[r]{160}(20;15){\huge1} \rput*[r]{205}(20;15){\huge28} ...
5
votes
1answer
98 views

What option do I have to set to remove the mesh from the cylinder?

\documentclass[pstricks,border=12pt,12pt]{standalone} \usepackage{pst-solides3d} \begin{document} \begin{pspicture}[viewpoint=5 30 45 rtp2xyz,Decran=5](-6,-6)(6,6) ...
5
votes
2answers
606 views

Using PSTricks with TeXmaker

I want to do some drawings using LaTeX. I use TeXmaker. What the commands that I need to set up to start using the PSTricks?
5
votes
1answer
124 views

How to draw a line from the origin to the last point of \psrline?

Consider the following code to draw the Theodorus' spiral. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} \begin{pspicture}[showgrid](-5,-5)(5,5) ...
5
votes
1answer
63 views

changing intersection between axes in PSTricks

I am having some issues with axes in PSTricks. Here is my current MWE, \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-node, pst-plot} \psset { unit=0.1cm, } ...
5
votes
1answer
139 views

standalone not working properly with PStricks?

I'm using Vaucanson-G to render automata (I also use TikZ, but here, I want Vaucanson-G). Because it uses PStricks although I want to compile with pdflatex, I have put all my automata in separated ...
5
votes
1answer
86 views

PSTricks animation not scaling correctly

Consider the following animation: \documentclass{article} \usepackage[margin=2cm]{geometry} \usepackage{pst-eucl} \usepackage{animate} \usepackage{siunitx} % LaTeX 3 syntax \ExplSyntaxOn ...
5
votes
2answers
132 views

PSTricks figure way too big; normal scaling seems not to work

Consider the following example: \documentclass{article} \usepackage{pstricks} \begin{document} \begin{figure} \def\radius{19.2} \def\lige{33.3} \newlength\R \R=\radius\psunit \newlength\hW ...
5
votes
1answer
373 views

Compiling the latex->dvips->ps2pdf with dvips -Ppdf

The documents I create heavily depend on postscripts (I use pstricks quite a lot). I've had some issues with resolution, and it's been recommended to try using dvips -Ppdf. But recently, I've been ...
5
votes
1answer
462 views

How to change the opacity of PSTricks strokes?

I need to change the opacity of PSTricks strokes, is it possible to do this?
5
votes
1answer
736 views

Some extensions to pst-solides3d

I asked this set of questions (actually 2 of the 3 below) on the PSTricks mailing list a couple of days ago, but have since heard that Herbert's "to do" list is quite lengthy. So, I'm distributing ...
5
votes
3answers
1k views

Why does LaTeX not embed imported EPS images into the DVI file?

Experiment: Compiling a file, having PSTricks code inside, in LaTeX (latex.exe), results in a self-contained DVI, where this PSTricks code is embedded. But if the file has EPS images, the resulting ...
4
votes
1answer
168 views

Opacity for pst-3dplot object

How can the opacity of a pst-3dplot object be set to be transparent? I have an example where using opacity or strokeopacity options do not work. I am trying to make an image similar to the following: ...
4
votes
1answer
87 views

How can I prevent my labels from getting reflected?

The left triangle is the image of the right triangle about the vertical line in between them as the mirror. I only want geometric objects and label position (but excluding their labels) to be ...
4
votes
1answer
126 views

XeTeX pstricks larger page size is cropped to A4

In a Plain-XeTeX document, if I set the page size to anything bigger than the default page size, (A4 in my case) then all the pstricks elements beyond the size of an A4 page are trimmed of, so only a ...
4
votes
1answer
240 views

Can I use TikZ (instead of PSTricks) for latex2html5?

I found this today: http://latex2html5.com/ Author interactive math equations and diagrams online using LATEX and PSTricks It looks nice, but I'm more familiar with TikZ. Is anybody aware of ...
4
votes
1answer
172 views

PSTricks: ugly pie chart

I use pstricks to draw pie chart but when I do \documentclass{article} \usepackage[pdf]{pstricks} \usepackage{pstricks-add} \begin{document} \titlepage ...
4
votes
2answers
247 views

Convex lens (flat end) with pst-optic

Is it possible to get each end of a convex lens to be flat, like this: (I haven't been able to find anything regarding this in the manual.)