I've been using the Tikz braids package which is all nice and great, but it's also limiting in that there seems to be only one way to generate braids. For example, I think a lot of people like to draw braids like this (apologies for the blurriness; was trying to avoid an oversized image):

enter image description here

(This is from Fresse's Homotopy of Operads.) However, the braids package is designed to show you, one at a time, the action of every single generator. This is great for pedagogy! But complicated braids have lots of generators. As a result, complex braids get really long. For example, I hand drew the braid on the left. Plugging it into the braids package, I get the picture on the right

enter image description hereenter image description here


My issue is that (1) the braid doesn't fit on a single page. Now I can use adjustbox to scale it to make it fit, but this brings my second issue: it makes the braid look more complicated than it really needs to be.


So my questions are: Is this really all that the TikZ braids package can do? I looked at the documentation and it seems to be the case. In addition, are there other alternatives to generating braids in TikZ? How are other authors (e.g. Fresse above) generating their braids? Are they really just hardcoding a tikzpicture every time?

Also, there's this question but this just looks like a nightmare to do in general. In my experience with TikZ it often requires way too much time to just generate something pretty simple, so I don't want to hard code it (if I can avoid it!!).

Finally, I don't know if it helps, but heres my code for the above braid.

\braid[number of strands= 9, thick,
style strands={1}{red},
style strands={2}{red},
style strands={3}{red},
style strands={4}{Green},
style strands={5}{Green},
style strands={6}{Black},
style strands={7}{RoyalBlue},
style strands={8}{RoyalBlue},
style strands={9}{RoyalBlue}] 
s_3 s_2 s_1 s_4 s_3 s_2
s_6 s_7 s_8 
s_5 s_4 s_3 s_6 s_5 s_4 s_7 s_6 s_5
s_5 s_4 s_3 s_6 s_5 s_4 s_7 s_6 s_5;
  • I see. I'm interested in making the diagram appear more natural, e.g. like in the way that I drew it. As it stands, I can't include that drawing in my writing because I think it will make people think the braid in discussion is more complicated braid than it really is. But, I looked at the documentation and couldn't find anything that could do that. For example, I tried reducing the height, but that did some really weird stuff to the diagram.
    – trujello
    Jun 13, 2020 at 20:02
  • Also, I see other authors drawing nice braids, which makes me think they are either (1) drawing it by hand with tikz paths and whatnot or (2) are using alternatives; hence my question. But it seems like you've already answered that.
    – trujello
    Jun 13, 2020 at 20:04

1 Answer 1



  every strand/.style={ultra thick},
  strand 1/.style={red},
  strand 2/.style={red},
  strand 3/.style={red},
  strand 4/.style={green},
  strand 5/.style={green},
  strand 6/.style={black},
  strand 7/.style={blue},
  strand 8/.style={blue},
  strand 9/.style={blue},
  control factor=.001,
  nudge factor=.001,


complicated braid

If you reach the limitations of the braids package, try the knots package.

  • I already tried, the knots package is depreciated ;) But thanks for the help.
    – trujello
    Jun 13, 2020 at 20:42
  • 1
    Since when was the knots package depreciated? Jun 13, 2020 at 20:46
  • Oh I was just making a joke about TikZ packages lol. Thanks again for the help.
    – trujello
    Jun 14, 2020 at 15:27
  • Oh. I don't get the joke, but not to worry. Jun 14, 2020 at 18:02

You must log in to answer this question.

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