41

EDIT: This answer has evolved using multiple versions. The answer at the very end is probably the best, but anyway... In the simplest case, when the sub-path is a straight line and its length is known the following approach can be used: It is not as PSTricks does it, but it sort of does the right thing. The spacing between dashes is always expanded using ...


19

One option using TikZ: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,shapes,fit,arrows} \definecolor{myblue}{RGB}{56,94,141} \begin{document} \begin{tikzpicture}[line width=1pt,>=latex] \sffamily \node (a1) {Anu}; \node[below=of a1] (a2) {Ashu}; \node[below=of a2] (a3) {Jenny}; \node[below=of a3] (a4) {Cathy}; \node[...


15

I've defined a macro for a simple quadratic bezier curve to connect two points. But, I've also added two parameters to allow you to specify the start and end of the portion of the bezier curve you want plotted. The command is arguments are \mybeziercurve[options]{<t-start>}{<t-end>}{<n-start>}{<n-control>}{<n-end>} where t-...


12

Another solution if you need to adapt the size of the map. if you want to scale the picture it's preferable to avoid fit. It's possible also that you want to draw the same ellipses. In this case you can do that \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \definecolor{myblue}{RGB}{56,94,141} \begin{document} \begin{...


12

How about this? This part uses a semi-automatic method to calculate the centroid. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-eucl} \psset{PointName=none} \begin{document} \begin{pspicture}[showgrid=false](-5,-5)(5,5) \pnodes{A}(-2,3)(3,4)(2,-1)(-2,-4)(-4,0) % \def\points{(0,0)} \def\Points{A0}% a dirty trick here \foreach \x in {0,1,......


11

Just for fun (cough) with TikZ (and PGF decorations). The biggest part of the decoration code has already been provided by Mark Wilbrow in his answer to Draw additional parallel paths in TikZ. His decoration contour lineto works very fine but doesn’t deal with closed paths. To work around this issue, the angle of the first segment (here (A) -- (B) is saved ...


8

You only rotate the difference vector between node A and B, but at the end you must add the coordinates of the 'origin' A: \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-eucl} \psset{saveNodeCoors} \begin{document} \begin{pspicture}[showgrid](6,6) \pstGeonode (1,1){A} (5,3){B} (!N-B.y N-A.y sub 2 exp N-B.x N-A....


7

Just for fun with PSTricks. \documentclass[pstricks,dvipsnames]{standalone} \usepackage{pst-node} \renewcommand\familydefault{\sfdefault} \begin{document} \begin{pspicture}(-4,-3.5)(4,3.5) % title \rput[b](0,3){FindFathersMap} % left names \rput(-2.5,2.25){\rnode[r]{Anu}{Anu}} \rput(-2.5,0.75){\rnode[r]{Ashu}{Ashu}} \rput(-2.5,-0.75){...


7

You can use the connection ncangles In the example below I removed the defintion of \psparallelogrambom and use instead \psframebox to simplify the example. For more information to this command have look at the documentation of pst-node. \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{xcolor} \usepackage{pstricks} \usepackage{pst-node} \...


6

Based on the excellent answer of from @Mark Wibrow, here is a slightly different solution. It increases not only the distance between the dashes, but stretches (shrinking or expanding) the entire pattern by a factor. IMHO that's the way PSTricks does it. For comparison, the result for the presented solution (stretch dash) is shown on the left side of the ...


6

Actually, it is relatively easy to do with TikZ: Place nodes with \tikz[baseline, rememeber picture] \node[anchor=base, inner sep=+0pt, outer sep=+0pt] (<name>) {<text>}; The combination of baseline and anchor=base puts <text> on the already established baseline and inner sep=+0pt and outer sep=+0pt makes sure that the node (and the ...


6

A Bézier curve is specified as a polynomial of third order in its x and y coordinates. Here is how you can use \psparnode (from pst-node) to place nodes at any distance on the curve: I used the formulas from the PostScript redbook, p. 565 (http://www.adobe.com/products/postscript/pdfs/PLRM.pdf‎: \documentclass[margin=12pt, pstricks]{standalone} \usepackage{...


6

That is not a bug in \nodexn, but could be regarded as a bug in saveNodeCoors. You can see the same behaviour when using e.g. \pnode(1,1){A}\pnode(A){C}. The error happens also with \nodexn, because that macro defines an internal node, which value is loaded in order to save its coordinates in N-<node>.x and N-<node>.y: \documentclass[preview,...


6

It's better to use alpha-numeric names. The following inserts two extra nodes at a distance of 15pt (nodesep=15pt) to the right of node F (horizontally), one on the same level as node B and the other at the same level as node F (vertically). Then, the two arrows are drawn, followed by the placement of the labels using a [l]eft reference point. \...


5

A TikZ-based version: \documentclass[tikz,border=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[marker/.style={circle,fill,draw,inner sep=1pt,pos=#1}] \foreach \place/\angle/\name in {{(0,0)}/180/a,{(3,1)}/45/c,{(3,-1)}/-45/b} { \filldraw[black] \place circle (1.5pt) node[label={\angle:$\name$},inner sep=0pt](\name){}; } \draw (a)...


5

\documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}% \usepackage{lmodern} \usepackage[nomarginpar, textwidth = 16cm]{geometry} \usepackage[svgnames,x11names]{pstricks}%%, pdf \usepackage{pstricks-add} \usepackage{multido} \usepackage{mathtools} \pagestyle{empty} \begin{document} \psset{nodesep=2pt} \newpsstyle{...


5

\parbox has three optional arguments, the first defines the vertical position of the \parbox on the baseline, the second is the height of the box, the third is the vertical position of the text inside the box. So to specify the height, you must also specify the vertical position, i.e. \parbox[c][4cm]{3cm}{\centering\bfseries#2} \documentclass[% ...


5

Not sure if this is the easiest. But it works. \documentclass[pstricks,border=1cm]{standalone} \usepackage{pst-eucl} \begin{document} \begin{pspicture}(8,-6) \pstTriangle(0,-6){B}(8,-6){A}(2,0){C} \pstMarkAngle{A}{B}{C}{} \pstGeonode[PosAngle=180]([nodesep=4]{B}C){E} \pstInterLC[PointSymbol=none,PointName=none]{C}{A}{C}{E}{G}{F} \...


4

The default location for the anchor in an \rnode is in the centre of the node. With the notation \rnode[<refpoint>]{<name>}{<stuff>} (see the pstricks documentation, section 30 Nodes, p 59) you can specify an alternative <refpoint>, say [b] (section 24 Placing and rotating whatever, p 42): I've also decreased the nodesepA value (the ...


4

It looks like there is some extra vertical space added after the row separator. Correction of -1bp: \begin{preview} \newdimen\rfix \rfix=1cm \advance\rfix-1bp \pspicture[showgrid=top,rowsep=\rfix](6,20) seems to fix this. \documentclass[preview,border=15pt]{standalone} \usepackage{pst-node} \addtopsstyle{gridstyle}{griddots=0} \psset { framearc=0.5, ...


4

Here is a quick example showing that answers the question that illustrates how to draw a (closed) polygon from a sequence of points: \documentclass{article} \usepackage{multido,pst-node}% http://ctan.org/pkg/{multido,pst-node} \makeatletter \newcounter{mycount} \newcommand{\drawpolygon}{% \setcounter{mycount}{\csname\PST@root nodecount\endcsname}% Extract ...


4

Here is how you can do that: \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido,pst-node,pst-plot} \begin{document} \begin{pspicture}[showgrid](-5,-5)(5,5) \curvepnodes[plotpoints=90]{0}{89}{% -1 0 % starting point 0 1 t {% start increment end 0.1 mul sqrt 700 mul 1 exch PtoC % the coordinates of the relative ...


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