# Tag Info

3

append after command uses a similar approach for saving the node’s name as the tree uses to connect the nodes. For this, I borrow most of the code from a label or a pin and apply it in your example, too. I am using edges here since with your \pgfextra example, you would also need the additional \pgfinterruptpath. Unfortunately, both implementations do not ...

17

MWE with Asymptote, file lattice.asy: size(200); import graph3; pen surfPen=rgb(1,0.7,0); pen xarcPen=deepblue+0.7bp; pen yarcPen=deepred+0.7bp; currentprojection=perspective(5,4,4); real R=2; real a=1; triple fs(pair t) { return ((R+a*Cos(t.y))*Cos(t.x),(R+a*Cos(t.y))*Sin(t.x),a*Sin(t.y)); } surface s=surface(fs,(0,0),(360,360),8,8,Spline); ...

15

Are you thinking about something like this? \documentclass{standalone} \usepackage{asymptote} \begin{document} \begin{asy}[width=10cm,height=10cm] import graph3; import three; size3(200); currentprojection=orthographic(3,3,5); currentlight=light(gray(0.4),specularfactor=3,viewport=true, (-0.5,-0.25,0.45),(0.5,-0.5,0.5),(0.5,0.5,0.75)); int nb ...

2

You can add the option -> to draw the arrows. To add the ellipses, load the shapes.geometric library, and add nodes={ellipse,draw,minimum width=<length>} to the list of options for the \matrix command. Here, ellipse causes the node to have an elliptical shape, draw draws the elliptical border of the node, and minimum width=<length> ...

8

I'm the one who did the figure. I used Inkscape. I'm glad you like it! Cheers, Lê.

14

Remarks The picture looks a lot, like it was done using Inkscape (I think, I can tell because of the arrows). I recreated your drawing using the almighty tikz. Implementation \documentclass[tikz]{standalone} \usetikzlibrary{shapes} \begin{document} \begin{tikzpicture}[every path/.style={}] \begin{scope} \shade[right color=green,left ...

4

Just a starting point with PSTricks. \documentclass[pstricks,border=12pt,12pt]{standalone} \usepackage{pst-plot} \usepackage{pst-slpe} \begin{document} \psset{xunit=2cm} \begin{pspicture}(-.5,-.5)(4.5,6.5) \psgrid[gridcolor=lightgray,subgriddiv=1,gridlabels=0](-.5,-.5)(4,6) \bgroup ...

6

The path is treated as a single object and therefore the segments themselves can't have arrows. But you can easily draw the path in a loop, and then each segment can have its own arrow: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture}[auto, block/.style = {rectangle, draw}] \matrix[every node/.style = ...

4

\fmfforce does the trick. With feynmp-auto package you don't need to run metapost separately, just run latex twice. \documentclass{article} \usepackage{feynmp-auto} \begin{document} \begin{fmffile}{sp1} \begin{fmfgraph*}(50,100) \fmfforce{0,0}{i} \fmfforce{w,h}{o} \fmfforce{0,.5h}{v1} \fmfforce{w,.5h}{v2} \fmf{fermion, label=$e$, ...

2

An example would have been nice. I did not even know of the existence of the braid library before. Nevertheless here an attempt. I struggled with the positioning a bit as the braid does not have a "east" node which lets you easily position things, so some manual work was required. First I calculated a node half way between the start and and of the 3rd ...

5

Here's an implementation that roughly follows @ClaudioFiandrino's suggestion \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{braids} \begin{document} \begin{figure}[htb] \centering \begin{tikzpicture} \braid [line width=.4mm] (first) at (0,0) a_2^{-1} a_1^{-1} a_2^{-1} a_1^{-1}; \node [right ...

5

You are mixing the definition of spiral and its use. Put the definition in preamble. Also, the second \tikz is not needed. Further, there are & without \. It should be \&c., \&c. and add [htb] to the options of figure environment. \documentclass{tufte-handout} \usepackage{tikz} \def\spiral#1{% \pgfmathparse{int(#1)}% ...

11

You have some mistakes. There is no blank option for nodes. In \node [cloud, left of=X1] (X1) {X1};, left of=X1 is wrong as X1 is unknown at this point. Further, you are saying left of hence the X1 comes to the left at the same height. It should be below left = of init. Same is true for \node [cloud, right of=Y1] (Y1) {Y1}; You may refer to this question. ...

8

Other solution, also using TikZ. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture}[% >=latex', circ/.style={draw, shape=circle, node distance=1cm, line width=1pt}]%Define the arrow type and style for circled nodes \draw[->] (0,0) node[left] (X) {X} -- (2,0) node[right] ...

8

Your code is quite confusing. Is this what you wanted? \documentclass[tikz]{standalone} \usepackage{tikz} \usepackage{pgf} \begin{document} \usetikzlibrary{shapes, calc, positioning} \begin{tikzpicture} %create X and Y node \node (X) {X}; \node [right = 1.5 of X] (Y) {Y}; %create a coordinate in the middle of (X) and (Y) \coordinate ...

6


18

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-node,pst-plot} \def\N{60} \def\R#1#2{1 3 #1 div #2 mul add} \begin{document} \makeatletter \begin{pspicture}(-2.5,-3.5)(4,2) \degrees[\N] \curvepnodes[plotpoints=\numexpr\N+1]{0}{\N}{\R{\N}{t} t \pst@angleunit PtoC}{A} ...

30

This answer shows two to three approaches: The first one shows a version where a few often used values are evaluated beforehand and are saved in a macro. Also, the \startAngle and the \endRadius are initialized as the \foreach loop only adds \deltaAngle for the angle and .05 for the radius. The \foreach loop is then used to iterate over the segments but ...

16

Is this something like what you want? Using \foreach: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=2] \foreach \start in {0, 6, 12, ..., 354} \draw (\start:1+\start/300) arc (\start:\start+6:1+\start/300); \foreach \start in {0, 6, 12, ..., 354} \draw[fill=black!20] (\start:1) -- (\start:1+\start/300) ...

Top 50 recent answers are included