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

6
votes
3answers
846 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. ...
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
121 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: ...
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 ...
5
votes
2answers
794 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? ...
1
vote
1answer
886 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 ...
53
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} ...
3
votes
2answers
690 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
107 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} ...
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
758 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
171 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
854 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
121 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} ...
1
vote
1answer
871 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
302 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
997 views

How to draw spherical triangles?

Does anyone know how to draw spherical arcs and spherical triangles using LaTeX?
4
votes
1answer
191 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
139 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 ...
5
votes
1answer
173 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{% ...
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
647 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} ...
13
votes
3answers
481 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
120 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
303 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 ...
9
votes
1answer
501 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
302 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} ...
3
votes
1answer
406 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
538 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
297 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} ...
6
votes
2answers
522 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) ...
5
votes
2answers
197 views

Changing baseline to top for pspicture

I tried to align text with the top of a figure. The pstricks manual says that I can specify an option to the pspicture environment, but this somehow does not work. I get an error message. ! Package ...
4
votes
1answer
191 views

How to use pstricks package within beamer? I know the pure English typseting method using pstricks in beamer, but failed xelatex pstricks beamer

In order to display simple figure, I began to learn pstricks package. I copied a piece of sample code to a beamer file. When I compile it, something goes wrong. How can I fix it? Process ...
2
votes
1answer
208 views

TeX4ht and PSTricks

I tried to compile the code below with mk4ht htlatex file.tex 'xhtml, charset = utf-8 pmathml' '-cunihtf-utf8-cvalidate' Formulas and text are transcribed, but not graphics. How to solve this ...
1
vote
1answer
287 views

same fontsize in plot in revtex document as text

I am making a figure in PSTricks for a RevTeX document. A MWE of my figure is the following \documentclass{article}[28pt] \usepackage{pstricks, pst-node, pst-plot, pst-circ} \usepackage{moredefs} ...
4
votes
1answer
190 views

Polygons being clipped during pst-solides3d projections

I'm having trouble doing something that seems very simple, so I'm hoping that I've made a naive mistake. I'm attempting to project several polygons onto a plane using the \psProjection feature in ...
4
votes
1answer
169 views

Transmission grating in pst-optexp

It seems that transmission gratings have not been implemented yet in the pst-optexp. Does anyone know whether there exists a workaround?
7
votes
2answers
345 views

Rotate an arrow around its center

I want to draw this with tikz, I have been trying to do it with tikz for awhile but didnt get far, with suggestion I moved to PsTricks. This is what I have so far ...
13
votes
4answers
830 views

pst-optexp: draw prism compressor

I wanted to draw a prism compressor with the respective beamlines. The general setup works, but the exact control of the beam alignment within the prisms fails. Here is the code that I have so far: ...
4
votes
1answer
435 views

Latex Block diagramm / draw Range

I want to use a Block diagram like in this document on page 9: http://texdoc.net/texmf-dist/doc/generic/pst-bar/pst-bar-docDE.pdf But I fail at doing this. At the moment I am using this: Grouped bar ...