PSTricks is a set of macros that allow the inclusion of PostScript code (e.g. drawings) directly inside (La)TeX code.
6
votes
2answers
273 views
Generating QR-code in header impossible?
I've got a strange issue with the packages pstricks/pst-barcode and fancyhdr.
Here is what I like to do: A custom header for every page, Name on the left, QR-code on the right.
Although the QR-code ...
3
votes
2answers
201 views
A weird trigonometry identity applied to get the same result
The following two input files produce the same output.
Method 1:
\documentclass[pstricks,border=15pt]{standalone}
\usepackage{pst-eucl}
\psset{PosAngle={-135,90},CurveType=polyline}
...
6
votes
3answers
170 views
Without using intersection method, can we find the following vector component?
Given that two vectors, i.e., green and red ones. The objective is to find the blue one such that the resultant of the green and blue ones is parallel to the red one and with the same direction as the ...
6
votes
2answers
164 views
Get \psbarcode to accept custom variable
I'm trying to use \psbarcode in a manner that it will take a premade variable to render the barcode. MWE that fails is below,
\documentclass{minimal}
\usepackage{auto-pst-pdf}
...
2
votes
1answer
212 views
Using [pdf]{pstricks} with beamer doesn't work, but auto-pst-pdf does, why?
\documentclass{beamer}
%\usepackage{pstricks,auto-pst-pdf} % works
\usepackage[pdf]{pstricks}
\usepackage{pst-tree}
\begin{document}
\begin{frame}{Test}
\begin{postscript}
...
3
votes
2answers
307 views
How to automatically place points names of a polygon on the bisector lines?
Let us consider the simpler one which is a triangle. According to the pst-eucl,
the point names will be placed on the bisector lines.
The below example is contradictory to the above statement.
...
5
votes
2answers
459 views
Why can't I get pstricks with auto-pst-pdf (and cropping) running on MikTeX?
\documentclass{minimal}
\usepackage[pdf]{pstricks}
\begin{document}
\begin{pspicture}(-5.25,-5.25)(5.25,5.25)%
\pscircle*[linecolor=cyan]{5}
...
9
votes
4answers
562 views
How to randomly shuffle a sliced image?
I have no idea to shuffle the following grids of a sliced image. How to do this in (La)TeX or PostScript level?
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{multido}
...
2
votes
2answers
44 views
Is there a way to know name clashes in PostScript level between ones used in PSTricks packages and our own definitions?
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}[showgrid=bottom](4,2)
\pstVerb
{
/a 2 def
/bb 1 def
}%
\rput(!a bb){First Page}
...
5
votes
5answers
463 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 ...
1
vote
1answer
34 views
How to pass a node to \psGetDistance?
I want to handle the bug mentioned in my previous question. However, the following MWE produces an error. My prediction is that \psGetDistance seems to reject nodes as its arguments.
...
8
votes
1answer
133 views
Does a zero-length line with an arrow make sense? Is it a bug?
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks-add}
\begin{document}
\multido{\i=0+30}{12}{%
\begin{pspicture}(-2,-2)(2,2)
\pscircle{1}
\pnode(1;\i){R}
...
0
votes
0answers
249 views
PSTricks doesn't work in Linux [closed]
I'm tryng to compile in Linux (Ubuntu 12.04 + Texlive-full) a document using latex>dvips>ps2pdf. This document include graphics in .eps and has a pspicture code.
When I compile this document in ...
0
votes
0answers
233 views
Is it feasible to handle graphics being normed by ISO? [closed]
I desire to draw/graph according to quality standards such as those typical of ISO. I have tried pstricks and tikz LaTeX packages, but it seems those do not included some option for obtaining normed ...
3
votes
1answer
89 views
What is the drawback (if any) when loading pst-all?
I am curious whether or not there is a drawback when we always load pst-all. Is there such a drawback or side effect?
8
votes
1answer
272 views
String diagrams for monoidal functors a la McCurdy
Almost surely you don't know who Micah McCurdy is, but here is a sample of his diagrams, on pages 20-21, for example, or page 27 for something fancier. I asked him how he did them, and unfortunately ...
4
votes
1answer
379 views
<recently read> \c@lor@to@ps
I have a problem with this file tex:
\begin{document}
\begin{figure}
\begin{center}
\begin{pspicture}(0,0)(1,3.8)
\psline{-<}(0,0)(0,.2)
\psline{-}(0,.2)(0,.4)
\psline{*->}(0,.4)(0,.9)
...
4
votes
2answers
120 views
How to make parentheses usable as macro delimiters when the macro is passed as a point in RPN notation?
How to make ( and ) usable as macro delimiters when the macro is passed as a point in RPN notation?
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-plot}
\def\f#1{#1 2 exp 1 sub}
...
2
votes
1answer
137 views
Why does \psplot need higher plotpoints when plotting a function on the left of the function's asymptote?
The following animation shows the behavior intuitively. \psplot seems to work in an asymmetric way. It can plot the right part with the default plotpoints but it is not the case when it plots the left ...
6
votes
1answer
151 views
How to draw tangens of arbitrary functions y=f(x) at given point (x,y) of f(x) using PStricks?
I'm relative new using PStricks and I don't know exactly how to draw a tangens of y=f(x) at a given point of the curve. I know, by simple mathematics that can be done by constructing the associate ...
11
votes
2answers
378 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 ...
17
votes
4answers
1k views
How to generate all possible Venn diagrams (with the case below) efficiently?
I can draw Venn diagrams but now my question is more complicated than just drawing Venn diagrams one by one. I need to draw all possible Venn diagrams efficiently. I need a combinatorical approach ...
2
votes
1answer
352 views
TeXworks + pdflatex + PSTricks autopp suffix problem
I have managed to make PSTricks work with TeXworks. However after compilation it adds -autopp to the basename of the pdf file, e.g. report.pdf becomes report-autopp.pdf. As a result TeXworks is not ...
4
votes
1answer
387 views
\rput does rotate my whole document
When using \rputwith the rotation parameter it seems to rotate my whole document if the rotated text is longer then the non-rotated text.
See this minimal example:
\documentclass[dvips]{article}
...
5
votes
1answer
321 views
How to increase the size around text in \psframebox
when using \psframebox the size between text and corners of the box is really small.
Is there a way to increase that?
My minimal example:
\documentclass[dvips]{article}
\usepackage{pst-all}
...
2
votes
1answer
392 views
Converted DVI to EPS is larger then the underlying graphic
I use this code for generating a graphic:
\documentclass[dvips]{article}
\usepackage{pst-all}
\usepackage{pst-3dplot}
\usepackage{pst-eps}
\usepackage{pst-dbicons}
\begin{document}
\pagestyle{empty}
...
2
votes
1answer
170 views
listplot and postscript
Is there a possibility with listplot to make lines from a point which is defined?
Example...
Fileinput:
-0.013,0.471
0.044,-0.294
-0.069,0.446
0.025,-0.385
0.038,-0.448
0.073,-0.365
0.375,0.045
...
2
votes
3answers
174 views
How to use angle option when using ([angle=number]{node1} node2) notation?
According to PSTricks manual, as shown in the screenshot below, there is an optional angle option.
Unfortunately, the example above does not show how to use angle option.
I have tried using ...
6
votes
1answer
183 views
Is it possible to simplify the following expression by defining a global operator?
The following MWE is the simplified version of the real scenario. I want to simplify (!\psGetNodeCenter{A}\psGetNodeCenter{B} A.x B.x add A.y B.y add) to (!A B AddNode). Is it possible?
...
1
vote
1answer
995 views
How to pass the abscissa of a node to the first 2 mandatory arguments of \psplot?
How to pass the abscissa of a node to the first 2 mandatory arguments of \psplot? I have tried \psGetCenterNode but it produced an error in PS interpreting phase.
...
4
votes
3answers
897 views
Beginners Guide to PSTricks for TeXShop users for math functions
I am looking to get help to plot tangent function. I find TikZ insufficient capability on TeXShop.
I am thinking about PSTricks and TeXShop. Is there any useful documentation or tutorial on packages ...
8
votes
2answers
154 views
How to pass a macro as a value for a key?
I want to pass a macro to a showgrid key. The macro can be redefined later. Its possible values are top, bottom, false, true.
The following MWE produces a blank page. How to fix it?
...
1
vote
1answer
97 views
How to pass a node as the angle argument of \uput?
I am attempting to solve my own problem How to rotate the label such that its base line is parallel to the bisector? with the most elegant approach, i.e., passing a node as an angle argument of \uput. ...
2
votes
1answer
433 views
How to run PSTricks in TeXShop
Why can't I run the following command in my TeXShop?
\documentclass{article}
\usepackage{pstricks-add}
\begin{document}
\psset{algebraic=true}
\pspicture(-2,-0.5)(2,2)
...
6
votes
2answers
220 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}
...
2
votes
1answer
167 views
Why does the objects get shifted to the left when using clipping?
Without clipping, the output position is correct:
With clipping, the output position is wrong as it gets shifted to the left:
\documentclass[pstricks,border=12pt]{standalone}
...
8
votes
2answers
551 views
Why don't \pscircle and \psellipse lift the pen 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 lift the pen (or ...
1
vote
1answer
87 views
How to define a global constant or a global RPN function without \pstheader?
I want to put
\pstVerb
{
true setglobal
globaldict begin
/side 4 def
/potocar {2 copy cos mul 3 1 roll sin mul} bind def
end
false setglobal
}
in the preamble instead of in ...
3
votes
1answer
137 views
Inserting text containing braces in pstricks
I'ld love to create a Database-Symbol with pst-dbicons:
\rput(5.5,3.25){\database{3.5cm}{2cm}{Datenbank(en)}}
The problem is, that there are braces inside of the text. When I remove them, it works, ...
9
votes
4answers
3k views
how to draw ellipse?
As I know, I can draw a cirle using
\draw (1,0) circle (2)
I try this kind of method to draw a \draw ellipse, failed. would you pls tell me how to draw a ellipse? what's wrong with the code below?
...
3
votes
1answer
104 views
Confused with different behaviors of nodes and literal points when using origin option
I have not found a document explaining my problem below. In my understanding, if \pnode(1,1){A} then \pscircle[origin={A}](A){1} must be identical to
\pscircle[origin={1,1}](A){1}
...
9
votes
2answers
280 views
Can we use a single frame to create the following effect?
I want to create a slide to show how the clipping works as shown in the following animation.
I used two frames, the last frame is needed because I want to hide the unwanted (trimmed) parts of ...
7
votes
2answers
733 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. ...
7
votes
2answers
359 views
How to make inner and outer regions transparent?
The white regions are required to be true transparent (preserved in both PDF and PNG). How do you do this in TikZ or PSTricks?
The following diagram is just an example for illustration.
20
votes
4answers
319 views
Does the order of specified key-values matter?
The following screen shot shows how the order of specified key-values affects the output.
When using dx=\psPiH,xunit=\psPi.
When using xunit=\psPi,dx=\psPiH.
Minimal Working Example
...
1
vote
0answers
111 views
Problem with the pst-geo bundle [closed]
I have tried to compile the code in this example from Political map in LaTeX following the latex->dvips->ps2pdf sequence but in the very first stage (latex compilation) I got the error message
...
3
votes
2answers
225 views
Why does \pscustom fail to fill the enclosed region?
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks-add}
\def\Major{3}% semi major
\def\Minor{2}% semi minor
\def\Xo{4}% distance from origin to ellipse center
\def\Theta{60}
...
5
votes
1answer
155 views
How to pass PostScript expression to nodesep and offset when using ([…]node) syntax?
How to pass PostScript expression to nodesep and offset when using ([...]node) syntax?
Edit: I just known that for angle, we can use PS expression such as angle={!30 60 add}.
...
4
votes
2answers
597 views
Plotting Trigonometric Functions
I was trying to plot graph of sine functions. I found PSTricks and tried using it, but I have no idea whether there are more standard / more appropriate packages to do this.
Here is what I did (which ...
9
votes
1answer
278 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 ...
