2

enter image description here

Hi,

I have drawn three items in tikzpicture, and now would like to place them next to each other, in a row. Ideally placing a \leftrightarrow between them to indicate that they are equivalent. I have tried so many different ways such as \centering, \begin{centre}... \end{centre}. As well as \minipage. But none of them worked for me.

Here is my code:

\begin{figure}[!h]

\begin{tikzpicture}
\begin{knot}[clip width=10, clip radius=15pt, consider self intersections, end tolerance=3pt]
  \strand[ultra thick] 
    (0,0) to[out=up, in=down] (0,0.7) 
    to[out=up, in=left] (0.5,1.5)
    to[out=right, in=up]  (1,1)
    to[out=down, in=right]  (0.5,0.5)
    to[out=left, in=down]  (0,1.3)
    to[out=up, in=down]  (0,2);
\end{knot}
\end{tikzpicture}

\begin{tikzpicture}
\begin{knot}[clip width=10, clip radius=15pt, consider self intersections, end tolerance=3pt]
  \strand[ultra thick] 
  (0,0) to[out=down, in=up] (0,0.7) 
    to[out=up, in=right] (-0.5,1.5)
    to[out=left, in=up]  (-1,1)
    to[out=down, in=left]  (-0.5,0.5)
    to[out=right, in=down]  (0,1.3)
    to[out=down, in=up]  (0,2);
\end{knot}
\end{tikzpicture}

\begin{tikzpicture}
\draw[ultra thick] (0,0) -- (0,-2);
\end{tikzpicture}

\caption{The Reidemeister Moves}
\end{figure}

If someone can help me overcome this problem, I will really appreciate them. IF anyone also knows a good page or video or tutorial on how to become expert in drawing in Tikzpicture environement, I really thanks them if they can share it with me. I need to draw different knot diagrams, but there's plenty technical bits I need to learn in order to apply them in my diagrams, and hence need to learn everything from scratch.

Many Thanks

Asghar

1
  • 1
    For future reference, please add code examples that compile as is, including the \documentclass, \begin{document} and \end{document} as well as especially any tikz libraries you are using. It is quite annoying to have to guess which ones are required, especially if they are uncommon ones.
    – Markus G.
    Commented Aug 14, 2021 at 13:11

2 Answers 2

4

Probably the following is closer to the expected output?

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{knots}
\begin{document}

\begin{figure}[!h]
\centering
\begin{tikzpicture}
\begin{knot}[clip width=10, clip radius=15pt, consider self intersections, end tolerance=3pt]
  \strand[ultra thick] 
    (0,0) to[out=up, in=down] (0,0.7) 
    to[out=up, in=left] (0.5,1.5)
    to[out=right, in=up]  (1,1)
    to[out=down, in=right]  (0.5,0.5)
    to[out=left, in=down]  (0,1.3)
    to[out=up, in=down]  (0,2);
\end{knot}
\draw[<->] (1.5,1) -- (2.5,1);
\begin{knot}[clip width=10, clip radius=15pt, consider self intersections, end tolerance=3pt]
  \strand[ultra thick] 
  (4,0) to[out=down, in=up] (4,0.7) 
    to[out=up, in=right] (3.5,1.5)
    to[out=left, in=up]  (3,1)
    to[out=down, in=left]  (3.5,0.5)
    to[out=right, in=down]  (4,1.3)
    to[out=down, in=up]  (4,2);
\end{knot}
\draw[<->] (4.5,1) -- (6.5,1);
\draw[ultra thick] (7,0) -- (7,2);
\end{tikzpicture}

\caption{The Reidemeister Moves}
\end{figure}

\end{document}
4

There is always the option of using just a single tikz environment like this:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{knots}

\begin{document}
    \begin{figure}[!h]
    \centering
    \begin{tikzpicture}
        \begin{scope}
            \begin{knot}[clip width=10, clip radius=15pt, consider self intersections, end tolerance=3pt]
                \strand[ultra thick] 
                (0,0) to[out=up, in=down] (0,0.7) 
                to[out=up, in=left] (0.5,1.5)
                to[out=right, in=up]  (1,1)
                to[out=down, in=right]  (0.5,0.5)
                to[out=left, in=down]  (0,1.3)
                to[out=up, in=down]  (0,2);
            \end{knot}
        \end{scope}
    
        \node at (.175\textwidth,1) {\Large$\Leftrightarrow$};

        \begin{scope}[xshift=.35\textwidth]
            \begin{knot}[clip width=10, clip radius=15pt, consider self intersections, end tolerance=3pt]
                \strand[ultra thick] 
                (0,0) to[out=down, in=up] (0,0.7) 
                to[out=up, in=right] (-0.5,1.5)
                to[out=left, in=up]  (-1,1)
                to[out=down, in=left]  (-0.5,0.5)
                to[out=right, in=down]  (0,1.3)
                to[out=down, in=up]  (0,2);
            \end{knot}
        \end{scope}
    
        \node at (.505\textwidth,1) {\Large$\Leftrightarrow$};
    
        \begin{scope}[xshift=.66\textwidth]
            \draw[ultra thick] (0,0) -- (0,2);
        \end{scope}
    \end{tikzpicture}
    \caption{The Reidemeister Moves}
\end{figure}
\end{document}

Also, minipages do work, at least for the overall placement, you just cannot leave empty lines between them:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{knots}

\begin{document}
    \begin{figure}[!h]
        \centering
        \begin{minipage}{.32\textwidth}
            \begin{tikzpicture}
                \begin{knot}[clip width=10, clip radius=15pt, consider self intersections, end tolerance=3pt]
                    \strand[ultra thick] 
                    (0,0) to[out=up, in=down] (0,0.7) 
                    to[out=up, in=left] (0.5,1.5)
                    to[out=right, in=up]  (1,1)
                    to[out=down, in=right]  (0.5,0.5)
                    to[out=left, in=down]  (0,1.3)
                    to[out=up, in=down]  (0,2);
                \end{knot}
            \end{tikzpicture}
        \end{minipage}
        \begin{minipage}{.32\textwidth}
            \begin{tikzpicture}
                \begin{knot}[clip width=10, clip radius=15pt, consider self intersections, end tolerance=3pt]
                    \strand[ultra thick] 
                    (0,0) to[out=down, in=up] (0,0.7) 
                    to[out=up, in=right] (-0.5,1.5)
                    to[out=left, in=up]  (-1,1)
                    to[out=down, in=left]  (-0.5,0.5)
                    to[out=right, in=down]  (0,1.3)
                    to[out=down, in=up]  (0,2);
                \end{knot}
            \end{tikzpicture}
        \end{minipage}
        \begin{minipage}{.32\textwidth}
            \begin{tikzpicture}
                \draw[ultra thick] (0,0) -- (0,-2);
            \end{tikzpicture}
        \end{minipage}
    \caption{The Reidemeister Moves}
\end{figure}
\end{document}

You must log in to answer this question.

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