I found <a title="http://www.math.columbia.edu/~lauda/xy/braidtutorial/index.html" href="http://www.math.columbia.edu/%7Elauda/xy/braidtutorial/index.html">a site full of examples to create knots in latex</a> and it's quite a pain to paint them. <a href="http://www.wallenborn.net/download/Handout-Knotentheorie.pdf">They look nice</a>, though.
You basically paint them via <b>xy</b> and then place *"holes"* in the parts where you want to make a crossing. Here is an example:
```latex
\xy
(-3.5,3.5)*{}="LEFTTOP";
(3.5,-3.5)*{}="RIGHTBOTTOM";
(3.5,3.5)*{}="RIGHTTOP";
(-3.5,-3.5)*{}="LEFTBOTTOM";
"LEFTTOP";"RIGHTBOTTOM" **\dir{-}; \POS?(.5)*{\hole}="HOLE";
"RIGHTTOP";"HOLE" **\dir{-};
"HOLE";"LEFTBOTTOM" **\dir{-};
(0,0)*[gray]\xycircle(5,5){-};
\endxy
```