0

I've been using the braids package (https://www.ctan.org/pkg/braids) but I have no clue how to draw the closure of a diagram, an example is pictured below on the left.
enter image description here

Currently I have the diagram on the right which corresponds to:

\documentclass{amsart}
\usepackage{tikz}
\usepackage{braids}
\begin{document}

\begin{center}
\begin{tikzpicture}[scale=1]
\braid[line width=2pt, nudge factor=-0.25, control factor=0.75, style strands={1}{red},
style strands={2}{blue},
style strands={3}{black}, style strands={4}{green}, style strands={5}{yellow}] (braid) at (0,0) s_1^{-1} s_3^{-1} s_1^{-1} s_4 s_2 s_4 s_2 s_4 s_1^{-1} s_3^{-1};
\draw[thick] (-0.3,0) -- (4.3,0);
\draw[thick] (-0.3,-10.5) -- (4.3,-10.5);
\end{tikzpicture}
\end{center}

\end{document}

How can I draw the closure of this diagram?

1 Answer 1

2

The coordinates are described in the manual:

Coordinate description from the manual

Now you can connect the ends e.g. like this:

\documentclass[tikz, border=1cm]{standalone}
\usepackage{braids}
\begin{document}
\begin{tikzpicture}
\braid[line width=2pt, nudge factor=-0.25, control factor=0.75, style strands={1}{red},
style strands={2}{blue},
style strands={3}{black}, style strands={4}{green}, style strands={5}{yellow}] (braid) at (0,0) s_1^{-1} s_3^{-1} s_1^{-1} s_4 s_2 s_4 s_2 s_4 s_1^{-1} s_3^{-1};
\draw[thick] (-0.3,0) -- (4.3,0);
\draw[thick] (-0.3,-10.5) -- (4.3,-10.5);
\draw[dotted] (braid-rev-3-s) -- ++(0,1) -- ++(1,0) |- ([shift=(south:1)]braid-rev-3-e) -- (braid-rev-3-e);
\end{tikzpicture}
\end{document}

Braid with dotted line connecting start and end of strand

1
  • I see. I'm new to TikZ so I really appreciate it, thank you!
    – Ron
    Dec 13, 2022 at 12:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .