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

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 ...
0
votes
1answer
155 views

Is there a built-in PSTricks macro to get the value of \pslinewidth in the current unit?

I need the value (without trailing unit) of \pslinewidth in \psunit. I have done as follows but I am disappointed with the accuracy. \documentclass{article} \parindent=0pt \usepackage{pstricks} ...
0
votes
3answers
421 views

I failed to use \newenvironment and \newcommand

The following code snippet does not work. \documentclass{article} \usepackage{pstricks} \newcommand\Left{-1} \newcommand\Right{1} \newcommand\Bottom{-1} \newcommand\Top{1} ...
4
votes
2answers
928 views

What is the unit of the coordinate system in PSTricks?

If I use the following code, there two different kinds of units. One for the coordinate system used to declare \begin{pspicture} with (0,0) to (20,10), and the centimeter used in 4.2cm. ...
2
votes
4answers
671 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 ...
1
vote
2answers
169 views

How to express a polar coordinate for a macro that only accepts space-separated values?

\psElectricfield only accepts a coordinate in space-separated values as follows. For example, a charge of -0.1 unit at (-1,0) is written as [-0.1 -1 0]. I have attempted to write in PS notation but it ...
3
votes
4answers
276 views

What is the TeX equivalent for the following C# nested loop?

I need a nested loop to animate PSTricks diagrams. In C# or C or C++, I usually write as follows. int N=6; for(int x=0; x<N; x++) for(int y=x+1; y<N; y++) Console.WriteLine("({0}, ...
6
votes
1answer
554 views

How to divide a length-valued macro by a dimensionless-valued macro?

I have attempted to do as follows, but it does not work. \documentclass{minimal} \usepackage{pstricks-add} \psset { xunit=\dimexpr1cm/\psPi\relax, yunit=1cm } \begin{document} ...
0
votes
1answer
938 views

putting \psframebox with the left corner coordinate in PSTricks

Using the auto-generated codes by LaTeXdraw, I put a text box with the following code in PSTricks: \rput(9, -1){\psframebox[linewidth=0.04,fillstyle=solid]{Text Goes Here}} I guess the coordinate ...
1
vote
4answers
746 views

How to get started with plain TeX

I am using TeX Live 2010 on Windows 7. I have no experience to compile a plain TeX input file. Is my input file below correct? % gettingstarted.tex \input pstricks \topmargin=-72.27pt ...
1
vote
2answers
884 views

How can I create PDF & EPS exactly as big as my PSTricks picture but without using pdfcrop?

This question is made to accompany the existing question: How can I create a pdf document exactly as big as my tikz picture?. Constraints: It is not allowed to use pdfcrop by any means whatsoever. ...
5
votes
1answer
691 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 ...
2
votes
1answer
403 views

How to improve accuracy when working with PSTricks?

I have tried this with TikZ that produces the same issue, you can try Leo's solution here. In other words, this issue is NOT specific to PSTricks. The hidden idea is to avoid cropping with pdfcrop ...
2
votes
1answer
157 views

\psboxfill cannot work with a starred \pspicture

When \psboxfill encloses \pspicture*, I got a strange result as follows. \documentclass[cmyk]{minimal} \usepackage{pstricks,pst-fill} \psboxfill{% \psset{unit=1pt} \begin{pspicture*}(1,1) ...
4
votes
2answers
318 views

How to speed up rendering a PSTricks object with a custom fill

Because PSTricks does not provide us with dotted and x-like fill styles, I must create my own custom fill style using pst-fill package. However, the rendering is too slow and sometimes out of memory. ...
0
votes
2answers
662 views

What is the file name of Helvetica font used by PSTricks grid labels?

This is related to Herbert's comment in answer for Which one is recommended to get cropped PDF and EPS graphics?. He said I can use dvips -h hv______.pfb input.dvi to embed font to the resulting PS ...
9
votes
5answers
934 views

How to draw this diagram with minimum effort?

I want to save my time by avoiding manual calculation if possible. Could you help me to simplify the following code snippet? \documentclass{minimal} \usepackage{pst-node} ...
0
votes
1answer
330 views

How to remove PSTricks dictionary or library codes in an EPS file produced by dvips?

I have 2 mutually-exclusive methods to produce cropped PSTricks graphics in EPS format: Using latex input.tex followed by dvips input.dvi -E -o output.eps. Or using latex input.tex followed by dvips ...
1
vote
1answer
298 views

Automation of generating pstricks graphics with texclipse before pdf generation

When using eclipse with pdflatex I want it to create the pstricks Images automatically. The classical way (without eclipse or texlipse) would be: latex test.tex dvips -o test-pics.ps test.dvi ps2pdf ...
0
votes
1answer
110 views

How to prevent my PSTricks codes from interfering the imported EPS files?

My main input file not only contains PSTricks codes but also imports EPS images produced by epstool from standalone PSTricks input files compiled with dvips input.dvi -E -o output.eps. I am worried ...
13
votes
3answers
962 views

Deactivating Anti-Aliasing when typesetting QR-Code

Using the following LaTeX-Code: \documentclass[a4paper]{article} \usepackage[pdf]{pstricks} \usepackage{pst-barcode} \begin{document} \begin{pspicture}(0.7in,0.7in) ...
7
votes
1answer
893 views

PSTricks to SVG

I would like to make block diagrams using the pst-sigsys package (as demonstrated here: http://squobble.blogspot.com/2009/12/drawing-beautiful-block-diagrams-in_04.html). I can do that and export to ...
1
vote
1answer
496 views

Missing text from boxes in block diagram (pst-sigsys/pstricks)

I am trying to make a block diagram using pst-sigsys/pstricks. The text however isn't in the boxes but is stashed on the left. I absolutely run out of ideas what might be causing it to happen. Any ...
1
vote
1answer
160 views

Is there a formula to setup the smallest rectangle enclosing a PSTricks grid and its labels?

I want to minimize the size of the red rectangle enclosing a PSTricks grid and its labels. How to do this? \documentclass{minimal} \usepackage{pstricks} \newpsstyle{gridstyle}{gridlabels=5pt} ...
1
vote
1answer
720 views

How to show grid labels when using starred pspicture?

I need grid labels even when I use \pspicture*. How to do this? \documentclass{article} \usepackage{pstricks} \psset{linecolor=red} \begin{document} \figure[h]\centering ...
5
votes
3answers
999 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 ...
1
vote
1answer
416 views

Is it possible to force auto-pst-pdf to use --hires option when it internally invokes pdfcrop?

What is --hires for? To obtain a better result when cropping a pdf image produced by PSTricks, I use --hires option as follows latex filename.tex dvips filename.dvi ps2pdf ...
2
votes
1answer
304 views

How to compile a ConTeXt input file that contains PSTricks code?

I can compile the following input file using context filename unless I un-comment the PSTricks code. \usemodule[pstricks] \setuphead[title][style={\ss\bfd}, before={\begingroup}, after={John ...
7
votes
1answer
2k views

How to place in a document a VCard using a psbarcode?

I would like to put a QRCode that contains contact information (VCard). However I don't know how to encode the newline character so VCard is correctly read. Here is a sample document with QRCode ...
3
votes
2answers
433 views

Why cannot XeLaTeX clip my PSTricks graph plot correctly?

The following screenshot produced by latex-dvips-ps2pdf and the clipping is well done. \documentclass{article} \usepackage{xcolor} \usepackage{pstricks,pst-func} \newpsstyle{gridstyle} { ...
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 ...
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
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 ...
3
votes
1answer
376 views

Empty page inserted with pspicture environment

From the question How can I design a book cover, I tried to compile the code from Dean Serenevy. \documentclass{article} \usepackage[]{graphicx} \usepackage{pstricks} \begin{document} ...
3
votes
1answer
2k views

Vertical alignment of subfigures

So I have a document which in a lot of places uses one pstree (part of the pstricks package) and a simple tabular side by side...I do this with subfigures. The problem is that because the pstree image ...
29
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 ...
9
votes
2answers
799 views

PostScript operators and Reverse Polish Notation for plotting using PSTricks

I know that the PSTricks packages for plotting, pst-plot and pst-3dplot, use PostScript operators and Reverse Polish Notation. Is there a comprehensive list of all the operators available, with a ...
1
vote
1answer
176 views

Highlighting/Bolding Tcircle elements

So I am using PSTricks PSTree package to build a tree using TCircle ... now I want to bold out some branches by making the lines of the circle and the connecting lines thicker ... can I do this ...
3
votes
4answers
712 views

Is there a package in either PSTricks or Tikz to draw the following diagram?

I took the following figure from JSON official site. Is there a package to do it easily? Anyway, what is the name of this diagram?
1
vote
1answer
360 views

two psframe at same height using pstricks

I'm trying to create two psframes at same height using the following code \documentclass[a4paper]{article} \usepackage{pstricks} \begin{document} \psframe(-3,-1)(5.5,3) %frame1 \psframe(5.5,-1)(14,3) ...
12
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 ...
5
votes
1answer
2k views

xelatex compilation of pstricks fails

I just needed to compile the following lines (minimal example) \documentclass{standalone} \listfiles \usepackage{pstricks} \begin{document} Ein \begin{pspicture}(-5,-3)(5,8) \psline(0,1)(2,3) ...
3
votes
1answer
375 views

Problems while installing pst-barcode

I tried to install pst-barcode, but after moving the files to /usr/share/texmf/dvips/pstricks/ and running texhash, I still can't use them, and have to enter the files manually when compiling the ...
2
votes
1answer
292 views

Problem with pst-dbicons examples

I am currently trying to get the example of the pstricks dbicons package to work but I always end up with errors. I have tried to compile the mondial example (see dbicons-site, sorry i can only put ...
2
votes
1answer
1k views

pstricks and beamer compilation with xelatex results in xkeyval error

I'm creating some slides and need to include a pstricks image. I'd like to compile the file via xelatex. My minimal example reads \documentclass[ngerman,xcolor=pst]{beamer} ...
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} ...
15
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 ...
3
votes
1answer
344 views

Problem with parbox using pstricks and ticket package

I'm trying to make cards for a game. I have a problem with \parbox. It's working ok only if the \parbox in the previous picture is empty. If it's not the contents of \parbox are shifted down. Here ...
4
votes
3answers
841 views

Draw tangents from point to ellipse using PSTricks

I'd like to create an ellipse (using psellipse, say). Call it E. And I'd like to specify a point P outside E. And then I'd like to construct, using PSTricks, the two rays starting at P and tangent ...
6
votes
2answers
504 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} ...