# Twist

> A wire with a curl, which in a ribbon category is the twist θ on that object. A String diagrams example with its LaTeX source.

A String diagrams example in the TeXeR TikZ library: https://texer.org/library/string-diagrams/twist

Package: [String diagrams](https://texer.org/library/string-diagrams.md), on CTAN at https://ctan.org/pkg/pgf.

Tags: twist, ribbon category, curl

## Source

```latex
\begin{tikzpicture}[thick, baseline=(current bounding box.center)]
  \draw (0,0) -- (0,1) .. controls (0,2) and (1.2,2) .. (1.2,1.5);
  \draw[white, line width=5pt] (1.2,1.5) .. controls (1.2,1) and (0,1.2) .. (0,2.2);
  \draw (1.2,1.5) .. controls (1.2,1) and (0,1.2) .. (0,2.2) -- (0,3);
  \node[below] at (0,0) {$A$};
  \node at (1.9,1.5) {$=$};
  \draw (2.6,0) node[below] {$A$} -- (2.6,3);
  \node[draw, fill=white, minimum width=8mm, minimum height=6mm] at (2.6,1.5) {$\theta_A$};
\end{tikzpicture}
```

## As a complete document

The same example in a document that compiles on its own with pdfLaTeX:

```latex
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}
\begin{tikzpicture}[thick, baseline=(current bounding box.center)]
  \draw (0,0) -- (0,1) .. controls (0,2) and (1.2,2) .. (1.2,1.5);
  \draw[white, line width=5pt] (1.2,1.5) .. controls (1.2,1) and (0,1.2) .. (0,2.2);
  \draw (1.2,1.5) .. controls (1.2,1) and (0,1.2) .. (0,2.2) -- (0,3);
  \node[below] at (0,0) {$A$};
  \node at (1.9,1.5) {$=$};
  \draw (2.6,0) node[below] {$A$} -- (2.6,3);
  \node[draw, fill=white, minimum width=8mm, minimum height=6mm] at (2.6,1.5) {$\theta_A$};
\end{tikzpicture}
\end{document}
```
