2
votes
1answer
36 views

How can I use unicode characters as identifiers in PostScript? Is it impossible?

I feel "uncomfortable" with the existing constants below (which are already defined in PSTricks) Euler = 2.718281828 Pi = 3.141592654 because I think using e and π is much more natural. My ...
2
votes
1answer
119 views

How to make Derive work with a parameter other than x and how to invoke Derive in postfix notation?

In my investigation Derive can only evaluate the derivative of function f(x) with respect to x. My attempt below does not produce the expected result because I try to find the derivative of x(t) and ...
4
votes
3answers
149 views

What is the safe PostScript expression to plot 1/floor(1/x)?

What is the safe PostScript expression to plot f(x)=1/floor(1/x)? \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} \pstVerb{/inv {dup 0 eq {pop e30} {1 exch div} ifelse} bind ...
2
votes
1answer
107 views

Weird issue involving pstricks, dvi->ps->pdf toolchain, and the letter combination rt

This is an extremely weird bug [Edit]it's not a bug, the problem was in my code. I spent 1 hour bringing this down to a small working example, can't figure out if its minimal. Set up: Ubuntu latest ...
16
votes
6answers
434 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 ...
7
votes
3answers
223 views

How to automatically draw the images of a point placed between 2 inclined mirrors?

Consider a point X placed between two inclined mirrors as follows. \documentclass[pstricks,border=20pt,12pt]{standalone} \usepackage{pst-eucl} \def\Angle{37}% extreme case in which 360/\Angle-1 is ...
6
votes
1answer
211 views

How to write a bounding box information in PostScript to an external file and read it in TeX at the second compilation?

Scenario I want to create a new environment, e.g., pscanvas that does not need any size specification but just a unique filename. It can contain any graphic objects that pspicture can contain. Thus ...
4
votes
1answer
92 views

How to use PostScript for to plot the sum of cos(n*x) for n=0 to n=100?

I want to plot the function f(x) which is the sum of cos(n*x) for n=0 to n=100. The domain is from 0 to 2π. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} \begin{document} ...
12
votes
2answers
136 views

What is PostScript dictionary for? How to know whether or not I need it?

Consider the following code, \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \psset{linecolor=red} \pstVerb { /updateCP {2 copy CPy add /CPy ED CPx add /CPx ED} bind ...
7
votes
3answers
179 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 ...
4
votes
3answers
119 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 ...
5
votes
2answers
106 views

What is the correct RPN expression of a piecewise-defined function passed to \psplot?

My objective is to pass a piecewise-defined function in RPN to \psplot. The complete code is given as follows. The function is sin x for x<0 and cos x for other x. ...
7
votes
1answer
88 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 ...
7
votes
2answers
286 views

psplot: square root of negative number

Is there a possibility to have psplot automatically ignore an invalid range? Example: x 2 sub sqrt This cann't be plotted requesting \psplot{0}{10}, but only when using \psplot{2}{10}. Of course ...
6
votes
2answers
135 views

Why can the labelsep of \uput not work when represented in RPN?

In order to be more noticeable, I present my comment as a new question here. Background: \uput with the following syntax accept 5 arguments. I have tested the last four arguments that they can ...
9
votes
1answer
242 views

What makes my line get shifted to the left when I invoke \LoadConstants?

In the beginning I use the following code. So far so good. \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido} \usepackage[nomessages]{fp} \def\LoadConstants{} ...
4
votes
2answers
133 views

Is PostScript access from TeX (via PSTricks or TikZ) safe?

PSTricks and TikZ grant us access to PostScript. Is it safe? I meant: Is there a vulnerability hole open for someone to exploit? Edit: I just found that compiling PSTricks with xelatex might be ...
2
votes
1answer
89 views

What makes the radius too long in the following PS expression?

I want to translate \pstVerb{/Dist {N-A.x N-A.y N-B.x N-B.y Pyth2} def} from the following \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-eucl} ...
4
votes
1answer
71 views

Why does my RPN expression to find a distance of 2 nodes produce a wrong output?

I want to find a variant for the following, \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-eucl} \addtopsstyle{gridstyle}{gridlabels=0pt,griddots=0} \begin{document} ...
10
votes
4answers
2k views

How to overlay graphs using includegraphics or pstricks?

I have a figure (eps file included using \includegraphics) inside a postscript environment where I use PSTricks to add labels and extra lines. I want to add another eps file smaller in the top right ...
3
votes
1answer
301 views

postscript code in psplot fails

the following code snippet doesn't work as expected \documentclass{article} \usepackage{pstricks,pst-plot} \pagestyle{empty} \thispagestyle{empty} \begin{document} \begin{pspicture}(10,10) ...