% !TEX TS-program = latex \documentclass[11pt]{amsart} \usepackage{amssymb} \usepackage{pstricks} \usepackage{pst-node} \usepackage{multido} \usepackage{ifthen, calc} \title{Braid Picture Test} \begin{document} \maketitle Previous text. \begin{figure}[htbp] \begin{center} \begin{pspicture}(8,13) \newcommand{\cross}[4]{ \ncline{V#1#4}{V#2#3} \ncline[border=2 pt]{V#1#3}{V#2#4} } %Usage: [V13,V24] crosses over [V14,V23]--ie,2=1+1, and cross 3 to 4 (over) \newcommand{\stay}[3]{\ncline{V#1#3}{V#2#3}}% % Usage: [V13,V23]: 2=1+1, and join position 3 at level 1 to itself \newcommand{\Tp[3]{\multido{\ii=1+1}{#1}{ \ifthenelse{\(\ii<#3}\) \or \(\ii>1+#3\)} {\stay{#3}{#1+#3}{#2}} {\ifthenelse{\ii=#3}{\cross{#2}{1+#2}{#3}{1+#3}} {} } } }%Usage:\Tp{N}{i}{j} joins vertices at level i, other than Vj and V(j+1), to the corresponding vertices at level (i+1), and joins Vj (resp V(j+1)) at level i to V(j+1) (resp Vj) at level (i+1), with a positive overcrossing \multido{\ii=1+1,\ry=12+-2.0}{7}{\multido{\ij=1+1,\rx=0+1.5}{5}{\rput*(\rx,\ry){\circlenode[linecolor=white]{V\ii\ij}{\scriptsize{$\ij$}}}}} \Tp{5}{1}{3} %\stay{1}{2}{1} %\stay{1}{2}{2} %\cross{1}{2}{3}{4} %\stay{1}{2}{5} \stay{2}{3}{1} \cross{2}{3}{2}{3} \stay{2}{3}{4} \stay{2}{3}{5} \stay{3}{4}{1} \stay{3}{4}{2} \cross{3}{4}{3}{4} \stay{3}{4}{5} \stay{4}{5}{1} \cross{4}{5}{3}{2} \stay{4}{5}{4} \stay{4}{5}{5} \cross{5}{6}{2}{1} \stay{5}{6}{3} \stay{5}{6}{4} \stay{5}{6}{5} \stay{6}{7}{1} \stay{6}{7}{2} \stay{6}{7}{3} \cross{6}{7}{5}{4} \end{pspicture} \caption{A Braid Diagram} \label{fig:bdiagram1} \end{center} \end{figure} \end{document}