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

10
votes
1answer
137 views

Shape driven formatting

I'm not exactly sure how to call it, so I've had a hard time search for it online. What I have is a solid block of text. What I want is to change the formatting of part of this block of text (make it ...
9
votes
2answers
617 views

PSTricks transparency does not work with MikTeX's XeLaTeX

I use MikTeX and have updated all packages several minutes ago. The problem is that XeLaTeX produces a weird result where the transparency parts become opaque. It is not caused by preview as ...
8
votes
3answers
519 views

Create heatmap with PSTricks or TikZ

I have a huge amount of 2D-coordinates, associated with a value, e.g.: x | y | value 27.50 52.15 12.51 61.83 13.32 57.56 36.23 21.83 41.73 40.46 85.67 25.20 ... The data is ...
7
votes
2answers
2k views

How to include a PSTricks animation into a beamer?

I'm trying to create an animation to include into a beamer. I figured (naively I suppose) a way to do that is to create a Pdf with animate package, and then \includegraphics it into my beamer. ...
6
votes
1answer
617 views

Is it possible to implement an equivalent syntax of (*x {\f(x)}) but the ordinate is specified first?

PSTricks provides us with a useful syntax (*x {\f(x)}) to specify a point with abscissa x and ordinate \f(x). For example, let \def\f(#1){#1+.5}, a point (1,1.5) can be written as (*1 {\f(x)}). I ...
5
votes
3answers
439 views

Improvement of PSTricks code for drawing of balls in a triangular box

Consider the following. Code % pdflatex -shell-escape test.tex \documentclass{article} \usepackage{auto-pst-pdf,pst-eucl} \usepackage{expl3} \ExplSyntaxOn \cs_new_eq:NN \calc \fp_eval:n ...
4
votes
2answers
460 views

PSTricks -> How can I compile a graph/figure to obtain an PNG/JPG with background transparent?

How to obtain this graph in a PNG/GIF/JPG graph with transparent background? \documentclass[12pt,a4paper,x11names]{report} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} ...
4
votes
1answer
732 views

How to draw and annotate a spherical coordinate system

For some lecture script I am preparing I would need some descriptive images showing how to work with spherical coordinates as often seen in textbooks, i.e. a globe and some descriptive arrows ...
3
votes
1answer
520 views

What kind of “magic” does preview package do to produce a tight paper size?

Actually the following method, that looks like reinventing the wheel, has been discarded once I have known the existence of preview package. % WithoutPreview.tex \documentclass{article} ...
17
votes
3answers
166 views

How do I have to invoke \expandafter for a macro with multiple arguments?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-node} \begin{document} \begin{pspicture}[showgrid](-5,-5)(5,5) \pnodes{A}(-2,3)(3,4)(2,-1)(-2,-4)(-4,0) \def\points{(0,0)} ...
13
votes
2answers
768 views

Is it possible to fill the complement of (A union B union C) with a solid color but the remaining regions remain transparent?

Please ignore the binary numbers. Without finding the intersection points in advance, is it possible to fill the complement of (A union B union C) with a solid color but the remaining regions ...
13
votes
2answers
380 views

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

The pst-node package provides the \ncdiag command, which allows you to connect two nodes with a diagonal line, but with an extra arm parameter which puts a bend in the line and allows the connections ...
12
votes
4answers
812 views

getting the arXiv to produce a pdf with embedded fonts

I've produced a .tex file using the pstricks package for figures and the Times font (via the mathptmx package). When the arXiv compiles this to a .pdf file it doesn't seem to have the necessary fonts ...
9
votes
1answer
220 views

Pie Chart with text outside pie

I'm able to draw pie chart using tex code mentioned below: \documentclass[landscape,a3paper,11pt]{article} \usepackage{pstricks-add} \usepackage{pgfplots, pgfplotstable} \begin{document} ...
9
votes
1answer
325 views

How to fill a region bounded by a character and a graphic object with a color?

There are 5 white regions bounded by the ellipse and character R as shown in the following figure. I want to fill EACH of these regions with a UNIQUE/DIFFERENT/DISTINGUISHABLE color. How to do ...
9
votes
2answers
793 views

pst-solides3d and hidden lines

I am trying to draw figures with pstricks for the first time. Unfortunately, I am struggling with it. I was trying to draw a pentagon-cone and an octahedron using pst-solides3d, but it draws some ...
8
votes
3answers
1k views

Why don't \pscircle and \psellipse move the current point before drawing their shapes?

I have tested all PSTricks closed curves: \psframe \psccurve \pspolygon \pswedge \psellipticwedge \pscircle \psellipse and I noticed that only \pscircle and \psellipse do not move the current ...
7
votes
2answers
137 views

What causes two identical instances to produce different result?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \pstVerb { /updateCP {2 copy CPy add /CPy ED CPx add /CPx ED} bind def /updateA {1 sub sqrt 1 exch atan Angles add ...
7
votes
2answers
422 views

Projection of included 2D graphics to a plane

General purpose I want to project a graphic file from external sources (example.pdf saved on my computer e.g. a chip design) on the bottom of a 3D graphic (which I can draw in LaTeX by using TikZ, ...
7
votes
4answers
181 views

add mult, etc in LaTeX

I tried to see how mult, div, add, etc work but I am unable to understand what is going on in one concrete example. Say i want to put a point at x = y = 2 but the x and y coordinate come from some ...
7
votes
1answer
417 views

Transparency with psSurface in pst-solides 3D

I'm trying to draw a graph with pst-solides3D with the option psSurface : The problem is as follows : I want to draw z = +/- (y^2-y^2), which should give a saddle-point graph with the lines x=y and ...
7
votes
2answers
324 views

defining Postscript procedures with global scope

How can I define a Postscript procedure whose definition survives page breaks, that is, which has global scope? Here is a trivial example, where the procedure invocations after a \newpage fail during ...
6
votes
1answer
601 views

LuaLaTeX and PSTricks

Is there the possibility to produce PSTricks graphics in LuaLaTeX? I tried it, but i get ! Undefined control sequence. <recently read> \c@lor@to@ps l.9 \psline( ...
6
votes
2answers
495 views

What is the simplest way to draw the solution of a simultaneous inequalities using PSTricks?

Objective I want to draw a region in Cartesian coordinate system that satisfies a set of inequalities. How to do this in the simplest way? Minimal Code \documentclass{minimal} ...
5
votes
2answers
157 views

Can we use \curvepnodes and \psnline to replace the concatenated points passed to \psrline?

Can we use \curvepnodes and \psnline to get the same result as what the following code produces? \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido,pst-node} \begin{document} ...
5
votes
2answers
643 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: ...
5
votes
5answers
791 views

Draw a triangle with horizontal lines with PSTricks

Is there an easy way to draw a triangle like the one on the picture with PSTricks? Maybe a method for calculating the position of the outer line for specific height? I'm using the environment in ...
5
votes
2answers
715 views

Why doesn't pdfTeX support PStricks directly?

I am sorry, I have to remove the previous question. I didn't realize I had messed up everything (from my other questions) here. The hidden idea was actually as follows, but I had simplified it in a ...
4
votes
3answers
115 views

What is the RPN operator defined in PSTricks to convert an infix expression to the postfix one?

The following code does not compile as I failed to convert the abscissa from infix to postfix. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} % defining an RPN operator that ...
4
votes
2answers
188 views

How to draw a point if the angle value and radial function are both given in algebraic (infix) form?

\documentclass[preview,border=12pt]{standalone} \usepackage{pst-plot} \psset{polarplot} \def\RPN#1{2 #1 10 div exp} \def\Infix#1{2^(#1/10)} \begin{document} ...
4
votes
1answer
110 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 ...
4
votes
2answers
394 views

ps2pdf produces /undefined in Blue when setting gridlabelcolor to dvipsnames' Blue

latex-dvips-ps2pdf compilation sequence produces a weird result when I change the grid style. The problem does not happen when I compile the same code with xelatex. ...
3
votes
3answers
135 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
2answers
43 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
154 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
659 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
411 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
419 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 ...
11
votes
2answers
2k views

How to create text with shadows?

This question led to a new package: shadowtext I used the following code: \documentclass{article} %\usepackage{pst-all} \usepackage{pstricks} \usepackage{pst-3d,pst-text} \usepackage{soul} ...
8
votes
1answer
96 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
249 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
3answers
175 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
289 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
150 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
151 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
2answers
1k views

3D-plotting sine integral (PSTRICKS)

I'd like to build up a 3D-Plot (based on pst-solides3d), where the function looks like x=u, y=v and z=\int_0^x \frac{\sin\left(\pi t \right)}{\pi t} - \frac{1}{3} ...
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
2answers
170 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
214 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) ...