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

5
votes
2answers
282 views

Closed curve in PSTricks

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \def\side{% \psline(-2,2)(-1,2) \psarc(0,2){1}{180}{0} \psline(1,2)(2,2) \psline(-1,1)(0,2)(1,1) } \begin{...
6
votes
2answers
94 views

pstricks-doi package conflict?

The following does not work: \documentclass{minimal} \usepackage{doi} \usepackage[pdf]{pstricks} \begin{document} hello world \begin{pspicture}(1,1) \psline(0,0)(1,1) \end{pspicture} \end{...
8
votes
2answers
264 views

too tricky for pstricks?

I'm trying to copy the graph of a piecewise function created in GeoGebra into a LaTeX document but all I see are the axes -- no curves. I'm running TexShop and compiling with XeLaTex. In the log file ...
7
votes
2answers
335 views

Numerical calculations using PSTricks

Assume I have defined a constant \valueA as \def\valueA{25 2 sqrt sqrt mul } I would like to devide this value by the square root of 2, so I tried \pstFPdiv\valueB{\valueA}{2 sqrt} but this is ...
8
votes
1answer
252 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 ...
26
votes
1answer
1k views

Can TikZ dashed lines emulate PSTricks dashed lines?

Dashed lines differ between TikZ and PSTricks: PSTricks provides symmetry about the midpoint, and full dashes are guaranteed at each end. Can TikZ be configured to achieve this? (By default TikZ does ...
7
votes
2answers
139 views

\psdiabox is too big

How can I reduce the size of a \psdiabox, for instance: \documentclass[10pt,a4paper,twoside]{scrbook} \usepackage{pstricks} \usepackage{pst-all} \begin{document} \psset{unit=0.35} \begin{pspicture}(...
13
votes
3answers
535 views

How to invert even-odd filling?

Consider the following code. It uses eofill filling rule where only the region bounded by odd number of strokes will be filled. Is it possible to invert this rule such that the region bounded by even ...
4
votes
1answer
176 views

Strange color in PSTricks

I draw a figure in pstricks, the code is here: \documentclass{minimal} \usepackage[dvipsnames]{pstricks} \definecolor{bg}{cmyk}{0,0,0.1,0} \begin{document} \begin{pspicture}[linewidth=1.5pt](-2,-1....
6
votes
3answers
874 views

Problem with \overlays

I latex the following tex. I got error in the line below \end{slide} as Undefined control sequence } I found out that the problem is related to \overlays. \documentclass[pdf,umbc4,slideColor,...
7
votes
1answer
107 views

Why are my post script commands not getting passed the LaTeX compiler?

The following MWE \documentclass{article} \usepackage{pstricks} \begin{document} \begin{pspicture} \rput{!240 6 div}(0,0){Hello World} \end{pspicture} \end{document} is not able to parse the ...
2
votes
2answers
122 views

Not equal spacing on both sides of PSTricks figure

Taking the code of PSTikZ's answer from "PSTricks figure way too big; normal scaling seems not to work" (and putting an \fbox around it to illustrate the problem), I get the following: \documentclass{...
5
votes
2answers
160 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 \hW=\...
5
votes
2answers
817 views

Draw an inclined ellipse in PStricks

I would like to draw an inclined ellipse in PStricks, but seems the angle command does not work here. How can I make my ellipse inclinde? \psellipse[linestyle=dashed,angle=-30,linecolor=red,dash=...
1
vote
1answer
902 views

Flashy text in beamer presentation

I'm creating a beamer presentation and I'm looking after some effects I could include to make my work more attractive. Is there a way to make a flashy text? I'm thinking about an alarm clock: you know ...
2
votes
0answers
101 views

Programmatically converting an integer into bits with graphical output [duplicate]

I just stumbled upon this interesting question about "how to automatically draw tree diagrams of prime factorization with LaTeX" and it rang a bell. I 'd like to create a command that displays the ...
3
votes
1answer
1k views

how to set font size in “\rput”?

I can set the font in \rput like this \rput(-0.76,0.7){\tiny $1$} But how can I set more exact font in rput? for example: 6pt?
1
vote
0answers
23 views

Problems using pst-node/Undefined Control Sequence— PStricks [duplicate]

The code is: \documentclass{article} \usepackage{pstricks} \usepackage{pst-plot} \usepackage{pst-node} \usepackage{pst-circ} \usepackage{pst-text} \usepackage{pst-tree} \usepackage{pst-coil} \...
4
votes
2answers
143 views

psgo.sty the goboards are not drawn

I use TeXlive on Debian Wheezy. I have psgo.sty installed (in texlive-games). I have downloaded psgomanual.tex. After I enter the command latex psgomanual.tex I get a .dvi file. With lots of warnings ...
54
votes
8answers
4k 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} \PrimeTree{...
3
votes
2answers
710 views

Redefining axes label in pst-plot

I am trying to redefine the labels for x-axis in a pst-plot diagram by putting \makeatletter \def\ps@@@hlabel#1{\small(#1)} \makeatother in the preamble (see top of page 25 in the manual) but then ...
2
votes
1answer
108 views

Missing data points in PSTricks plot

Consider the following example: \documentclass{article} \usepackage{pst-plot} \begin{document} \psset{xunit=0.1,yunit=0.002} \savedata{\data}[{1924,300},{1928,510},{1932,310},{1936,880},{1948,700},...
5
votes
1answer
95 views

Confusing Problems with LaTeX3/expl3 \pdftex_if_engine:TF Switch

For a number of days I've been confused with some problems I had when using the \pdftex_if_engine:TF switch in a LaTeX3/expl3 class of my own. I thought it would be equivalent to the \ifpdf switch, ...
2
votes
1answer
787 views

Grid and tick marks in the same PSTricks picture

Consider the following example: \documentclass{article} \usepackage{pst-plot} \begin{document} \psset{ xunit=0.05, yunit=0.003, algebraic } \begin{pspicture}(-17,-140)(213,2540) % Axes \...
2
votes
1answer
178 views

Vertical grid lines not showing when using `xticksize`

Consider the following example: \documentclass{article} \usepackage{pst-coil,pst-plot} \begin{document} \begin{figure} \centering \psset{unit=0.6} \begin{pspicture}(-2.0,-0.7)(18.2,11.2) % ...
3
votes
1answer
893 views

Axis specific subgrid devision using \psgrid

If I want to devide a grid into subgrids using PSTricks, I use the command \psgrid with the option subgriddiv=<integer>. This, however, sets the number of subgrids to the same on both axis; is ...
3
votes
1answer
123 views

How to get a tight output when using pst-tree package and standalone class?

\documentclass[preview,border=3pt,varwidth]{standalone} \usepackage{pst-tree} \psset{levelsep=2,treesep=-2,angleA=90,angleB=-90,arm=12pt} \def\psedge#1#2{\ncangle{#2}{#1}} \begin{document} \psTree{...
1
vote
1answer
878 views

PSTricks, how to move and rescale a picture

How can I scale and change position of a PSTricks picture on a beamer slide? I draw a picture and save it in tex format using Inkscale. This is an example of the beginning of the picure %LaTeX with ...
1
vote
0answers
308 views

Revisiting auto-pst-pdf Fundamental Problem (<jobname>-pics.pdf not created) [closed]

The code provided as an answer on this post used to work. To ease things, I reproduce it here, only in a more condensed form since I'm interested just in the PSTricks part -- the minted part working ...
4
votes
1answer
65 views

pstricks and caa.cls

I have a TeX file that my prof gave me and I can't get it to work. First, I don't know what package allows me to use \documentclass[12pt,reqno]{caa}. Next, I have a bunch of pscurves, pslines, and ...
3
votes
0answers
72 views

angular spring macro

Does anyone have a macro for an "angular spring" ? I'm looking for something similar to that in pst-coil (PS-Tricks package) but the geometry of the "spring" is not straight but an arch (with ...
14
votes
2answers
1k views

How to draw spherical triangles?

Does anyone know how to draw spherical arcs and spherical triangles using LaTeX?
4
votes
1answer
192 views

How to do a surface with pstricks using data from a surveying?

For each point of the grid a have the coordinates (X,Y) and height (Z), like: X 1 2 3 1 2 3 1 2 3 Y 1 1 1 2 2 2 3 3 3 Z 2 1 0 4 5 1 8 4 3
6
votes
2answers
1k views

Resources for PSTricks examples

What resources for PSTricks examples do you know? Please feel free to add nice work of your own here as well! Background: I am constantly looking for PSTricks examples to get ideas how to solve my ...
4
votes
1answer
140 views

Drawing of PSTricks figure not precise

Consider the following code: \documentclass{article} \usepackage{pstricks-add} \usepackage[locale=DE]{siunitx} \ExplSyntaxOn \cs_new_eq:NN \calculate \fp_eval:n \ExplSyntaxOff \def\ORb{\...
5
votes
1answer
175 views

Need for loading of expl3 code?

Consider the following example: \documentclass{article} \usepackage{pst-plot} \usepackage[locale=DE]{siunitx} % Self-brewed macro. \def\andel#1{% \calculate{#1/(\Nord+\MidtVest+\Oestjylland+\Syd+\...
6
votes
1answer
116 views

Wrong x-axis with pst-plot

Consider the following example: \documentclass{article} \usepackage{pst-coil,pst-plot} \def\tilskud#1#2{% \psline[linewidth=1.5pt,linecolor=red]% (!#1 1986 sub 0)% (!#1 1986 sub #2 8 sub 2 ...
2
votes
1answer
123 views

pstricks output garbled on Ubuntu 13.04

I recently installed Ubuntu 13.04 and tried to recompile a pstricks document I had previously created on an older version of Ubuntu. However all the images came out wrong and consist of all the text ...
3
votes
1answer
656 views

Issue on pdf(La)TeX with named colors in dvipsnames

When compiled on pdfLaTeX, the following code (and MWE) returns a PostScript error message: \documentclass{article} \usepackage[dvipsnames]{xcolor} \usepackage{pstricks} \usepackage[pdfcrop={--hires}...
13
votes
3answers
487 views

Draw Polygonal Number Using PSTricks (or TikZ)

I would like to draw the following using PSTricks (or TikZ): (Found on http://i1.wp.com/mathandmultimedia.com/wp-content/uploads/2012/08/polygonal-numbers.png.) I can do it myself using an ...
3
votes
1answer
122 views

Good way to cut off extra range data in listplot

Using listplot, is there a way to cut off extra range data? The option yEnd=10 simply removes the points above y=10 so that it changes the overall shape of the curve. Here is example code: \...
1
vote
0answers
153 views

How to load pstricks private header files under MiKTeX? [closed]

Under MikTeX, the method to load private header files containing custom postscript macros seems to have changed. What is the current preferred method for including such macros? For years I have ...
9
votes
3answers
318 views

PSTricks: Wrong axis labels

Consider the following example: \documentclass{article} \usepackage{pstricks-add} \def\sandsynlighed#1#2{% \psframe[ linecolor=red, fillstyle=solid, fillcolor=blue!50 ](#1,0)(!#1 \...
10
votes
1answer
522 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
1answer
305 views

How to draw a ellipse figure in beamer at desired location? How to put a .eps logo figure at the right bottom corner?

Here is the code: \documentclass{beamer} \usepackage{xeCJK} \usepackage{tikz} \usepackage{pstricks} \setCJKmainfont{SimSun} \usetheme{CambridgeUS} \setbeamertemplate{...
3
votes
1answer
410 views

Draw an implicitly defined surface in 3D

I want to visualise the following set as a subset of [0,\infty)^3: What's the most efficient way to do this? I am thinking of either TikZ or psTricks.
5
votes
1answer
548 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 ...
6
votes
1answer
300 views

pshlabel and log graphs: the 10^ disappear

I would like to reduce the label size for all my graphs (using pstricks). I used the following code: \makeatletter \def\pst@@@hlabel#1{{\small #1}} \makeatother which works fine for my ...
1
vote
1answer
124 views

DVISVGM and PSTricks

EPS file conversion is not satisfactory with dvisvgm because labels are not displayed. \documentclass[a4paper,11pt]{article} \usepackage{etex} \usepackage[utf8]{inputenc} \usepackage[T1]{...
6
votes
2answers
526 views

Error “Illegal unit of measure” occuring when using PSTricks

Consider the following example: \documentclass{article} \usepackage{pstricks} \newcommand*\sleep[3]{% \psframe[fillstyle=crosshatch*](6 #1 mul 37 sub 0.5)(6 #1 mul 36 sub 0.5 5 #2 div add) \...