\usetikzlibrary{ knots, hobby, decorations.pathreplacing, shapes.geometric, calc } \ifDebugKnot \tikzset{ knot diagram/draft mode = crossings, knot diagram/only when rendering/.style = { show curve endpoints, %show curve controls } } \fi \tikzset{ knot diagram/every strand/.append style={ line width = 0.8mm, black }, show curve controls/.style={ postaction=decorate, decoration={ show path construction, curveto code={ \draw[blue, dashed] (\tikzinputsegmentfirst) -- (\tikzinputsegmentsupporta) node [at end, draw, solid, red, inner sep=2pt]{} ; \draw[blue, dashed] (\tikzinputsegmentsupportb) -- (\tikzinputsegmentlast) node [at start, draw, solid, red, inner sep=2pt]{} node [at end, fill, red, ellipse, inner sep=2pt]{} ; } } }, show curve endpoints/.style={ postaction=decorate, decoration={ show path construction, curveto code={ \node [fill, blue, ellipse, inner sep=2pt] at (\tikzinputsegmentlast) {}; } } } }