1

I want to use the Braids package and add to some of its drawings the evaluation or coevaluation maps (I work in a rigid category) Here is my MWE so far

    \documentclass{amsart}
    
    \usepackage{lmodern}
    \usepackage[T1]{fontenc}
    
    \batchmode
    \usepackage{tikz}
    \usetikzlibrary{calc, positioning, braids}
    \errorstopmode
    
    \begin{document}
    
    
    
    \centering    
    \def\nstrands{3}
    \begin{tikzpicture}
            \pic[local bounding box=my braid, braid/.cd, 
            number of strands = \nstrands, % number of  strands
            thick,
            name prefix=braid]
            {braid={s_2, s_1, s_2}}; %the generators
            \draw[thick] % draws the top/bottom bars
            ([xshift=-1ex]my braid.north west) --  ([xshift=1ex]my braid.north east)
            ([xshift=-1ex]my braid.south west) --  ([xshift=1ex]my braid.south east);
            %([xshift=1ex, yshift=4ex]my braid.north east) --;
            % labels the top bar
            \foreach \n in {1,...,\nstrands}{
                \node at (braid-\n-s)[yshift = 0.3cm] {\n};
            } 
            % labels the bottom bar
            \foreach \n in {1,...,\nstrands}{
                \node at (braid-\n-e)[yshift = -0.3cm] {\n};
            } 
    \end{tikzpicture}
    
    \end{document}

What I precisely want is to replace the bottom right crossing between braids 1 and 2 by a figure like $\bigcup$ (coevaluation map), or to replace the top right crossing between braid 2 and 3 with a figure like $\bigcap$. Is it possible?

Edit Here is a little image to show that what I want is to be able to replace some crossings with $\bigcup$ or $\bigcap$ shapes

enter image description here

2
  • 1
    My recommendation would be to draw the braid and then to put the symbol over the top with an opaque background. There are plenty of coordinates that can be used all over the braid. In particular, there's a coordinate on each strand as it enters each crossing and as it leaves. Using the calc library, you can put something half way in between these which would be on top of the crossing. Jan 14, 2021 at 17:50
  • @AndrewStacey Your advice is very clear but I am afraid I will not be able to implement it. Can you give a very simple example?
    – brunoh
    Jan 14, 2021 at 19:05

1 Answer 1

2

Does this look like what you want?

Braid with annotations at the crossings

\documentclass{amsart}
% \url{https://tex.stackexchange.com/q/578846/86}
    
    \usepackage{lmodern}
    \usepackage[T1]{fontenc}
    
    \batchmode
    \usepackage{tikz}
    \usetikzlibrary{calc, positioning, braids}
    \errorstopmode
    
    \begin{document}
    
    
    
    \centering    
    \def\nstrands{3}
    \begin{tikzpicture}
            \pic[local bounding box=my braid, braid/.cd, 
            number of strands = \nstrands, % number of  strands
            thick,
            name prefix=braid]
            {braid={s_2, s_1, s_2}}; %the generators
            \draw[thick] % draws the top/bottom bars
            ([xshift=-1ex]my braid.north west) --  ([xshift=1ex]my braid.north east)
            ([xshift=-1ex]my braid.south west) --  ([xshift=1ex]my braid.south east);
            %([xshift=1ex, yshift=4ex]my braid.north east) --;
            % labels the top bar
            \foreach \n in {1,...,\nstrands}{
                \node at (braid-\n-s)[yshift = 0.3cm] {\n};
            } 
            % labels the bottom bar
            \foreach \n in {1,...,\nstrands}{
                \node at (braid-\n-e)[yshift = -0.3cm] {\n};
            }
            \node[fill=white, circle] at ($(braid-1-2)!.5!(braid-1-3)$) {\(\bigcup\)};
            \node[fill=white, circle] at ($(braid-2-0)!.5!(braid-2-1)$) {\(\bigcap\)};
    \end{tikzpicture}
    
    \end{document}

The coordinates of the form <prefix>-X-Y are located on the strand X between the Yth and Y+1th crossings. Using calc, we can use these to locate the crossing itself since it is exactly half way between these. By filling the node, we effectively erase the crossing itself and replace it with the symbols you want.

3
  • I am so sorry not to have been able to formulate my needs clearly! your answer is exactly what is asked formally in my question but not what I really wanted. My bad! so to show you what I really want I edited my question with a little image
    – brunoh
    Jan 15, 2021 at 9:49
  • @brunoh The braids package is designed solely for drawing braids. It takes advantage of the structure of a braid to work in a methodical fashion to lay out the diagram. Anything more complicated, in particular with strands that reverse direction, won't fit that pattern. Fortunately, there are other packages for drawing more complicated diagrams, such as the knots TikZ library. Jan 15, 2021 at 22:10
  • Ok that’s clear. Sorry for the trouble. I accepted your answer which is formally correct.
    – brunoh
    Jan 16, 2021 at 0:03

You must log in to answer this question.

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