Hot answers tagged

5

Here's a pattern I defined by taking the coordinates from your image. One could probably use some external program such as octave or the scripting capabilities of luatex to generate new points. Just taking purely random points doesn't really work, because those won't be distributed evenly enough. \documentclass[tikz,margin=1cm]{standalone} ...


4

There maybe a problem with XeTeX and the Javascript from animate. In that case use latex->dvips->ps2pdf \documentclass{article} \usepackage{pst-plot,animate} \begin{document} \begin{animateinline}[controls,autoplay, begin={\psset{unit=2}\begin{pspicture*}(-2.2,-0.5)(2.2,5.5)}, end={\end{pspicture*}}]{8} % % Generate frames for -2 ... 2 ...


4

To have text along a curve, use the \pstextpath command from pst-text. Here is a shorter code: \documentclass[x11names]{article} \usepackage{pst-plot,pst-slpe, pst-text} \usepackage{auto-pst-pdf} % \newcommand*\suitcase[1][]{\psset{#1}% \psframe[fillstyle=solid, fillcolor=gray!80](-0.8,0)(0.8,0.8) \psarc[linewidth=1.5\pslinewidth](0,0.8){0.25}{0}{180} } ...


3

You can add a \pscustom command: \documentclass[x11names]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{ebgaramond} \usepackage{array} \usepackage{pstricks-add} \usepackage{auto-pst-pdf} \psset{unit = 2,dotsize = 2.5pt} \begin{document} \begin{pspicture}(-1,-1)(2,2) \psmatrix[rowsep=3cm,colsep=3cm,mnode=circle] [name=A]A ...


3

Here is the first example as a simple tabular: \documentclass{article} \usepackage[table, dvipsnames]{xcolor} \usepackage{pstricks-add} \begin{document} \begin{tabular}{@{} l | m{2cm} | l | l |}\cline{2-4} IPv4 Datagram & \cellcolor{black!15}IPv4 Header\strut\newline next : \rnode{ipsec1}{\textcolor{Cerulean}{\bfseries TCP}} & ...


3

Use \psdot[dotsize=1.41,dotstyle=square*,dotangle=70](-0.95,13.9) instead of the rotated polygon. By the way, there is a package pst-optic with \psprism. See pages 21ff of the documentation.


3

Here is a solution. I kept the original square. The solution is to use the rotatebox command. I simplified the code using the pst-poly package, which defines a \PstSquare command and produces a square not in the same position as yours, so that I had to calculate the resulting rotation. \documentclass[border = 5pt]{standalone} \usepackage{pstricks, ...


3

\documentclass[margin=10pt]{standalone} \usepackage{pst-electricfield} \begin{document} \begin{pspicture*}(-6,-6)(6,6) \psframe*[linecolor=white!50](-6,-6)(6,6) \psgrid[subgriddiv=0,gridcolor=gray,griddots=10] \psElectricfield[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=red, radius=1.0] ...


2

that is hardcoded in the .pro file (PostScript). You can modify in the file pst-elektricfield.pro the following lines: /drawChargeCircle { % qi x y r on the stack 0 360 arc gsave % 0 ge {1}{0} ifelse setgray fill pop 0 0 1 setrgbcolor fill 0 setgray stroke } def then the charges are plotted always in blue (R G B). You can change the value to ...


2

In general you have different options to adjust the beam path in such a situation: fine tune the position of the second lens, or its refractive index. Or you can define the beam path piecewise, see the telescope example in chapter 9.5 of the documentation. \documentclass[]{revtex4} \usepackage{pst-optexp} \usepackage{pst-node} \begin{document} ...


1

I found the problem: A fixed file pstricks.tex is here: http://comedy.dante.de/~herbert/texnik/tex/generic/pstricks/ You need also the old pst-node.tex http://comedy.dante.de/~herbert/texnik/tex/generic/pstnode/ Will also be on CTAN in the next days. \documentclass[multi,pstricks]{standalone} \usepackage{pstricks-add,amsmath} \begin{document} ...


1

I defined a \myCnodeput command, which accepte an optional argument. I added auto-pst-pdf which allows compiling with pdflatex, provided you use the --enable-write18 switch (for MiKTeX) ot -shell-escape (TeX Live, MacTeX): \documentclass{standalone}% \usepackage{pstricks-add,amsmath} \usepackage{auto-pst-pdf} \usepackage{xparse} ...


1

\documentclass{article} \usepackage{pst-node} \begin{document} \begin{pspicture}(-1,-2)(4,3) \pnodes(0,0){A}(3,0){B} \psset{arcangle=30} \pscustom[fillstyle=solid,fillcolor=black!20,linestyle=none]{ \ncarc{A}{B}\ncarc{B}{A} } \pcarc(A)(B)\naput{4} \pcarc(B)(A)\naput{5} \cnodeput[fillstyle=solid,fillcolor=white](A){A}{A} ...


1

I would draw the arc-fill first (using \pscustom), and then overlay the two end circles, each having a white fill to remove the end-points of the arc-fill: \documentclass{article} \usepackage{pst-node} \begin{document} \begin{pspicture} \pnode(0,0){A}% Identify node A \pnode(3cm,0){B}% Identify node B \ncarc[arcangle=30]{A}{B}\naput{4}% Place arc ...


1

\documentclass{beamer} \usefonttheme{professionalfonts} \usepackage[sfmath]{kpfonts} \begin{document} $g$ in math mode g in text mode \end{document}


1

As noted in comments, Etex revises the plain.tex allocation macros. pstricks.tex did not properly account for this. Herbert Voss has now added a test for Etex to PSTricks so that the proper definitions are made. It has gone to CTAN, so it is available to all.


1

Use \psdot(! 1.1007960524213434E10 44.984471028928745) Then it will be read as PostScript coordinates. However, for the environment pspicture and the macro \psplot you have to change the coordinates. But the export from Geogebra is complete unusable!


1

\documentclass[border=4,pstricks]{standalone} \usepackage{pst-plot} \begin{document} \psset{unit=2,arrowscale=2} \begin{pspicture}(-1,-1)(5,3) \psaxes[labels=none,ticks=none]{->}(0,0)(-0.5,-0.5)(4.5,2.5)[$x$,-90][$y$,180] \psset{origin={1,0}} \psRandom[dotsize=1pt,randomPoints=2000](3,3){% \psline[linestyle=none](0,0)(2.5;60)(3;45)(0,0)} ...


1

With this definition you expect a space before the forth parameter: \def\working(#1,#2,#3, #4){ \rput(#1,#2){ \ovalnode{M5}{ #4 } } } \working(1,1,5, WORKING) will be ok, but \working(1,1,5,WORKING)is not; the space before "WORKING" is missing. However use \def\working(#1,#2,#3,#4){% NO SPACE ...


1

This works flawlessly: \documentclass{article} \usepackage{auto-pst-pdf} \usepackage{pstricks,pst-node} \begin{document} \def\working(#1,#2,#3,#4){% \rput(#1,#2){% \ovalnode{M5}{% #4% }% }% } \def\notworking(#1,#2,#3,#4){% \rput(#1,#2){% \ovalnode{M#3}{% #4% }% }% } ...


1

\documentclass{scrartcl} \usepackage{pst-3dplot,pst-math} \begin{document} \psset{Beta=15,Alpha=80} \begin{pspicture}(-3,-3)(3,3) \pstThreeDCoor[xMax=7,yMax=5] \parametricplotThreeD[plotstyle=curve,yPlotpoints=5](0,90)(-1,3){ u ATAN Pi add t cos mul u ATAN Pi add t sin mul u neg 2 add }% ...



Only top voted, non community-wiki answers of a minimum length are eligible