texlive[59838] Master: strands (5jul21)

commits+karl at tug.org commits+karl at tug.org
Mon Jul 5 22:52:31 CEST 2021


Revision: 59838
          http://tug.org/svn/texlive?view=revision&revision=59838
Author:   karl
Date:     2021-07-05 22:52:31 +0200 (Mon, 05 Jul 2021)
Log Message:
-----------
strands (5jul21)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/strands/
    trunk/Master/texmf-dist/doc/latex/strands/README.md
    trunk/Master/texmf-dist/doc/latex/strands/strands.pdf
    trunk/Master/texmf-dist/source/latex/strands/
    trunk/Master/texmf-dist/source/latex/strands/strands.dtx
    trunk/Master/texmf-dist/source/latex/strands/strands.ins
    trunk/Master/texmf-dist/tex/latex/strands/
    trunk/Master/texmf-dist/tex/latex/strands/strands.sty
    trunk/Master/tlpkg/tlpsrc/strands.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/strands/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/strands/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/strands/README.md	2021-07-05 20:52:31 UTC (rev 59838)
@@ -0,0 +1,15 @@
+%
+% Copyright (C) 2021 by Diego Arcis <arcisd at gmail.com>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Diego Arcis.
+%
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/strands/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/strands/strands.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/strands/strands.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/strands/strands.pdf	2021-07-05 20:50:36 UTC (rev 59837)
+++ trunk/Master/texmf-dist/doc/latex/strands/strands.pdf	2021-07-05 20:52:31 UTC (rev 59838)

Property changes on: trunk/Master/texmf-dist/doc/latex/strands/strands.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/strands/strands.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/strands/strands.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/strands/strands.dtx	2021-07-05 20:52:31 UTC (rev 59838)
@@ -0,0 +1,1835 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2021 by Diego Arcis <arcisd at gmail.com>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Diego Arcis.
+%
+% This work consists of the files strands.dtx and strands.ins
+% and the derived filebase strands.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{strands.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{strands}
+%<*package>
+    [<+date+> <+version+> <+description+>]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{strands}[<+date+>]
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+  \DocInput{strands.dtx}
+  \PrintChanges
+  \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{1713}
+%
+% \CharacterTable
+%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%   Digits        \0\1\2\3\4\5\6\7\8\9
+%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%   Dollar        \$     Percent       \%     Ampersand     \&
+%   Acute accent  \'     Left paren    \(     Right paren   \)
+%   Asterisk      \*     Plus          \+     Comma         \,
+%   Minus         \-     Point         \.     Solidus       \/
+%   Colon         \:     Semicolon     \;     Less than     \<
+%   Equals        \=     Greater than  \>     Question mark \?
+%   Commercial at \@     Left bracket  \[     Backslash     \\
+%   Right bracket \]     Circumflex    \^     Underscore    \_
+%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%   Right brace   \}     Tilde         \~}
+%
+%
+% \changes{<+version+>}{<+date+>}{Converted to DTX file}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{strands.dtx}
+% \title{The \textsf{strands} package}
+% \author{Diego Arcis \\ \url{arcisd at gmail.com}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% Put text here.
+%
+% \section{Usage}
+%
+% Put text here.
+%
+%
+% \DescribeMacro{\getelem}
+%
+%
+% \DescribeMacro{\decoratestrands}
+%
+%
+% \DescribeMacro{\vvpartition}
+%
+%
+% \DescribeMacro{\vpartition}
+%
+%
+% \DescribeMacro{\arcpartition}
+%
+%
+% \DescribeMacro{\permutation}
+%
+%
+% \DescribeMacro{\tiedpair}
+%
+%
+% \DescribeMacro{\tie}
+%
+%
+% \DescribeMacro{\bbackstrands}
+%
+%
+% \DescribeMacro{\lleftstrand}
+%
+%
+% \DescribeMacro{\rrightstrand}
+%
+%
+% \DescribeMacro{\ccrossback}
+%
+%
+% \DescribeMacro{\bbraidgen}
+%
+%
+% \DescribeMacro{\ttanglegen}
+%
+%
+% \DescribeMacro{\aaddgen}
+%
+%
+% \DescribeMacro{\sstrands}
+%
+%
+% \DescribeMacro{\strands}
+%
+
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+%    \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{strands}[Diego Arcis 2021/07/05 Strands v1.0]
+%    \end{macrocode}
+% packages:
+%    \begin{macrocode}
+\RequirePackage{forarray}
+\RequirePackage{ifthen}
+\RequirePackage{tikz}
+\RequirePackage{xfp}
+\RequirePackage{xstring}
+\RequirePackage{xkeyval}
+\usetikzlibrary{snakes}
+%    \end{macrocode}
+%
+% \begin{macro}{\getelem}
+%    \begin{macrocode}
+\newcommand{\getelem}[3]{ % \getelem{list}{index}{\name}
+	\StrBetween[#2,\fpeval{#2+1}]{,#1,}{,}{,}[#3]
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% global variables:
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{strands}{backcolor}{}
+\define at cmdkey[str]{strands}{bend}{}
+\define at cmdkey[str]{strands}{bendbraid}{}
+\define at cmdkey[str]{strands}{bendtangle}{}
+\define at cmdkey[str]{strands}{bulletsize}{}
+\define at cmdkey[str]{strands}{braidcross}{}
+\define at cmdkey[str]{strands}{braidsingcross}{}
+\define at cmdkey[str]{strands}{braidvirtcross}{}
+\define at cmdkey[str]{strands}{coverunion}{}
+\define at cmdkey[str]{strands}{direction}{}
+\define at cmdkey[str]{strands}{externalize}{}
+\define at cmdkey[str]{strands}{font}{}
+\define at cmdkey[str]{strands}{gencharposbraid}{}
+\define at cmdkey[str]{strands}{gencharnegbraid}{}
+\define at cmdkey[str]{strands}{gencharvirtual}{}
+\define at cmdkey[str]{strands}{gencharsingular}{}
+\define at cmdkey[str]{strands}{genchartangle}{}
+\define at cmdkey[str]{strands}{genchartie}{}
+\define at cmdkey[str]{strands}{genchartiedtangle}{}
+\define at cmdkey[str]{strands}{genchartrivial}{}
+\define at cmdkey[str]{strands}{height}{}
+\define at cmdkey[str]{strands}{labelver}{}
+\define at cmdkey[str]{strands}{labelhor}{}
+\define at cmdkey[str]{strands}{norma}{}
+\define at cmdkey[str]{strands}{normb}{}
+\define at cmdkey[str]{strands}{normcolor}{}
+\define at cmdkey[str]{strands}{normsymbol}{}
+\define at cmdkey[str]{strands}{nstr}{}
+\define at cmdkey[str]{strands}{num}{}
+\define at cmdkey[str]{strands}{rotate}{}
+\define at cmdkey[str]{strands}{scale}{}
+\define at cmdkey[str]{strands}{strwidth}{}
+\define at cmdkey[str]{strands}{tiebend}{}
+\define at cmdkey[str]{strands}{tiebull}{}
+\define at cmdkey[str]{strands}{tiebullsize}{}
+\define at cmdkey[str]{strands}{tiecolor}{}
+\define at cmdkey[str]{strands}{tieheight}{}
+\define at cmdkey[str]{strands}{tiesnake}{}
+\define at cmdkey[str]{strands}{tiesnakeamp}{}
+\define at cmdkey[str]{strands}{tiesnakends}{}
+\define at cmdkey[str]{strands}{tiesnakelen}{}
+\define at cmdkey[str]{strands}{tiestyle}{}
+\define at cmdkey[str]{strands}{tiewidth}{}
+\define at cmdkey[str]{strands}{timeswidth}{}
+\define at cmdkey[str]{strands}{tkzpic}{}
+\define at cmdkey[str]{strands}{width}{}
+%    \end{macrocode}
+% default options:
+%    \begin{macrocode}
+\presetkeys[str]{strands}{
+	backcolor=white, % color of the paper.
+	bend=45, % bend of partitions.
+	bendbraid=30, % bend for braid crossings.
+	bendtangle=45, % bend for tangles.
+	braidcross=3, % size of the braid crossing.
+	braidsingcross=1.6, % size of the singular braid crossing.
+	braidvirtcross=8, % size of the virtual braid crossing.
+	bulletsize=0.04,
+	coverunion=0.001, % extra length to cover the union of strands.
+	direction=1,
+	externalize=0, % use 1 to transform images to PDF.
+	font=0.7, % size of the fonts for labels.
+	gencharposbraid=p,
+	gencharnegbraid=n,
+	gencharvirtual=v,
+	gencharsingular=s,
+	genchartangle=t,
+	genchartie=e,
+	genchartiedtangle=f,
+	genchartrivial=i,
+	height=1, % to set the height of strands.
+	labelver=0.2,
+	labelhor=0.03,
+	norma=0, % to normalize the height above.
+	normb=0, % to normalize the height below.
+	normcolor=transparent,
+	normsymbol=-,
+	nstr=0, % number of strands.
+	num=0, % number of dots for arc partitions.
+	rotate=0, % to rotate all pictures.
+	scale=1, % to scale all pictures.
+	strwidth=0.7, % to set the width of the strands.
+	tiebend=0, % to set bend of ties.
+	tiebull=0, % bullets for ties.
+	tiebullsize=0.04,
+	tiecolor=red, % to set color of the ties.
+	tieheight=0.5, % height of ties respect to the global height.
+	tiesnake=false,
+	tiesnakeamp=1,
+	tiesnakends=0,
+	tiesnakelen=3,
+	tiestyle=dashed, % to set the type of the tie lines.
+	tiewidth=0.5, % to set the width of tie lines.
+	timeswidth=3,
+	tkzpic=1,
+	width=0.6, % to set the width between strands.
+}{}
+\setkeys[str]{strands}{}
+%    \end{macrocode}
+% declare custom options:
+%    \begin{macrocode}
+\DeclareOptionX{backcolor}{\renewcommand{\cmdstr at strands@backcolor}{#1}}
+\DeclareOptionX{bend}{\renewcommand{\cmdstr at strands@bend}{#1}}
+\DeclareOptionX{bendbraid}{\renewcommand{\cmdstr at strands@bendbraid}{#1}}
+\DeclareOptionX{bendtangle}{\renewcommand{\cmdstr at strands@bendtangle}{#1}}
+\DeclareOptionX{braidcross}{\renewcommand{\cmdstr at strands@braidcross}{#1}}
+\DeclareOptionX{braidsingcross}{\renewcommand{\cmdstr at strands@braidsingcross}{#1}}
+\DeclareOptionX{braidvirtcross}{\renewcommand{\cmdstr at strands@braidvirtcross}{#1}}
+\DeclareOptionX{bulletsize}{\renewcommand{\cmdstr at strands@bulletsize}{#1}}
+\DeclareOptionX{coverunion}{\renewcommand{\cmdstr at strands@coverunion}{#1}}
+\DeclareOptionX{direction}{\renewcommand{\cmdstr at strands@direction}{#1}}
+\DeclareOptionX{externalize}{\renewcommand{\cmdstr at strands@externalize}{#1}}
+\DeclareOptionX{font}{\renewcommand{\cmdstr at strands@font}{#1}}
+\DeclareOptionX{gencharposbraid}{\renewcommand{\cmdstr at strands@gencharposbraid}{#1}}
+\DeclareOptionX{gencharnegbraid}{\renewcommand{\cmdstr at strands@gencharnegbraid}{#1}}
+\DeclareOptionX{gencharvirtual}{\renewcommand{\cmdstr at strands@gencharvirtual}{#1}}
+\DeclareOptionX{gencharsingular}{\renewcommand{\cmdstr at strands@gencharsingular}{#1}}
+\DeclareOptionX{genchartangle}{\renewcommand{\cmdstr at strands@genchartangle}{#1}}
+\DeclareOptionX{genchartie}{\renewcommand{\cmdstr at strands@genchartie}{#1}}
+\DeclareOptionX{genchartiedtangle}{\renewcommand{\cmdstr at strands@genchartiedtangle}{#1}}
+\DeclareOptionX{height}{\renewcommand{\cmdstr at strands@height}{#1}}
+\DeclareOptionX{labelver}{\renewcommand{\cmdstr at strands@labelver}{#1}}
+\DeclareOptionX{labelhor}{\renewcommand{\cmdstr at strands@labelhor}{#1}}
+\DeclareOptionX{norma}{\renewcommand{\cmdstr at strands@norma}{#1}}
+\DeclareOptionX{normb}{\renewcommand{\cmdstr at strands@normb}{#1}}
+\DeclareOptionX{normcolor}{\renewcommand{\cmdstr at strands@normcolor}{#1}}
+\DeclareOptionX{nstr}{\renewcommand{\cmdstr at strands@nstr}{#1}}
+\DeclareOptionX{num}{\renewcommand{\cmdstr at strands@num}{#1}}
+\DeclareOptionX{rotate}{\renewcommand{\cmdstr at strands@rotate}{#1}}
+\DeclareOptionX{scale}{\renewcommand{\cmdstr at strands@scale}{#1}}
+\DeclareOptionX{strwidth}{\renewcommand{\cmdstr at strands@strwidth}{#1}}
+\DeclareOptionX{tiebend}{\renewcommand{\cmdstr at strands@tiebend}{#1}}
+\DeclareOptionX{tiebull}{\renewcommand{\cmdstr at strands@tiebull}{#1}}
+\DeclareOptionX{tiebullsize}{\renewcommand{\cmdstr at strands@tiebullsize}{#1}}
+\DeclareOptionX{tiecolor}{\renewcommand{\cmdstr at strands@tiecolor}{#1}}
+\DeclareOptionX{tiesnake}{\renewcommand{\cmdstr at strands@tiesnake}{#1}}
+\DeclareOptionX{tiestyle}{\renewcommand{\cmdstr at strands@tiestyle}{#1}}
+\DeclareOptionX{tiewidth}{\renewcommand{\cmdstr at strands@tiewidth}{#1}}
+\DeclareOptionX{timeswidth}{\renewcommand{\cmdstr at strands@timeswidth}{#1}}
+\DeclareOptionX{tkzpic}{\renewcommand{\cmdstr at strands@tkzpic}{#1}}
+\DeclareOptionX{width}{\renewcommand{\cmdstr at strands@width}{#1}}
+\DeclareOptionX*{\PackageWarning{strands}{`\CurrentOption' ignored}} % ignore unknown options.
+\ProcessOptionsX\relax
+\ifnum\cmdstr at strands@externalize=1
+	\usetikzlibrary{external}
+	\tikzexternalize[optimize=false,prefix=strpack]
+\fi
+%    \end{macrocode}
+% \decoratestrands - macro to add bullets and labels to picture.
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{decor}{bulla}{}
+\define at cmdkey[str]{decor}{bullb}{}
+\define at cmdkey[str]{decor}{bulletends}{}
+\define at cmdkey[str]{decor}{floor}{}
+\define at cmdkey[str]{decor}{font}{}
+\define at cmdkey[str]{decor}{height}{}
+\define at cmdkey[str]{decor}{labelver}{}
+\define at cmdkey[str]{decor}{labelhor}{}
+\define at cmdkey[str]{decor}{nstr}{}
+\define at cmdkey[str]{decor}{type}{}
+\define at cmdkey[str]{decor}{width}{}
+\presetkeys[str]{decor}{
+	bulla=1,
+	bullb=1,
+	bulletends=\cmdstr at strands@bulletsize,
+	floor=0,
+	font=\cmdstr at strands@font,
+	height=\cmdstr at strands@height,
+	labelver=\cmdstr at strands@labelver,
+	labelhor=\cmdstr at strands@labelhor,
+	nstr=\cmdstr at strands@nstr,
+	type=3,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\decoratestrands}
+%    \begin{macrocode}
+\newcommand{\decoratestrands}[1][]{
+	\setkeys[str]{decor}{#1} % set variables.
+	\foreach\ind in{0,...,\fpeval{\cmdstr at decor@nstr-1}}{
+		\ifnum \cmdstr at decor@bulla=1 % bullets above.
+			\filldraw(\fpeval{\ind*\cmdstr at decor@width},
+			\fpeval{(\cmdstr at decor@floor+1)*\cmdstr at decor@height})circle(\cmdstr at decor@bulletends);
+		\fi
+		\ifnum \cmdstr at decor@bullb=1 % bullets below.
+			\filldraw(\fpeval{\ind*\cmdstr at decor@width},
+			\fpeval{\cmdstr at decor@floor*\cmdstr at decor@height})circle(\cmdstr at decor@bulletends);
+		\fi
+%    \end{macrocode}
+% classic labels.
+%    \begin{macrocode}
+		\ifnum \cmdstr at decor@type<5;
+			\ifnum \cmdstr at decor@type>0 % labels above from 1 to n.
+				\node[scale=\cmdstr at decor@font]at
+					(\fpeval{\ind*\cmdstr at decor@width},
+					\fpeval{(\cmdstr at decor@floor+1)*\cmdstr at decor@height+\cmdstr at decor@labelver})
+					{$\fpeval{\ind+1}$};
+			\fi
+			\node[scale=\cmdstr at decor@font]at
+				(\fpeval{\ind*\cmdstr at decor@width},
+				\fpeval{\cmdstr at decor@floor*\cmdstr at decor@height-\cmdstr at decor@labelver})
+				{$\ifnum\fpeval{(\cmdstr at decor@type+1)*(\cmdstr at decor@type-2)}=0{
+					\fpeval{\ind+1}
+				}\else{\ifnum\fpeval{abs(\cmdstr at decor@type)}=3{
+					\fpeval{\ind+\cmdstr at decor@nstr+1}
+				}\else{\ifnum\fpeval{abs(\cmdstr at decor@type)}=4{
+					\fpeval{\ind+1}'
+				}\fi}\fi}\fi$};
+		\fi
+%    \end{macrocode}
+% signed labels (n must be even).
+%    \begin{macrocode}
+		\ifnum \cmdstr at decor@type=5
+			\ifnum\ind<\fpeval{\cmdstr at decor@nstr/2} % labels from -2n to 2n.
+				\node[scale=\cmdstr at decor@font]at
+					(\fpeval{(\ind+\cmdstr at decor@nstr/2)*\cmdstr at decor@width},
+					\fpeval{(\cmdstr at decor@floor+1)*\cmdstr at decor@height+\cmdstr at decor@labelver})
+					{$\fpeval{\ind+1}$};
+				\node[scale=\cmdstr at decor@font]at
+					(\fpeval{\ind*\cmdstr at decor@width-\cmdstr at decor@labelhor},
+					\fpeval{(\cmdstr at decor@floor+1)*\cmdstr at decor@height+\cmdstr at decor@labelver})
+					{-$\fpeval{\cmdstr at decor@nstr/2-\ind}$};
+				\node[scale=\cmdstr at decor@font]at
+					(\fpeval{(\ind+\cmdstr at decor@nstr/2)*\cmdstr at decor@width},
+					\fpeval{\cmdstr at decor@floor*\cmdstr at decor@height-\cmdstr at decor@labelver})
+					{$\fpeval{\ind+\cmdstr at decor@nstr/2+1}$};
+				\node[scale=\cmdstr at decor@font]at
+					(\fpeval{\ind*\cmdstr at decor@width-\cmdstr at decor@labelhor},
+					\fpeval{\cmdstr at decor@floor*\cmdstr at decor@height-\cmdstr at decor@labelver})
+					{-$\fpeval{\cmdstr at decor@nstr-\ind}$};
+			\fi
+		\fi
+	}
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \vpartition  - macro to draw set partitions in the partition monoid.
+%
+% Example: the set partition {1,2}{3,-4}{4,-3} of [2*4] is drawn as follows: 
+%
+% \vpartition[<options>]{{1,2},{3,-4},{4,-3}}
+%
+%  1   2   3   4
+%  |   |   |   |
+%  -----    - -
+%            -
+%           - -
+%          |   |
+%  5   6   7   8
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{vvpart}{bend}{}
+\define at cmdkey[str]{vvpart}{bulla}{}
+\define at cmdkey[str]{vvpart}{bullb}{}
+\define at cmdkey[str]{vvpart}{bulletends}{}
+\define at cmdkey[str]{vvpart}{floor}{}
+\define at cmdkey[str]{vvpart}{font}{}
+\define at cmdkey[str]{vvpart}{height}{}
+\define at cmdkey[str]{vvpart}{labelver}{}
+\define at cmdkey[str]{vvpart}{labelhor}{}
+\define at cmdkey[str]{vvpart}{norma}{}
+\define at cmdkey[str]{vvpart}{normb}{}
+\define at cmdkey[str]{vvpart}{nstr}{}
+\define at cmdkey[str]{vvpart}{permut}{}
+\define at cmdkey[str]{vvpart}{reflect}{}
+\define at cmdkey[str]{vvpart}{strwidth}{}
+\define at cmdkey[str]{vvpart}{type}{}
+\define at cmdkey[str]{vvpart}{width}{}
+\presetkeys[str]{vvpart}{
+	bend=\cmdstr at strands@bend,
+	bulla=1,
+	bullb=1,
+	bulletends=\cmdstr at strands@bulletsize,
+	floor=0,
+	font=\cmdstr at strands@font,
+	height=\cmdstr at strands@height,
+	labelver=\cmdstr at strands@labelver,
+	labelhor=\cmdstr at strands@labelhor,
+	norma=\cmdstr at strands@norma,
+	normb=\cmdstr at strands@normb,
+	nstr=\cmdstr at strands@nstr,
+	permut=0, % use 1 to draw permutations (to use with \permutation).
+	reflect=0,
+	strwidth=\cmdstr at strands@strwidth,
+	type=3,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\vvpartition}
+%    \begin{macrocode}
+\newcommand{\vvpartition}[2][]{
+	\setkeys[str]{vvpart}{#1} % set variables.
+%    \end{macrocode}
+% normalize vertical size.
+%    \begin{macrocode}
+	\node[\cmdstr at strands@normcolor]at(0,\cmdstr at vvpart@norma){\cmdstr at strands@normsymbol};
+	\node[\cmdstr at strands@normcolor]at(0,\cmdstr at vvpart@normb){\cmdstr at strands@normsymbol};
+%    \end{macrocode}
+% number of strands.
+%    \begin{macrocode}
+	\StrRemoveBraces{#2}[\nobracespart]
+	\let\oldnumstrands\cmdstr at vvpart@nstr
+	\renewcommand{\cmdstr at vvpart@nstr}
+	{\fpeval{max(abs(min(\nobracespart)),abs(max(\nobracespart)),\fpeval{abs(\oldnumstrands)})}}
+%    \end{macrocode}
+% bullets and labels.
+%    \begin{macrocode}
+	\decoratestrands[
+		bulla=\cmdstr at vvpart@bulla,
+		bullb=\cmdstr at vvpart@bullb,
+		bulletends=\cmdstr at vvpart@bulletends,
+		floor=\cmdstr at vvpart@floor,
+		font=\cmdstr at vvpart@font,
+		height=\cmdstr at vvpart@height,
+		labelver=\cmdstr at vvpart@labelver,
+		labelhor=\cmdstr at vvpart@labelhor,
+		nstr=\cmdstr at vvpart@nstr,
+		type=\cmdstr at vvpart@type,
+		width=\cmdstr at vvpart@width
+	]
+%    \end{macrocode}
+% connections: permutation case.
+%    \begin{macrocode}
+	\foreach\ind in{0,...,\fpeval{\cmdstr at vvpart@nstr-1}}{
+		\ifnum\cmdstr at vvpart@permut=1
+			\getelem{#2}{\fpeval{\ind+1}}{\index} 
+			\draw[line width=\cmdstr at vvpart@strwidth](\fpeval{\ind*\cmdstr at vvpart@width},
+				\fpeval{\cmdstr at vvpart@height+\cmdstr at vvpart@floor*\cmdstr at vvpart@height})to
+				(\fpeval{(\ifnum\fpeval{\index+0}>0 \index\else\fpeval{\ind+1}\fi-1)*
+				\cmdstr at vvpart@width},\cmdstr at vvpart@floor*\cmdstr at vvpart@height);
+		\fi
+	}
+%    \end{macrocode}
+% connections: general case.
+%    \begin{macrocode}
+	\ifnum\cmdstr at vvpart@permut=0 \foreach\block in{#2}{
+		\StrCount{\block}{,}[\numcom]
+		\ifnum\numcom>0\foreach\ind in {2,...,\fpeval{\numcom+1}}{
+			\getelem{\block}{\fpeval{\ind-1}}{\firbul}
+			\getelem{\block}{\ind}{\secbul}
+			\ifnum \cmdstr at vvpart@reflect=1 % reflect connections vertically.
+				\let\oldfirbul\firbul
+				\renewcommand{\firbul}{-\oldfirbul}
+				\let\oldsecbul\secbul
+				\renewcommand{\secbul}{-\oldsecbul}
+			\fi
+			\draw[line width=\cmdstr at vvpart@strwidth]
+%    \end{macrocode}
+% from.
+%    \begin{macrocode}
+				(\fpeval{(abs(\firbul)-1)*\cmdstr at vvpart@width},
+					\ifnum\firbul>0 
+						\fpeval{(\cmdstr at vvpart@floor+1)*\cmdstr at vvpart@height}
+					\else
+						\fpeval{\cmdstr at vvpart@floor*\cmdstr at vvpart@height}
+					\fi
+				)
+%    \end{macrocode}
+% bending.
+%    \begin{macrocode}
+					to[bend right=\ifnum \fpeval{\firbul*\secbul}>0
+						\fpeval{(\firbul/abs(\firbul))*((abs(\secbul)-abs(\firbul))/
+						abs(abs(\secbul)-abs(\firbul)))*\cmdstr at vvpart@bend}
+					\else
+						0
+					\fi]
+%    \end{macrocode}
+% to.
+%    \begin{macrocode}
+				(\fpeval{(abs(\secbul)-1)*\cmdstr at vvpart@width},
+					\ifnum\secbul>0
+						\fpeval{(\cmdstr at vvpart@floor+1)*\cmdstr at vvpart@height}
+					\else
+						\fpeval{\cmdstr at vvpart@floor*\cmdstr at vvpart@height}
+					\fi
+				);
+		}\fi
+	}\fi
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{vpart}{bend}{}
+\define at cmdkey[str]{vpart}{bulla}{}
+\define at cmdkey[str]{vpart}{bullb}{}
+\define at cmdkey[str]{vpart}{bulletends}{}
+\define at cmdkey[str]{vpart}{floor}{}
+\define at cmdkey[str]{vpart}{font}{}
+\define at cmdkey[str]{vpart}{height}{}
+\define at cmdkey[str]{vpart}{labelver}{}
+\define at cmdkey[str]{vpart}{labelhor}{}
+\define at cmdkey[str]{vpart}{norma}{}
+\define at cmdkey[str]{vpart}{normb}{}
+\define at cmdkey[str]{vpart}{nstr}{}
+\define at cmdkey[str]{vpart}{permut}{}
+\define at cmdkey[str]{vpart}{reflect}{}
+\define at cmdkey[str]{vpart}{rotate}{}
+\define at cmdkey[str]{vpart}{scale}{}
+\define at cmdkey[str]{vpart}{strwidth}{}
+\define at cmdkey[str]{vpart}{tkzpic}{}
+\define at cmdkey[str]{vpart}{type}{}
+\define at cmdkey[str]{vpart}{width}{}
+\presetkeys[str]{vpart}{
+	bend=\cmdstr at strands@bend,
+	bulla=1,
+	bullb=1,
+	bulletends=\cmdstr at strands@bulletsize,
+	floor=0,
+	font=\cmdstr at strands@font,
+	height=\cmdstr at strands@height,
+	labelver=\cmdstr at strands@labelver,
+	labelhor=\cmdstr at strands@labelhor,
+	norma=\cmdstr at strands@norma,
+	normb=\cmdstr at strands@normb,
+	nstr=\cmdstr at strands@nstr,
+	permut=0, % use 1 to draw permutations (to use with \permutation).
+	reflect=0,
+	rotate=\cmdstr at strands@rotate,
+	scale=\cmdstr at strands@scale,
+	strwidth=\cmdstr at strands@strwidth,
+	tkzpic=\cmdstr at strands@tkzpic,
+	type=3,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\vpartition}
+%    \begin{macrocode}
+\newcommand{\vpartition}[2][]{
+	\setkeys[str]{vpart}{#1} % set variables.
+	\ifthenelse{\equal{\cmdstr at vpart@tkzpic}{1}}{
+		\begin{tikzpicture}[rotate=\cmdstr at vpart@rotate,scale=\cmdstr at vpart@scale]
+			\vvpartition[
+				bend=\cmdstr at vpart@bend,
+				bulla=\cmdstr at vpart@bulla,
+				bullb=\cmdstr at vpart@bullb,
+				bulletends=\cmdstr at vpart@bulletends,
+				floor=\cmdstr at vpart@floor,
+				font=\cmdstr at vpart@font,
+				height=\cmdstr at vpart@height,
+				labelver=\cmdstr at vpart@labelver,
+				labelhor=\cmdstr at vpart@labelhor,
+				norma=\cmdstr at vpart@norma,
+				normb=\cmdstr at vpart@normb,
+				nstr=\cmdstr at vpart@nstr,
+				permut=\cmdstr at vpart@permut,
+				reflect=\cmdstr at vpart@reflect,
+				strwidth=\cmdstr at vpart@strwidth,
+				type=\cmdstr at vpart@type,
+				width=\cmdstr at vpart@width
+			]{#2}
+		\end{tikzpicture}
+	}{
+		\vvpartition[
+			bend=\cmdstr at vpart@bend,
+			bulla=\cmdstr at vpart@bulla,
+			bullb=\cmdstr at vpart@bullb,
+			bulletends=\cmdstr at vpart@bulletends,
+			floor=\cmdstr at vpart@floor,
+			font=\cmdstr at vpart@font,
+			height=\cmdstr at vpart@height,
+			labelver=\cmdstr at vpart@labelver,
+			labelhor=\cmdstr at vpart@labelhor,
+			norma=\cmdstr at vpart@norma,
+			normb=\cmdstr at vpart@normb,
+			nstr=\cmdstr at vpart@nstr,
+			permut=\cmdstr at vpart@permut,
+			reflect=\cmdstr at vpart@reflect,
+			strwidth=\cmdstr at vpart@strwidth,
+			type=\cmdstr at vpart@type,
+			width=\cmdstr at vpart@width
+		]{#2}
+	}
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \arcpartition  - macro to draw set partitions via arcs.
+%
+% Example: the set partition {1,4}{2,3,7} of [7] is drawn as follows: 
+%
+% \arcpartition[<options>]{{1,4},{2,3,7}}
+%
+%          -----------------
+%          |               |
+%  -------------           |
+%  |       |   |           |
+%  |   -----   |           |
+%  |   |   |   |           |
+%  1   2   3   4   5   6   7
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{apart}{bend}{}
+\define at cmdkey[str]{apart}{bull}{}
+\define at cmdkey[str]{apart}{bulletsize}{}
+\define at cmdkey[str]{apart}{floor}{}
+\define at cmdkey[str]{apart}{font}{}
+\define at cmdkey[str]{apart}{labelver}{}
+\define at cmdkey[str]{apart}{labelhor}{}
+\define at cmdkey[str]{apart}{norma}{}
+\define at cmdkey[str]{apart}{normb}{}
+\define at cmdkey[str]{apart}{num}{}
+\define at cmdkey[str]{apart}{rotate}{}
+\define at cmdkey[str]{apart}{scale}{}
+\define at cmdkey[str]{apart}{strwidth}{}
+\define at cmdkey[str]{apart}{tkzpic}{}
+\define at cmdkey[str]{apart}{type}{}
+\define at cmdkey[str]{apart}{width}{}
+\presetkeys[str]{apart}{
+	bend=\cmdstr at strands@bend,
+	bull=1,
+	bulletsize=\cmdstr at strands@bulletsize,
+	floor=0,
+	font=\cmdstr at strands@font,
+	labelver=\cmdstr at strands@labelver,
+	labelhor=\cmdstr at strands@labelhor,
+	norma=\cmdstr at strands@norma,
+	normb=\cmdstr at strands@normb,
+	num=\cmdstr at strands@num,
+	rotate=\cmdstr at strands@rotate,
+	scale=\cmdstr at strands@scale,
+	strwidth=\cmdstr at strands@strwidth,
+	tkzpic=\cmdstr at strands@tkzpic,
+	type=1,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\arcpartition}
+%    \begin{macrocode}
+\newcommand{\arcpartition}[2][]{
+	\setkeys[str]{apart}{#1}
+	\vpartition[
+		bend=\cmdstr at apart@bend,
+		bulla=0, % no bullets above.
+		bullb=\cmdstr at apart@bull,
+		bulletends=\cmdstr at apart@bulletsize,
+		floor=\cmdstr at apart@floor,
+		font=\cmdstr at apart@font,
+		labelver=\cmdstr at apart@labelver,
+		labelhor=\cmdstr at apart@labelhor,
+		norma=\cmdstr at apart@norma,
+		normb=\cmdstr at apart@normb,
+		nstr=\cmdstr at apart@num,
+		reflect=1, % put connections below.
+		rotate=\cmdstr at apart@rotate,
+		scale=\cmdstr at apart@scale,
+		strwidth=\cmdstr at apart@strwidth,
+		tkzpic=\cmdstr at apart@tkzpic,
+		type=-\cmdstr at apart@type,
+		width=\cmdstr at apart@width
+	]{#2}
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \permutation  - macro to draw permutations by lines.
+%
+% Example: the permutation 2134 of [4] is drawn as follows: 
+%
+% \permutation[<options>]{2,1,3,4}
+%
+%  1   2   3   4
+%  |   |   |   |
+%   - -    |   |
+%    -     |   |
+%   - -    |   |
+%  |   |   |   |
+%  1   2   3   4
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{perm}{bulla}{}
+\define at cmdkey[str]{perm}{bullb}{}
+\define at cmdkey[str]{perm}{bulletends}{}
+\define at cmdkey[str]{perm}{floor}{}
+\define at cmdkey[str]{perm}{font}{}
+\define at cmdkey[str]{perm}{height}{}
+\define at cmdkey[str]{perm}{labelver}{}
+\define at cmdkey[str]{perm}{labelhor}{}
+\define at cmdkey[str]{perm}{norma}{}
+\define at cmdkey[str]{perm}{normb}{}
+\define at cmdkey[str]{perm}{nstr}{}
+\define at cmdkey[str]{perm}{rotate}{}
+\define at cmdkey[str]{perm}{scale}{}
+\define at cmdkey[str]{perm}{strwidth}{}
+\define at cmdkey[str]{perm}{tkzpic}{}
+\define at cmdkey[str]{perm}{type}{}
+\define at cmdkey[str]{perm}{width}{}
+\presetkeys[str]{perm}{
+	bulla=1,
+	bullb=1,
+	bulletends=\cmdstr at strands@bulletsize,
+	floor=0,
+	font=\cmdstr at strands@font,
+	height=\cmdstr at strands@height,
+	labelver=\cmdstr at strands@labelver,
+	labelhor=\cmdstr at strands@labelhor,
+	norma=\cmdstr at strands@norma,
+	normb=\cmdstr at strands@normb,
+	nstr=\cmdstr at strands@nstr,
+	rotate=\cmdstr at strands@rotate,
+	scale=\cmdstr at strands@scale,
+	strwidth=\cmdstr at strands@strwidth,
+	tkzpic=\cmdstr at strands@tkzpic,
+	type=2,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\permutation}
+%    \begin{macrocode}
+\newcommand{\permutation}[2][]{
+	\setkeys[str]{perm}{#1}
+	\vpartition[
+		bulla=\cmdstr at perm@bulla,
+		bullb=\cmdstr at perm@bullb,
+		bulletends=\cmdstr at perm@bulletends,
+		floor=\cmdstr at perm@floor,
+		font=\cmdstr at perm@font,
+		height=\cmdstr at perm@height,
+		labelver=\cmdstr at perm@labelver,
+		labelhor=\cmdstr at perm@labelhor,
+		norma=\cmdstr at perm@norma,
+		normb=\cmdstr at perm@normb,
+		nstr=\cmdstr at perm@nstr,
+		permut=1, % permutation.
+		rotate=\cmdstr at perm@rotate,
+		scale=\cmdstr at perm@scale,
+		strwidth=\cmdstr at perm@strwidth,
+		tkzpic=\cmdstr at perm@tkzpic,
+		type=\cmdstr at perm@type,
+		width=\cmdstr at perm@width
+	]{#2}
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \tiedpair - macro to draw a tied permutation as a pair.
+%
+% Example: the permutation ({2,4},2134) of [4] is drawn as follows:
+%
+% \tiedpair[<options>]{{2,4}}{2,1,3,4}
+%
+%      2       4
+%      ---------
+%  1   |   3   |
+%  |   |   |   |
+%   - -    |   |
+%    -     |   |
+%   - -    |   |
+%  |   |   |   |
+%  1   2   3   4
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{tpair}{above}{}
+\define at cmdkey[str]{tpair}{bend}{}
+\define at cmdkey[str]{tpair}{bulla}{}
+\define at cmdkey[str]{tpair}{bullb}{}
+\define at cmdkey[str]{tpair}{bulletends}{}
+\define at cmdkey[str]{tpair}{floor}{}
+\define at cmdkey[str]{tpair}{font}{}
+\define at cmdkey[str]{tpair}{height}{}
+\define at cmdkey[str]{tpair}{labelver}{}
+\define at cmdkey[str]{tpair}{labelhor}{}
+\define at cmdkey[str]{tpair}{norma}{}
+\define at cmdkey[str]{tpair}{normb}{}
+\define at cmdkey[str]{tpair}{nstr}{}
+\define at cmdkey[str]{tpair}{rotate}{}
+\define at cmdkey[str]{tpair}{scale}{}
+\define at cmdkey[str]{tpair}{strwidth}{}
+\define at cmdkey[str]{tpair}{tkzpic}{}
+\define at cmdkey[str]{tpair}{type}{}
+\define at cmdkey[str]{tpair}{width}{}
+\presetkeys[str]{tpair}{
+	above=1,
+	bend=\cmdstr at strands@bend,
+	bulla=1,
+	bullb=1,
+	bulletends=\cmdstr at strands@bulletsize,
+	floor=0,
+	font=\cmdstr at strands@font,
+	height=\cmdstr at strands@height,
+	labelver=\cmdstr at strands@labelver,
+	labelhor=\cmdstr at strands@labelhor,
+	norma=\cmdstr at strands@norma,
+	normb=\cmdstr at strands@normb,
+	nstr=\cmdstr at strands@nstr,
+	rotate=\cmdstr at strands@rotate,
+	scale=\cmdstr at strands@scale,
+	strwidth=\cmdstr at strands@strwidth,
+	tkzpic=\cmdstr at strands@tkzpic,
+	type=-1,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\tiedpair}
+%    \begin{macrocode}
+\newcommand{\tiedpair}[3][]{
+	\setkeys[str]{tpair}{#1}
+	\ifthenelse{\equal{\cmdstr at tpair@tkzpic}{1}}{
+		\begin{tikzpicture}[rotate=\cmdstr at tpair@rotate,scale=\cmdstr at tpair@scale]
+			\permutation[
+				bulla=\cmdstr at tpair@bulla,
+				bullb=\cmdstr at tpair@bullb,
+				bulletends=\cmdstr at tpair@bulletends,
+				floor=\cmdstr at tpair@floor,
+				font=\cmdstr at tpair@font,
+				height=\cmdstr at tpair@height,
+				labelver=\cmdstr at tpair@labelver,
+				labelhor=\cmdstr at tpair@labelhor,
+				norma=\cmdstr at tpair@norma,
+				normb=\cmdstr at tpair@normb,
+				nstr=\cmdstr at tpair@nstr,
+				strwidth=\cmdstr at tpair@strwidth,
+				tkzpic=0,
+				type=\cmdstr at tpair@type,
+				width=\cmdstr at tpair@width
+			]{#2}
+			\arcpartition[
+				bend=\cmdstr at tpair@bend,
+				bull=0, % no bullets.
+				bulletsize=\cmdstr at tpair@bulletsize,
+				floor=\fpeval{\cmdstr at tpair@floor+\cmdstr at tpair@above*\cmdstr at tpair@height},
+				tkzpic=0,
+				type=0, % no labels.
+				strwidth=\cmdstr at tpair@strwidth,
+				width=\cmdstr at tpair@width
+			]{#3}
+		\end{tikzpicture}
+	}{
+		\permutation[
+			bulla=\cmdstr at tpair@bulla,
+			bullb=\cmdstr at tpair@bullb,
+			bulletends=\cmdstr at tpair@bulletends,
+			floor=\cmdstr at tpair@floor,
+			font=\cmdstr at tpair@font,
+			height=\cmdstr at tpair@height,
+			labelver=\cmdstr at tpair@labelver,
+			labelhor=\cmdstr at tpair@labelhor,
+			norma=\cmdstr at tpair@norma,
+			normb=\cmdstr at tpair@normb,
+			nstr=\cmdstr at tpair@nstr,
+			strwidth=\cmdstr at tpair@strwidth,
+			tkzpic=0,
+			type=\cmdstr at tpair@type,
+			width=\cmdstr at tpair@width
+		]{#2}
+		\arcpartition[
+			bend=\cmdstr at tpair@bend,
+			bull=0, % no bullets.
+			floor=\fpeval{\cmdstr at tpair@floor+\cmdstr at tpair@above*\cmdstr at tpair@height},
+			tkzpic=0,
+			type=0, % no labels.
+			strwidth=\cmdstr at tpair@strwidth,
+			width=\cmdstr at tpair@width
+		]{#3}
+	}
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \tie  - macro to draw a tie.
+%
+% \begin{tikzpicture} \tie[height=1.5]{{1,0.8},{3,0.7},{4,0.8}} \end{tikzpicture}
+% \begin{tikzpicture} \tie[height=1.5]{1,2,5} \end{tikzpicture}
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{tie}{bend}{}
+\define at cmdkey[str]{tie}{bull}{}
+\define at cmdkey[str]{tie}{bulletie}{}
+\define at cmdkey[str]{tie}{floor}{}
+\define at cmdkey[str]{tie}{height}{}
+\define at cmdkey[str]{tie}{color}{}
+\define at cmdkey[str]{tie}{snake}{}
+\define at cmdkey[str]{tie}{snakeamp}{}
+\define at cmdkey[str]{tie}{snakends}{}
+\define at cmdkey[str]{tie}{snakelen}{}
+\define at cmdkey[str]{tie}{style}{}
+\define at cmdkey[str]{tie}{tieheight}{}
+\define at cmdkey[str]{tie}{tiewidth}{}
+\define at cmdkey[str]{tie}{width}{}
+\presetkeys[str]{tie}{
+	bend=\cmdstr at strands@tiebend, % bend of the ties.
+	bull=1, % use 1 to use bullets, 0 otherwise.
+	bulletie=\cmdstr at strands@bulletsize,
+	color=\cmdstr at strands@tiecolor, % color of the ties.
+	floor=0, % the picture starts at floor*height.
+	height=\cmdstr at strands@height, % height of the strands.
+	snake=\cmdstr at strands@tiesnake, % true or false to snake the tie line.
+	snakeamp=\cmdstr at strands@tiesnakeamp, % snake amplitude.
+	snakends=\cmdstr at strands@tiesnakends, % snake lengths of ends.
+	snakelen=\cmdstr at strands@tiesnakelen, % snake lengths.
+	style=\cmdstr at strands@tiestyle, % type of the tie (solid, dashed, dotted, etc).
+	tieheight=\cmdstr at strands@tieheight, % height of the tie respect to the global height.
+	tiewidth=\cmdstr at strands@tiewidth, % width of the tie line.
+	width=\cmdstr at strands@width % width between strands.
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\tie}
+%    \begin{macrocode}
+\newcommand{\tie}[2][]{
+	\setkeys[str]{tie}{#1}
+	\foreach\elem[count=\ind]in{#2}{
+		\StrRemoveBraces{\elem}[\nobrace]
+		\getelem{\nobrace}{1}{\elemwidth} % get width of elem.
+		\getelem{\nobrace}{2}{\elemheight} % get height of elem.
+		\StrCount{\nobrace}{,}[\elemcoms]
+		\ifnum\elemcoms=0 \renewcommand{\elemheight}{\cmdstr at tie@tieheight}\fi % update height of elem.
+		\ifnum \cmdstr at tie@bull=1
+			\filldraw[\cmdstr at tie@color](\fpeval{(\elemwidth-1)*\cmdstr at tie@width},
+				\fpeval{\elemheight*\cmdstr at tie@height+\cmdstr at tie@floor*\cmdstr at tie@height})
+				circle(\cmdstr at tie@bulletie);
+		\fi
+		\ifnum\ind>1
+			\getelem{#2}{\fpeval{\ind-1}}{\prevelem}
+			\StrRemoveBraces{\prevelem}[\prevnobrace]
+			\getelem{\prevnobrace}{1}{\prevelemwidth}
+			\getelem{\prevnobrace}{2}{\prevelemheight}
+			\StrCount{\prevnobrace}{,}[\prevelemcoms]
+			\ifnum\prevelemcoms=0 \renewcommand{\prevelemheight}{\cmdstr at tie@tieheight}\fi
+			\draw[
+				bend right=\cmdstr at tie@bend,
+				color=\cmdstr at tie@color,
+				line width=\cmdstr at tie@tiewidth,
+				decorate=\cmdstr at tie@snake,
+				decoration={
+					snake,
+					amplitude=\cmdstr at tie@snakeamp,
+					post length=\cmdstr at tie@snakends,
+					pre length=\cmdstr at tie@snakends,
+					segment length=\cmdstr at tie@snakelen
+				},
+				style=\cmdstr at tie@style
+			]
+				(\fpeval{(\elemwidth-1)*\cmdstr at tie@width},
+				\fpeval{\elemheight*\cmdstr at tie@height+\cmdstr at tie@floor*\cmdstr at tie@height})to
+				(\fpeval{(\prevelemwidth-1)*\cmdstr at tie@width},
+				\fpeval{\prevelemheight*\cmdstr at tie@height+\cmdstr at tie@floor*\cmdstr at tie@height});
+		\fi
+	}
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \bbackstrands - macro to draws a trivial two-strands-braid of double strand width.
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{bbackstr}{cdnx}{}
+\define at cmdkey[str]{bbackstr}{cdny}{}
+\define at cmdkey[str]{bbackstr}{color}{}
+\define at cmdkey[str]{bbackstr}{height}{}
+\define at cmdkey[str]{bbackstr}{strwidth}{}
+\define at cmdkey[str]{bbackstr}{timeswidth}{}
+\define at cmdkey[str]{bbackstr}{width}{}
+\presetkeys[str]{bbackstr}{
+	cdnx=nothing,
+	cdny=nothing,
+	height=\cmdstr at strands@height,
+	strwidth=\cmdstr at strands@strwidth,
+	timeswidth=\cmdstr at strands@timeswidth, % times the width of the back line is bigger.
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\bbackstrands}
+%    \begin{macrocode}
+\newcommand{\bbackstrands}[1][]{ % 
+	\setkeys[str]{bbackstr}{#1}
+	\draw[
+		color=\cmdstr at strands@backcolor,
+		line width=\fpeval{\cmdstr at bbackstr@timeswidth*\cmdstr at bbackstr@strwidth}pt
+	](\cmdstr at bbackstr@cdnx,\cmdstr at bbackstr@cdny)
+	to(\cmdstr at bbackstr@cdnx,\fpeval{\cmdstr at bbackstr@cdny-\cmdstr at bbackstr@height});
+	\draw[
+		color=\cmdstr at strands@backcolor,
+		line width=\fpeval{\cmdstr at bbackstr@timeswidth*\cmdstr at bbackstr@strwidth}pt
+	](\fpeval{\cmdstr at bbackstr@cdnx+\cmdstr at bbackstr@width},\cmdstr at bbackstr@cdny)
+	to(\fpeval{\cmdstr at bbackstr@cdnx+\cmdstr at bbackstr@width},
+		\fpeval{\cmdstr at bbackstr@cdny-\cmdstr at bbackstr@height});
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \lleftstrand - macro to draws a strand starting from the left.
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{lleftstr}{bend}{}
+\define at cmdkey[str]{lleftstr}{cdnx}{}
+\define at cmdkey[str]{lleftstr}{cdny}{}
+\define at cmdkey[str]{lleftstr}{color}{}
+\define at cmdkey[str]{lleftstr}{height}{}
+\define at cmdkey[str]{lleftstr}{strwidth}{}
+\define at cmdkey[str]{lleftstr}{width}{}
+\presetkeys[str]{lleftstr}{
+	bend=\cmdstr at strands@bendbraid,
+	cdnx=nothing,
+	cdny=nothing,
+	color=black,
+	height=\cmdstr at strands@height,
+	strwidth=\cmdstr at strands@strwidth,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\lleftstrand}
+%    \begin{macrocode}
+\newcommand{\lleftstrand}[1][]{
+	\setkeys[str]{lleftstr}{#1}
+	\draw[
+		color=\cmdstr at lleftstr@color,
+		line width=\cmdstr at lleftstr@strwidth pt
+	](\cmdstr at lleftstr@cdnx,\fpeval{\cmdstr at lleftstr@cdny+\cmdstr at strands@coverunion})
+	to[bend right=\cmdstr at lleftstr@bend]
+		(\fpeval{\cmdstr at lleftstr@cdnx+\cmdstr at lleftstr@width/2},
+		\fpeval{\cmdstr at lleftstr@cdny-\cmdstr at lleftstr@height/2})
+	to[bend left=\cmdstr at lleftstr@bend]
+		(\fpeval{\cmdstr at lleftstr@cdnx+\cmdstr at lleftstr@width},
+		\fpeval{\cmdstr at lleftstr@cdny-\cmdstr at lleftstr@height-\cmdstr at strands@coverunion});
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \rrightstrand - macro to draw a strand starting from the right.
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{rrightstr}{bend}{}
+\define at cmdkey[str]{rrightstr}{cdnx}{}
+\define at cmdkey[str]{rrightstr}{cdny}{}
+\define at cmdkey[str]{rrightstr}{color}{}
+\define at cmdkey[str]{rrightstr}{floor}{}
+\define at cmdkey[str]{rrightstr}{height}{}
+\define at cmdkey[str]{rrightstr}{strwidth}{}
+\define at cmdkey[str]{rrightstr}{width}{}
+\presetkeys[str]{rrightstr}{
+	bend=\cmdstr at strands@bendbraid,
+	cdnx=nothing,
+	cdny=nothing,
+	color=black,
+	floor=0,
+	height=\cmdstr at strands@height,
+	strwidth=\cmdstr at strands@strwidth,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\rrightstrand}
+%    \begin{macrocode}
+\newcommand{\rrightstrand}[1][]{ % color / init-x-coordinate / init-y-coordinate.
+	\setkeys[str]{rrightstr}{#1}
+	\draw[
+		color=\cmdstr at rrightstr@color,
+		line width=\cmdstr at rrightstr@strwidth pt
+	](\fpeval{\cmdstr at rrightstr@cdnx+\cmdstr at rrightstr@width},
+		\fpeval{\cmdstr at rrightstr@cdny+\cmdstr at strands@coverunion})
+	to[bend left=\cmdstr at rrightstr@bend]
+		(\fpeval{\cmdstr at rrightstr@cdnx+\cmdstr at rrightstr@width/2},
+		\fpeval{\cmdstr at rrightstr@cdny-\cmdstr at rrightstr@height/2})
+	to[bend right=\cmdstr at rrightstr@bend]
+		(\cmdstr at rrightstr@cdnx,
+		\fpeval{\cmdstr at rrightstr@cdny-\cmdstr at rrightstr@height-\cmdstr at strands@coverunion});
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \ccrossback - macro to draw a \backcolor filled circle to create an over-under / under-over crossing.
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{ccrossback}{cdnx}{}
+\define at cmdkey[str]{ccrossback}{cdny}{}
+\define at cmdkey[str]{ccrossback}{height}{}
+\define at cmdkey[str]{ccrossback}{width}{}
+\presetkeys[str]{ccrossback}{
+	cdnx=nothing,
+	cdny=nothing,
+	height=\cmdstr at strands@height,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\ccrossback}
+%    \begin{macrocode}
+\newcommand{\ccrossback}[1][]{
+	\setkeys[str]{ccrossback}{#1}
+	\filldraw[\cmdstr at strands@backcolor]
+		(\fpeval{\cmdstr at ccrossback@cdnx+\cmdstr at ccrossback@width/2},
+		\fpeval{\cmdstr at ccrossback@cdny-\cmdstr at ccrossback@height/2})
+		circle(\cmdstr at strands@braidcross pt);
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \bbraidgen - macro to draw a braid crossing (classic, virtual or singular).
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{bbraidgen}{bend}{}
+\define at cmdkey[str]{bbraidgen}{cdnx}{}
+\define at cmdkey[str]{bbraidgen}{cdny}{}
+\define at cmdkey[str]{bbraidgen}{colorleft}{}
+\define at cmdkey[str]{bbraidgen}{coloright}{}
+\define at cmdkey[str]{bbraidgen}{colorsingular}{}
+\define at cmdkey[str]{bbraidgen}{colorvirtual}{}
+\define at cmdkey[str]{bbraidgen}{height}{}
+\define at cmdkey[str]{bbraidgen}{strwidth}{}
+\define at cmdkey[str]{bbraidgen}{type}{}
+\define at cmdkey[str]{bbraidgen}{width}{}
+\presetkeys[str]{bbraidgen}{
+	bend=\cmdstr at strands@bendbraid,
+	cdnx=0,
+	cdny=0,
+	colorleft=black,
+	coloright=black,
+	colorsingular=black,
+	colorvirtual=black,
+	height=\cmdstr at strands@height,
+	strwidth=\cmdstr at strands@strwidth,
+	type=1, % negative-braid=-1 | positive-braid=1 | virtual-braid=2 | singular-braid=3
+	width=\cmdstr at strands@width
+}{}
+\tikzset{
+	cross/.style={ % node style to draw x--crosses inside nodes.
+		path picture={
+  			\draw[black]
+				(path picture bounding box.south east)--
+				(path picture bounding box.north west)
+				(path picture bounding box.south west)--
+				(path picture bounding box.north east);
+		}
+	}
+}
+%    \end{macrocode}
+%
+% \begin{macro}{\bbraidgen}
+%    \begin{macrocode}
+\newcommand{\bbraidgen}[1][]{
+	\setkeys[str]{bbraidgen}{#1}
+	\bbackstrands[ % trivial two-strands-braid.
+		cdnx=\cmdstr at bbraidgen@cdnx,
+		cdny=\cmdstr at bbraidgen@cdny,
+		height=\cmdstr at bbraidgen@height,
+		strwidth=\cmdstr at bbraidgen@strwidth,
+		width=\cmdstr at bbraidgen@width
+	]
+	\ifnum\cmdstr at bbraidgen@type<1 % negative generator.
+		\rrightstrand[
+			bend=\cmdstr at bbraidgen@bend,
+			cdnx=\cmdstr at bbraidgen@cdnx,
+			cdny=\cmdstr at bbraidgen@cdny,
+			color=\cmdstr at bbraidgen@coloright,
+			height=\cmdstr at bbraidgen@height,
+			strwidth=\cmdstr at bbraidgen@strwidth,
+			width=\cmdstr at bbraidgen@width
+		]
+		\ifnum\cmdstr at bbraidgen@type<2
+			\ccrossback[
+				cdnx=\cmdstr at bbraidgen@cdnx,
+				cdny=\cmdstr at bbraidgen@cdny,
+				height=\cmdstr at bbraidgen@height,
+				width=\cmdstr at bbraidgen@width
+			]
+		\fi
+		\lleftstrand[
+			bend=\cmdstr at bbraidgen@bend,
+			cdnx=\cmdstr at bbraidgen@cdnx,
+			cdny=\cmdstr at bbraidgen@cdny,
+			color=\cmdstr at bbraidgen@colorleft,
+			height=\cmdstr at bbraidgen@height,
+			strwidth=\cmdstr at bbraidgen@strwidth,
+			width=\cmdstr at bbraidgen@width
+		]
+	\else % positive generator.
+		\lleftstrand[
+			bend=\cmdstr at bbraidgen@bend,
+			cdnx=\cmdstr at bbraidgen@cdnx,
+			cdny=\cmdstr at bbraidgen@cdny,
+			color=\cmdstr at bbraidgen@colorleft,
+			height=\cmdstr at bbraidgen@height,
+			strwidth=\cmdstr at bbraidgen@strwidth,
+			width=\cmdstr at bbraidgen@width
+		]
+		\ifnum\cmdstr at bbraidgen@type<2 % over-under circle only if type is one.
+			\ccrossback[
+				cdnx=\cmdstr at bbraidgen@cdnx,
+				cdny=\cmdstr at bbraidgen@cdny,
+				height=\cmdstr at bbraidgen@height,
+				width=\cmdstr at bbraidgen@width
+			]
+		\fi
+		\rrightstrand[
+			bend=\cmdstr at bbraidgen@bend,
+			cdnx=\cmdstr at bbraidgen@cdnx,
+			cdny=\cmdstr at bbraidgen@cdny,
+			color=\cmdstr at bbraidgen@coloright,
+			height=\cmdstr at bbraidgen@height,
+			strwidth=\cmdstr at bbraidgen@strwidth,
+			width=\cmdstr at bbraidgen@width
+		]
+		\ifnum\cmdstr at bbraidgen@type=2 % virtual crossing.
+			\node[
+				circle,
+				cross,
+				draw=\cmdstr at bbraidgen@colorvirtual,
+				fill=\cmdstr at strands@backcolor,
+				inner sep=0,
+				line width=\cmdstr at bbraidgen@strwidth,
+				minimum width=\cmdstr at strands@braidvirtcross
+			]
+			at(\fpeval{\cmdstr at bbraidgen@cdnx+\cmdstr at bbraidgen@width/2},
+				\fpeval{\cmdstr at bbraidgen@cdny-\cmdstr at bbraidgen@height/2}){};
+		\fi
+		\ifnum\cmdstr at bbraidgen@type=3 % singular crossing.
+			\filldraw[\cmdstr at bbraidgen@colorsingular]
+				(\fpeval{\cmdstr at bbraidgen@cdnx+\cmdstr at bbraidgen@width/2},
+				\fpeval{\cmdstr at bbraidgen@cdny-\cmdstr at bbraidgen@height/2})
+				circle(\cmdstr at strands@braidsingcross pt);
+		\fi
+	\fi
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \ttanglegen - macro to draw a tangle generator.
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{ttanglegen}{bend}{}
+\define at cmdkey[str]{ttanglegen}{cdnx}{}
+\define at cmdkey[str]{ttanglegen}{cdny}{}
+\define at cmdkey[str]{ttanglegen}{color}{}
+\define at cmdkey[str]{ttanglegen}{height}{}
+\define at cmdkey[str]{ttanglegen}{strwidth}{}
+\define at cmdkey[str]{ttanglegen}{tiecolor}{}
+\define at cmdkey[str]{ttanglegen}{tied}{}
+\define at cmdkey[str]{ttanglegen}{tiesnake}{}
+\define at cmdkey[str]{ttanglegen}{tiesnakeamp}{}
+\define at cmdkey[str]{ttanglegen}{tiesnakelen}{}
+\define at cmdkey[str]{ttanglegen}{tiesnakends}{}
+\define at cmdkey[str]{ttanglegen}{tiestyle}{}
+\define at cmdkey[str]{ttanglegen}{tiewidth}{}
+\define at cmdkey[str]{ttanglegen}{width}{}
+\presetkeys[str]{ttanglegen}{
+	bend=\cmdstr at strands@bendtangle,
+	cdnx=0,
+	cdny=0,
+	color=black,
+	height=\cmdstr at strands@height,
+	strwidth=\cmdstr at strands@strwidth,
+	tiecolor=\cmdstr at strands@tiecolor,
+	tied=0,
+	tiesnake=\cmdstr at strands@tiesnake,
+	tiesnakeamp=\cmdstr at strands@tiesnakeamp,
+	tiesnakelen=\cmdstr at strands@tiesnakelen,
+	tiesnakends=\cmdstr at strands@tiesnakends,
+	tiestyle=\cmdstr at strands@tiestyle,
+	tiewidth=\cmdstr at strands@tiewidth,
+	width=\cmdstr at strands@width		
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\ttanglegen}
+%    \begin{macrocode}
+\newcommand{\ttanglegen}[1][]{
+	\setkeys[str]{ttanglegen}{#1}
+	\bbackstrands[ % trivial two-strands-braid.
+		cdnx=\cmdstr at ttanglegen@cdnx,
+		cdny=\cmdstr at ttanglegen@cdny,
+		height=\cmdstr at ttanglegen@height,
+		strwidth=\cmdstr at ttanglegen@strwidth,
+		width=\cmdstr at ttanglegen@width
+	]
+	\draw[
+		bend right=\cmdstr at strands@bendtangle,
+		color=\cmdstr at ttanglegen@color,
+		line width=\cmdstr at strands@strwidth
+	](\cmdstr at ttanglegen@cdnx,\fpeval{\cmdstr at ttanglegen@cdny+\cmdstr at strands@coverunion})
+	to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width/2},
+		\fpeval{\cmdstr at ttanglegen@cdny-\cmdstr at ttanglegen@height/3+0.03})
+	to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width},
+		\fpeval{\cmdstr at ttanglegen@cdny+\cmdstr at strands@coverunion});
+	\draw[
+		bend left=\cmdstr at strands@bendtangle,
+		color=\cmdstr at ttanglegen@color,
+		line width=\cmdstr at strands@strwidth
+	](\cmdstr at ttanglegen@cdnx,
+		\fpeval{\cmdstr at ttanglegen@cdny-\cmdstr at ttanglegen@height-\cmdstr at strands@coverunion})
+	to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width/2},
+		\fpeval{\cmdstr at ttanglegen@cdny-(2*\cmdstr at ttanglegen@height)/3-0.03})
+	to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width},
+		\fpeval{\cmdstr at ttanglegen@cdny-\cmdstr at ttanglegen@height-\cmdstr at strands@coverunion});
+	\ifnum\cmdstr at ttanglegen@tied=1 % tied version.
+		\draw[
+				color=\cmdstr at ttanglegen@tiecolor,
+				line width=\cmdstr at ttanglegen@tiewidth,
+				decorate=\cmdstr at ttanglegen@tiesnake,
+				decoration={
+					snake,
+					amplitude=\cmdstr at ttanglegen@tiesnakeamp,
+					post length=\cmdstr at ttanglegen@tiesnakends,
+					pre length=\cmdstr at ttanglegen@tiesnakends,
+					segment length=\cmdstr at ttanglegen@tiesnakelen
+				},
+				style=\cmdstr at ttanglegen@tiestyle
+			](\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width/2},
+				\fpeval{\cmdstr at ttanglegen@cdny-\cmdstr at ttanglegen@height/3+0.03})
+			to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width/2},
+				\fpeval{\cmdstr at ttanglegen@cdny-(2*\cmdstr at ttanglegen@height)/3-0.03});
+	\fi
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \aaddgen - macro to add a generator on a strand level.
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{aaddgen}{bendbraid}{}
+\define at cmdkey[str]{aaddgen}{bendtangle}{}
+\define at cmdkey[str]{aaddgen}{direction}{}
+\define at cmdkey[str]{aaddgen}{floor}{}
+\define at cmdkey[str]{aaddgen}{generator}{}
+\define at cmdkey[str]{aaddgen}{height}{}
+\define at cmdkey[str]{aaddgen}{level}{}
+\define at cmdkey[str]{aaddgen}{numlevs}{}
+\define at cmdkey[str]{aaddgen}{posx}{}
+\define at cmdkey[str]{aaddgen}{posy}{}
+\define at cmdkey[str]{aaddgen}{strwidth}{}
+\define at cmdkey[str]{aaddgen}{tiebull}{}
+\define at cmdkey[str]{aaddgen}{tiebullsize}{}
+\define at cmdkey[str]{aaddgen}{tiecolor}{}
+\define at cmdkey[str]{aaddgen}{tieheight}{}
+\define at cmdkey[str]{aaddgen}{tiesnake}{}
+\define at cmdkey[str]{aaddgen}{tiesnakeamp}{}
+\define at cmdkey[str]{aaddgen}{tiesnakends}{}
+\define at cmdkey[str]{aaddgen}{tiesnakelen}{}
+\define at cmdkey[str]{aaddgen}{tiestyle}{}
+\define at cmdkey[str]{aaddgen}{tiewidth}{}
+\define at cmdkey[str]{aaddgen}{width}{}
+\presetkeys[str]{aaddgen}{
+	bendbraid=\cmdstr at strands@bendbraid,
+	bendtangle=\cmdstr at strands@bendtangle,
+	direction=\cmdstr at strands@direction,
+	floor=0,
+	generator=s1,
+	height=\cmdstr at strands@height,
+	level=0,
+	numlevs=0,
+	posx=nothing, % internal.
+	posy=nothing, % internal.
+	strwidth=\cmdstr at strands@strwidth,
+	tiebull=\cmdstr at strands@tiebull,
+	tiebullsize=\cmdstr at strands@tiebullsize,
+	tiecolor=\cmdstr at strands@tiecolor,
+	tieheight=\cmdstr at strands@tieheight,	
+	tiesnake=\cmdstr at strands@tiesnake,
+	tiesnakeamp=\cmdstr at strands@tiesnakeamp,
+	tiesnakends=\cmdstr at strands@tiesnakends,
+	tiesnakelen=\cmdstr at strands@tiesnakelen,
+	tiestyle=\cmdstr at strands@tiestyle,
+	tiewidth=\cmdstr at strands@tiewidth,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\aaddgen}
+%    \begin{macrocode}
+\newcommand{\aaddgen}[1][]{
+	\setkeys[str]{aaddgen}{#1}
+	\StrChar{\cmdstr at aaddgen@generator}{1}[\firstchar]
+	\StrBehind{\cmdstr at aaddgen@generator}{\firstchar}[\numstrand]
+	\renewcommand{\cmdstr at aaddgen@posx}{\fpeval{(\numstrand-1)*\cmdstr at aaddgen@width}}
+	\ifnum\cmdstr at aaddgen@direction=1
+		\renewcommand{\cmdstr at aaddgen@posy}{\fpeval{(\cmdstr at aaddgen@numlevs+2+\cmdstr at aaddgen@floor-\cmdstr at aaddgen@level)*\cmdstr at aaddgen@height}}
+	\fi	
+	\ifnum\cmdstr at aaddgen@direction=0
+		\renewcommand{\cmdstr at aaddgen@posy}{\fpeval{\cmdstr at aaddgen@level*\cmdstr at aaddgen@height}}
+	\fi
+	\ifthenelse{\equal{\firstchar}{\cmdstr at strands@gencharnegbraid}}{
+		\bbraidgen[
+			bend=\cmdstr at aaddgen@bendbraid,
+			cdnx=\cmdstr at aaddgen@posx,
+			cdny=\cmdstr at aaddgen@posy,
+			height=\cmdstr at aaddgen@height,
+			strwidth=\cmdstr at aaddgen@strwidth,
+			type=-1,
+			width=\cmdstr at aaddgen@width
+		]
+	}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@gencharposbraid}}{
+		\bbraidgen[
+			bend=\cmdstr at aaddgen@bendbraid,
+			cdnx=\cmdstr at aaddgen@posx,
+			cdny=\cmdstr at aaddgen@posy,
+			height=\cmdstr at aaddgen@height,
+			strwidth=\cmdstr at aaddgen@strwidth,
+			type=1,
+			width=\cmdstr at aaddgen@width
+		]
+	}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@gencharvirtual}}{
+		\bbraidgen[
+			bend=\cmdstr at aaddgen@bendbraid,
+			cdnx=\cmdstr at aaddgen@posx,
+			cdny=\cmdstr at aaddgen@posy,
+			height=\cmdstr at aaddgen@height,
+			strwidth=\cmdstr at aaddgen@strwidth,
+			type=2,
+			width=\cmdstr at aaddgen@width
+		]
+	}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@gencharsingular}}{
+		\bbraidgen[
+			bend=\cmdstr at aaddgen@bendbraid,
+			cdnx=\cmdstr at aaddgen@posx,
+			cdny=\cmdstr at aaddgen@posy,
+			height=\cmdstr at aaddgen@height,
+			strwidth=\cmdstr at aaddgen@strwidth,
+			type=3,
+			width=\cmdstr at aaddgen@width
+		]
+	}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@genchartangle}}{
+		\ttanglegen[
+			bend=\cmdstr at aaddgen@bendtangle,
+			cdnx=\cmdstr at aaddgen@posx,
+			cdny=\cmdstr at aaddgen@posy,
+			height=\cmdstr at aaddgen@height,
+			strwidth=\cmdstr at aaddgen@strwidth,
+			tied=0,
+			width=\cmdstr at aaddgen@width
+		]
+	}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@genchartie}}{
+		\tie[
+			bull=\cmdstr at aaddgen@tiebull,
+			bulletie=\cmdstr at aaddgen@tiebullsize, %%%%%%%%%%%%%%%%%%%%%
+			color=\cmdstr at aaddgen@tiecolor,
+			height=\cmdstr at aaddgen@height,
+			floor=\fpeval{\cmdstr at aaddgen@posy-1},
+			snake=\cmdstr at aaddgen@tiesnake,
+			snakeamp=\cmdstr at aaddgen@tiesnakeamp,
+			snakelen=\cmdstr at aaddgen@tiesnakelen,
+			snakends=\cmdstr at aaddgen@tiesnakends,
+			style=\cmdstr at aaddgen@tiestyle,
+			tieheight=\cmdstr at aaddgen@tieheight,
+			tiewidth=\cmdstr at aaddgen@tiewidth,
+			width=\cmdstr at aaddgen@width
+		]{\numstrand,\fpeval{\numstrand+1}}
+	}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@genchartiedtangle}}{
+		\ttanglegen[
+			bend=\cmdstr at aaddgen@bendtangle,
+			cdnx=\cmdstr at aaddgen@posx,
+			cdny=\cmdstr at aaddgen@posy,
+			height=\cmdstr at aaddgen@height,
+			strwidth=\cmdstr at aaddgen@strwidth,
+			tiecolor=\cmdstr at aaddgen@tiecolor,
+			tied=1,
+			tiesnake=\cmdstr at aaddgen@tiesnake,
+			tiesnakeamp=\cmdstr at aaddgen@tiesnakeamp,
+			tiesnakelen=\cmdstr at aaddgen@tiesnakelen,
+			tiesnakends=\cmdstr at aaddgen@tiesnakends,
+			tiestyle=\cmdstr at aaddgen@tiestyle,
+			tiewidth=\cmdstr at aaddgen@tiewidth,
+			width=\cmdstr at aaddgen@width
+		]
+	}{DO NOTHING!}}}}}}} % \ifthenelse always use "else", so it will do nothing if other letter.
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \strands  - macro to draw braid-like element via generators (with tikz environment).
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{ggens}{bendbraid}{}
+\define at cmdkey[str]{ggens}{bendtangle}{}
+\define at cmdkey[str]{ggens}{bulla}{}
+\define at cmdkey[str]{ggens}{bullb}{}
+\define at cmdkey[str]{ggens}{bulletends}{}
+\define at cmdkey[str]{ggens}{direction}{}
+\define at cmdkey[str]{ggens}{floor}{}
+\define at cmdkey[str]{ggens}{font}{}
+\define at cmdkey[str]{ggens}{height}{}
+\define at cmdkey[str]{ggens}{labelver}{}
+\define at cmdkey[str]{ggens}{labelhor}{}
+\define at cmdkey[str]{ggens}{nstr}{}
+\define at cmdkey[str]{ggens}{nstrsave}{}
+\define at cmdkey[str]{ggens}{strwidth}{}
+\define at cmdkey[str]{ggens}{tiebull}{}
+\define at cmdkey[str]{ggens}{tiebullsize}{}
+\define at cmdkey[str]{ggens}{tiecolor}{}
+\define at cmdkey[str]{ggens}{tieheight}{}
+\define at cmdkey[str]{ggens}{tiesnake}{}
+\define at cmdkey[str]{ggens}{tiesnakeamp}{}
+\define at cmdkey[str]{ggens}{tiesnakends}{}
+\define at cmdkey[str]{ggens}{tiesnakelen}{}
+\define at cmdkey[str]{ggens}{tiestyle}{}
+\define at cmdkey[str]{ggens}{tiewidth}{}
+\define at cmdkey[str]{ggens}{type}{}
+\define at cmdkey[str]{ggens}{width}{}
+\presetkeys[str]{ggens}{
+	bendbraid=\cmdstr at strands@bendbraid,
+	bendtangle=\cmdstr at strands@bendtangle,
+	bulla=1,
+	bullb=1,
+	bulletends=\cmdstr at strands@bulletsize,
+	direction=\cmdstr at strands@direction,
+	floor=0,
+	font=\cmdstr at strands@font,
+	height=\cmdstr at strands@height,
+	labelver=\cmdstr at strands@labelver,
+	labelhor=\cmdstr at strands@labelhor,
+	nstr=0,
+	nstrsave=0,
+	strwidth=\cmdstr at strands@strwidth,
+	tiebull=\cmdstr at strands@tiebull,
+	tiebullsize=\cmdstr at strands@tiebullsize,
+	tiecolor=\cmdstr at strands@tiecolor,
+	tieheight=\cmdstr at strands@tieheight,	
+	tiesnake=\cmdstr at strands@tiesnake,
+	tiesnakeamp=\cmdstr at strands@tiesnakeamp,
+	tiesnakends=\cmdstr at strands@tiesnakends,
+	tiesnakelen=\cmdstr at strands@tiesnakelen,
+	tiestyle=\cmdstr at strands@tiestyle,
+	tiewidth=\cmdstr at strands@tiewidth,
+	type=3,
+	width=\cmdstr at strands@width
+}{}
+\newcounter{levelscounter} % count levels.
+%    \end{macrocode}
+%
+% \begin{macro}{\sstrands}
+%    \begin{macrocode}
+\newcommand{\sstrands}[2][]{
+	\setkeys[str]{ggens}{#1}
+%    \end{macrocode}
+% number of strands.
+%    \begin{macrocode}
+	\StrSubstitute{#2}{ }{}[\cmdstr at ggens@nstrsave] % remove whitespaces.
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@gencharposbraid}{}[\cmdstr at ggens@nstrsave]
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@gencharnegbraid}{}[\cmdstr at ggens@nstrsave]
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@gencharvirtual}{}[\cmdstr at ggens@nstrsave]
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@gencharsingular}{}[\cmdstr at ggens@nstrsave]
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@genchartangle}{}[\cmdstr at ggens@nstrsave]
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@genchartie}{}[\cmdstr at ggens@nstrsave]
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@genchartiedtangle}{}[\cmdstr at ggens@nstrsave]
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@genchartrivial}{}[\cmdstr at ggens@nstrsave]
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{*}{,}[\cmdstr at ggens@nstrsave]
+	\StrSubstitute{\cmdstr at ggens@nstrsave}{-}{,}[\cmdstr at ggens@nstrsave]
+	\let\oldnstr\cmdstr at ggens@nstr
+	\renewcommand{\cmdstr at ggens@nstr}{\fpeval{max(max(\cmdstr at ggens@nstrsave)+1,\oldnstr)}}
+%    \end{macrocode}
+% backstrands.
+%    \begin{macrocode}
+	\StrCount{#2}{*}[\numlevs]
+	\permutation[ % backstrands.
+		bulla=0,
+		bullb=0,
+		floor=\fpeval{\cmdstr at ggens@floor/((\numlevs+1)*\cmdstr at ggens@height)}, % ??????????????
+		height=\fpeval{(\numlevs+1)*\cmdstr at ggens@height},
+		nstr=\cmdstr at ggens@nstr,
+		tkzpic=0,
+		type=0
+	]{1}
+%    \end{macrocode}
+% generators.
+%    \begin{macrocode}
+	\setcounter{levelscounter}{0}
+	\ForEach{*}{ % for each level.
+		\stepcounter{levelscounter}
+		\ForEachSublevel{-}{ % for each generator in level.
+			\aaddgen[ % add the generator.
+				bendbraid=\cmdstr at ggens@bendbraid,
+				bendtangle=\cmdstr at ggens@bendtangle,
+				direction=\cmdstr at ggens@direction,
+				floor=\cmdstr at ggens@floor,
+				generator=\thislevelitem,
+				height=\cmdstr at ggens@height,
+				level=\thelevelscounter,
+				numlevs=\numlevs,
+				strwidth=\cmdstr at ggens@strwidth,
+				tiebull=\cmdstr at ggens@tiebull,
+				tiebullsize=\cmdstr at ggens@tiebullsize,
+				tiecolor=\cmdstr at ggens@tiecolor,
+				tieheight=\cmdstr at ggens@tieheight,	
+				tiesnake=\cmdstr at ggens@tiesnake,
+				tiesnakeamp=\cmdstr at ggens@tiesnakeamp,
+				tiesnakends=\cmdstr at ggens@tiesnakends,
+				tiesnakelen=\cmdstr at ggens@tiesnakelen,
+				tiestyle=\cmdstr at ggens@tiestyle,
+				tiewidth=\cmdstr at ggens@tiewidth,
+				width=\cmdstr at ggens@width
+			]
+		}
+	}{#2}
+	\decoratestrands[
+		bulla=\cmdstr at ggens@bulla,
+		bullb=\cmdstr at ggens@bullb,
+		bulletends=\cmdstr at ggens@bulletends,
+		floor=\fpeval{\cmdstr at ggens@floor/((\numlevs+1)*\cmdstr at ggens@height)},
+		font=\cmdstr at ggens@font,
+		height=\fpeval{(\numlevs+1)*\cmdstr at ggens@height},
+		labelver=\cmdstr at ggens@labelver,
+		labelhor=\cmdstr at ggens@labelhor,
+		nstr=\cmdstr at ggens@nstr,
+		type=\cmdstr at ggens@type,
+		width=\cmdstr at ggens@width
+	]
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%    \begin{macrocode}
+\makeatletter
+\define at cmdkey[str]{gens}{bendbraid}{}
+\define at cmdkey[str]{gens}{bendtangle}{}
+\define at cmdkey[str]{gens}{bulla}{}
+\define at cmdkey[str]{gens}{bullb}{}
+\define at cmdkey[str]{gens}{bulletends}{}
+\define at cmdkey[str]{gens}{direction}{}
+\define at cmdkey[str]{gens}{floor}{}
+\define at cmdkey[str]{gens}{font}{}
+\define at cmdkey[str]{gens}{height}{}
+\define at cmdkey[str]{gens}{labelver}{}
+\define at cmdkey[str]{gens}{labelhor}{}
+\define at cmdkey[str]{gens}{nstr}{}
+\define at cmdkey[str]{gens}{nstrsave}{}
+\define at cmdkey[str]{gens}{rotate}{}
+\define at cmdkey[str]{gens}{scale}{}
+\define at cmdkey[str]{gens}{strwidth}{}
+\define at cmdkey[str]{gens}{tiebull}{}
+\define at cmdkey[str]{gens}{tiebullsize}{}
+\define at cmdkey[str]{gens}{tiecolor}{}
+\define at cmdkey[str]{gens}{tieheight}{}
+\define at cmdkey[str]{gens}{tiesnake}{}
+\define at cmdkey[str]{gens}{tiesnakeamp}{}
+\define at cmdkey[str]{gens}{tiesnakends}{}
+\define at cmdkey[str]{gens}{tiesnakelen}{}
+\define at cmdkey[str]{gens}{tiestyle}{}
+\define at cmdkey[str]{gens}{tiewidth}{}
+\define at cmdkey[str]{gens}{tkzpic}{}
+\define at cmdkey[str]{gens}{type}{}
+\define at cmdkey[str]{gens}{width}{}
+\presetkeys[str]{gens}{
+	bendbraid=\cmdstr at strands@bendbraid,
+	bendtangle=\cmdstr at strands@bendtangle,
+	bulla=1,
+	bullb=1,
+	bulletends=\cmdstr at strands@bulletsize,
+	direction=\cmdstr at strands@direction,
+	floor=0,
+	font=\cmdstr at strands@font,
+	height=\cmdstr at strands@height,
+	labelver=\cmdstr at strands@labelver,
+	labelhor=\cmdstr at strands@labelhor,
+	nstr=0,
+	nstrsave=0,
+	rotate=\cmdstr at strands@rotate,
+	scale=\cmdstr at strands@scale,
+	strwidth=\cmdstr at strands@strwidth,
+	tiebull=\cmdstr at strands@tiebull,
+	tiebullsize=\cmdstr at strands@tiebullsize,
+	tiecolor=\cmdstr at strands@tiecolor,
+	tieheight=\cmdstr at strands@tieheight,	
+	tiesnake=\cmdstr at strands@tiesnake,
+	tiesnakeamp=\cmdstr at strands@tiesnakeamp,
+	tiesnakends=\cmdstr at strands@tiesnakends,
+	tiesnakelen=\cmdstr at strands@tiesnakelen,
+	tiestyle=\cmdstr at strands@tiestyle,
+	tiewidth=\cmdstr at strands@tiewidth,
+	tkzpic=\cmdstr at strands@tkzpic,
+	type=3,
+	width=\cmdstr at strands@width
+}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\strands}
+%    \begin{macrocode}
+\newcommand{\strands}[2][]{
+	\setkeys[str]{gens}{#1}
+	\ifthenelse{\equal{\cmdstr at gens@tkzpic}{1}}{
+		\begin{tikzpicture}[rotate=\cmdstr at gens@rotate,scale=\cmdstr at gens@scale]
+			\sstrands[
+				bendbraid=\cmdstr at gens@bendbraid,
+				bendtangle=\cmdstr at gens@bendtangle,
+				bulla=\cmdstr at gens@bulla,
+				bullb=\cmdstr at gens@bullb,
+				bulletends=\cmdstr at gens@bulletends,
+				direction=\cmdstr at gens@direction,
+				floor=\cmdstr at gens@floor,
+				font=\cmdstr at gens@font,
+				height=\cmdstr at gens@height,
+				labelver=\cmdstr at gens@labelver,
+				labelhor=\cmdstr at gens@labelhor,
+				nstr=\cmdstr at gens@nstr,
+				nstrsave=\cmdstr at gens@nstrsave,
+				strwidth=\cmdstr at gens@strwidth,
+				tiebull=\cmdstr at gens@tiebull,
+				tiebullsize=\cmdstr at gens@tiebullsize,
+				tiecolor=\cmdstr at gens@tiecolor,
+				tieheight=\cmdstr at gens@tieheight,
+				tiesnake=\cmdstr at gens@tiesnake,
+				tiesnakeamp=\cmdstr at gens@tiesnakeamp,
+				tiesnakends=\cmdstr at gens@tiesnakends,
+				tiesnakelen=\cmdstr at gens@tiesnakelen,
+				tiestyle=\cmdstr at gens@tiestyle,
+				tiewidth=\cmdstr at gens@tiewidth,
+				type=\cmdstr at gens@type,
+				width=\cmdstr at gens@width
+			]{#2}
+		\end{tikzpicture}
+	}{
+		\sstrands[
+			bendbraid=\cmdstr at gens@bendbraid,
+			bendtangle=\cmdstr at gens@bendtangle,
+			bulla=\cmdstr at gens@bulla,
+			bullb=\cmdstr at gens@bullb,
+			bulletends=\cmdstr at gens@bulletends,
+			direction=\cmdstr at gens@direction,
+			floor=\cmdstr at gens@floor,
+			font=\cmdstr at gens@font,
+			height=\cmdstr at gens@height,
+			labelver=\cmdstr at gens@labelver,
+			labelhor=\cmdstr at gens@labelhor,
+			nstr=\cmdstr at gens@nstr,
+			nstrsave=\cmdstr at gens@nstrsave,
+			strwidth=\cmdstr at gens@strwidth,
+			tiebull=\cmdstr at gens@tiebull,
+			tiebullsize=\cmdstr at gens@tiebullsize,
+			tiecolor=\cmdstr at gens@tiecolor,
+			tieheight=\cmdstr at gens@tieheight,
+			tiesnake=\cmdstr at gens@tiesnake,
+			tiesnakeamp=\cmdstr at gens@tiesnakeamp,
+			tiesnakends=\cmdstr at gens@tiesnakends,
+			tiesnakelen=\cmdstr at gens@tiesnakelen,
+			tiestyle=\cmdstr at gens@tiestyle,
+			tiewidth=\cmdstr at gens@tiewidth,
+			type=\cmdstr at gens@type,
+			width=\cmdstr at gens@width
+		]{#2}
+	}
+}%    \end{macrocode}
+% \end{macro}
+%
+
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+\endinput


Property changes on: trunk/Master/texmf-dist/source/latex/strands/strands.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/strands/strands.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/strands/strands.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/strands/strands.ins	2021-07-05 20:52:31 UTC (rev 59838)
@@ -0,0 +1,57 @@
+%% Copyright (C) 2021 by Diego Arcis <arcisd at gmail.com>
+%% --------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Diego Arcis.
+%%
+%% This work consists of the files strands.dtx and strands.ins
+%% and the derived filebase strands.sty.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/strands}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2021 by Diego Arcis <arcisd at gmail.com>
+--------------------------------------------------------------------------
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+  http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+\endpreamble
+
+\generate{\file{strands.sty}{\from{strands.dtx}{package}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{*                                                           *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX:                    *}
+\Msg{*                                                           *}
+\Msg{*     strands.sty                                          *}
+\Msg{*                                                           *}
+\Msg{* To produce the documentation run the file strands.dtx    *}
+\Msg{* through LaTeX.                                            *}
+\Msg{*                                                           *}
+\Msg{* Happy TeXing!                                             *}
+\Msg{*                                                           *}
+\Msg{*************************************************************}
+
+\endbatchfile

Added: trunk/Master/texmf-dist/tex/latex/strands/strands.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/strands/strands.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/strands/strands.sty	2021-07-05 20:52:31 UTC (rev 59838)
@@ -0,0 +1,1443 @@
+%%
+%% This is file `strands.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% strands.dtx  (with options: `package')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2021 by Diego Arcis <arcisd at gmail.com>
+%% --------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%% 
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{strands}
+    [<+date+> <+version+> <+description+>]
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{strands}[Diego Arcis 2021/07/05 Strands v1.0]
+\RequirePackage{forarray}
+\RequirePackage{ifthen}
+\RequirePackage{tikz}
+\RequirePackage{xfp}
+\RequirePackage{xstring}
+\RequirePackage{xkeyval}
+\usetikzlibrary{snakes}
+\newcommand{\getelem}[3]{ % \getelem{list}{index}{\name}
+\StrBetween[#2,\fpeval{#2+1}]{,#1,}{,}{,}[#3]
+}
+\makeatletter
+\define at cmdkey[str]{strands}{backcolor}{}
+\define at cmdkey[str]{strands}{bend}{}
+\define at cmdkey[str]{strands}{bendbraid}{}
+\define at cmdkey[str]{strands}{bendtangle}{}
+\define at cmdkey[str]{strands}{bulletsize}{}
+\define at cmdkey[str]{strands}{braidcross}{}
+\define at cmdkey[str]{strands}{braidsingcross}{}
+\define at cmdkey[str]{strands}{braidvirtcross}{}
+\define at cmdkey[str]{strands}{coverunion}{}
+\define at cmdkey[str]{strands}{direction}{}
+\define at cmdkey[str]{strands}{externalize}{}
+\define at cmdkey[str]{strands}{font}{}
+\define at cmdkey[str]{strands}{gencharposbraid}{}
+\define at cmdkey[str]{strands}{gencharnegbraid}{}
+\define at cmdkey[str]{strands}{gencharvirtual}{}
+\define at cmdkey[str]{strands}{gencharsingular}{}
+\define at cmdkey[str]{strands}{genchartangle}{}
+\define at cmdkey[str]{strands}{genchartie}{}
+\define at cmdkey[str]{strands}{genchartiedtangle}{}
+\define at cmdkey[str]{strands}{genchartrivial}{}
+\define at cmdkey[str]{strands}{height}{}
+\define at cmdkey[str]{strands}{labelver}{}
+\define at cmdkey[str]{strands}{labelhor}{}
+\define at cmdkey[str]{strands}{norma}{}
+\define at cmdkey[str]{strands}{normb}{}
+\define at cmdkey[str]{strands}{normcolor}{}
+\define at cmdkey[str]{strands}{normsymbol}{}
+\define at cmdkey[str]{strands}{nstr}{}
+\define at cmdkey[str]{strands}{num}{}
+\define at cmdkey[str]{strands}{rotate}{}
+\define at cmdkey[str]{strands}{scale}{}
+\define at cmdkey[str]{strands}{strwidth}{}
+\define at cmdkey[str]{strands}{tiebend}{}
+\define at cmdkey[str]{strands}{tiebull}{}
+\define at cmdkey[str]{strands}{tiebullsize}{}
+\define at cmdkey[str]{strands}{tiecolor}{}
+\define at cmdkey[str]{strands}{tieheight}{}
+\define at cmdkey[str]{strands}{tiesnake}{}
+\define at cmdkey[str]{strands}{tiesnakeamp}{}
+\define at cmdkey[str]{strands}{tiesnakends}{}
+\define at cmdkey[str]{strands}{tiesnakelen}{}
+\define at cmdkey[str]{strands}{tiestyle}{}
+\define at cmdkey[str]{strands}{tiewidth}{}
+\define at cmdkey[str]{strands}{timeswidth}{}
+\define at cmdkey[str]{strands}{tkzpic}{}
+\define at cmdkey[str]{strands}{width}{}
+\presetkeys[str]{strands}{
+backcolor=white, % color of the paper.
+bend=45, % bend of partitions.
+bendbraid=30, % bend for braid crossings.
+bendtangle=45, % bend for tangles.
+braidcross=3, % size of the braid crossing.
+braidsingcross=1.6, % size of the singular braid crossing.
+braidvirtcross=8, % size of the virtual braid crossing.
+bulletsize=0.04,
+coverunion=0.001, % extra length to cover the union of strands.
+direction=1,
+externalize=0, % use 1 to transform images to PDF.
+font=0.7, % size of the fonts for labels.
+gencharposbraid=p,
+gencharnegbraid=n,
+gencharvirtual=v,
+gencharsingular=s,
+genchartangle=t,
+genchartie=e,
+genchartiedtangle=f,
+genchartrivial=i,
+height=1, % to set the height of strands.
+labelver=0.2,
+labelhor=0.03,
+norma=0, % to normalize the height above.
+normb=0, % to normalize the height below.
+normcolor=transparent,
+normsymbol=-,
+nstr=0, % number of strands.
+num=0, % number of dots for arc partitions.
+rotate=0, % to rotate all pictures.
+scale=1, % to scale all pictures.
+strwidth=0.7, % to set the width of the strands.
+tiebend=0, % to set bend of ties.
+tiebull=0, % bullets for ties.
+tiebullsize=0.04,
+tiecolor=red, % to set color of the ties.
+tieheight=0.5, % height of ties respect to the global height.
+tiesnake=false,
+tiesnakeamp=1,
+tiesnakends=0,
+tiesnakelen=3,
+tiestyle=dashed, % to set the type of the tie lines.
+tiewidth=0.5, % to set the width of tie lines.
+timeswidth=3,
+tkzpic=1,
+width=0.6, % to set the width between strands.
+}{}
+\setkeys[str]{strands}{}
+\DeclareOptionX{backcolor}{\renewcommand{\cmdstr at strands@backcolor}{#1}}
+\DeclareOptionX{bend}{\renewcommand{\cmdstr at strands@bend}{#1}}
+\DeclareOptionX{bendbraid}{\renewcommand{\cmdstr at strands@bendbraid}{#1}}
+\DeclareOptionX{bendtangle}{\renewcommand{\cmdstr at strands@bendtangle}{#1}}
+\DeclareOptionX{braidcross}{\renewcommand{\cmdstr at strands@braidcross}{#1}}
+\DeclareOptionX{braidsingcross}{\renewcommand{\cmdstr at strands@braidsingcross}{#1}}
+\DeclareOptionX{braidvirtcross}{\renewcommand{\cmdstr at strands@braidvirtcross}{#1}}
+\DeclareOptionX{bulletsize}{\renewcommand{\cmdstr at strands@bulletsize}{#1}}
+\DeclareOptionX{coverunion}{\renewcommand{\cmdstr at strands@coverunion}{#1}}
+\DeclareOptionX{direction}{\renewcommand{\cmdstr at strands@direction}{#1}}
+\DeclareOptionX{externalize}{\renewcommand{\cmdstr at strands@externalize}{#1}}
+\DeclareOptionX{font}{\renewcommand{\cmdstr at strands@font}{#1}}
+\DeclareOptionX{gencharposbraid}{\renewcommand{\cmdstr at strands@gencharposbraid}{#1}}
+\DeclareOptionX{gencharnegbraid}{\renewcommand{\cmdstr at strands@gencharnegbraid}{#1}}
+\DeclareOptionX{gencharvirtual}{\renewcommand{\cmdstr at strands@gencharvirtual}{#1}}
+\DeclareOptionX{gencharsingular}{\renewcommand{\cmdstr at strands@gencharsingular}{#1}}
+\DeclareOptionX{genchartangle}{\renewcommand{\cmdstr at strands@genchartangle}{#1}}
+\DeclareOptionX{genchartie}{\renewcommand{\cmdstr at strands@genchartie}{#1}}
+\DeclareOptionX{genchartiedtangle}{\renewcommand{\cmdstr at strands@genchartiedtangle}{#1}}
+\DeclareOptionX{height}{\renewcommand{\cmdstr at strands@height}{#1}}
+\DeclareOptionX{labelver}{\renewcommand{\cmdstr at strands@labelver}{#1}}
+\DeclareOptionX{labelhor}{\renewcommand{\cmdstr at strands@labelhor}{#1}}
+\DeclareOptionX{norma}{\renewcommand{\cmdstr at strands@norma}{#1}}
+\DeclareOptionX{normb}{\renewcommand{\cmdstr at strands@normb}{#1}}
+\DeclareOptionX{normcolor}{\renewcommand{\cmdstr at strands@normcolor}{#1}}
+\DeclareOptionX{nstr}{\renewcommand{\cmdstr at strands@nstr}{#1}}
+\DeclareOptionX{num}{\renewcommand{\cmdstr at strands@num}{#1}}
+\DeclareOptionX{rotate}{\renewcommand{\cmdstr at strands@rotate}{#1}}
+\DeclareOptionX{scale}{\renewcommand{\cmdstr at strands@scale}{#1}}
+\DeclareOptionX{strwidth}{\renewcommand{\cmdstr at strands@strwidth}{#1}}
+\DeclareOptionX{tiebend}{\renewcommand{\cmdstr at strands@tiebend}{#1}}
+\DeclareOptionX{tiebull}{\renewcommand{\cmdstr at strands@tiebull}{#1}}
+\DeclareOptionX{tiebullsize}{\renewcommand{\cmdstr at strands@tiebullsize}{#1}}
+\DeclareOptionX{tiecolor}{\renewcommand{\cmdstr at strands@tiecolor}{#1}}
+\DeclareOptionX{tiesnake}{\renewcommand{\cmdstr at strands@tiesnake}{#1}}
+\DeclareOptionX{tiestyle}{\renewcommand{\cmdstr at strands@tiestyle}{#1}}
+\DeclareOptionX{tiewidth}{\renewcommand{\cmdstr at strands@tiewidth}{#1}}
+\DeclareOptionX{timeswidth}{\renewcommand{\cmdstr at strands@timeswidth}{#1}}
+\DeclareOptionX{tkzpic}{\renewcommand{\cmdstr at strands@tkzpic}{#1}}
+\DeclareOptionX{width}{\renewcommand{\cmdstr at strands@width}{#1}}
+\DeclareOptionX*{\PackageWarning{strands}{`\CurrentOption' ignored}} % ignore unknown options.
+\ProcessOptionsX\relax
+\ifnum\cmdstr at strands@externalize=1
+\usetikzlibrary{external}
+\tikzexternalize[optimize=false,prefix=strpack]
+\fi
+\makeatletter
+\define at cmdkey[str]{decor}{bulla}{}
+\define at cmdkey[str]{decor}{bullb}{}
+\define at cmdkey[str]{decor}{bulletends}{}
+\define at cmdkey[str]{decor}{floor}{}
+\define at cmdkey[str]{decor}{font}{}
+\define at cmdkey[str]{decor}{height}{}
+\define at cmdkey[str]{decor}{labelver}{}
+\define at cmdkey[str]{decor}{labelhor}{}
+\define at cmdkey[str]{decor}{nstr}{}
+\define at cmdkey[str]{decor}{type}{}
+\define at cmdkey[str]{decor}{width}{}
+\presetkeys[str]{decor}{
+bulla=1,
+bullb=1,
+bulletends=\cmdstr at strands@bulletsize,
+floor=0,
+font=\cmdstr at strands@font,
+height=\cmdstr at strands@height,
+labelver=\cmdstr at strands@labelver,
+labelhor=\cmdstr at strands@labelhor,
+nstr=\cmdstr at strands@nstr,
+type=3,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\decoratestrands}[1][]{
+\setkeys[str]{decor}{#1} % set variables.
+\foreach\ind in{0,...,\fpeval{\cmdstr at decor@nstr-1}}{
+\ifnum \cmdstr at decor@bulla=1 % bullets above.
+\filldraw(\fpeval{\ind*\cmdstr at decor@width},
+\fpeval{(\cmdstr at decor@floor+1)*\cmdstr at decor@height})circle(\cmdstr at decor@bulletends);
+\fi
+\ifnum \cmdstr at decor@bullb=1 % bullets below.
+\filldraw(\fpeval{\ind*\cmdstr at decor@width},
+\fpeval{\cmdstr at decor@floor*\cmdstr at decor@height})circle(\cmdstr at decor@bulletends);
+\fi
+\ifnum \cmdstr at decor@type<5;
+\ifnum \cmdstr at decor@type>0 % labels above from 1 to n.
+\node[scale=\cmdstr at decor@font]at
+(\fpeval{\ind*\cmdstr at decor@width},
+\fpeval{(\cmdstr at decor@floor+1)*\cmdstr at decor@height+\cmdstr at decor@labelver})
+{$\fpeval{\ind+1}$};
+\fi
+\node[scale=\cmdstr at decor@font]at
+(\fpeval{\ind*\cmdstr at decor@width},
+\fpeval{\cmdstr at decor@floor*\cmdstr at decor@height-\cmdstr at decor@labelver})
+{$\ifnum\fpeval{(\cmdstr at decor@type+1)*(\cmdstr at decor@type-2)}=0{
+\fpeval{\ind+1}
+}\else{\ifnum\fpeval{abs(\cmdstr at decor@type)}=3{
+\fpeval{\ind+\cmdstr at decor@nstr+1}
+}\else{\ifnum\fpeval{abs(\cmdstr at decor@type)}=4{
+\fpeval{\ind+1}'
+}\fi}\fi}\fi$};
+\fi
+\ifnum \cmdstr at decor@type=5
+\ifnum\ind<\fpeval{\cmdstr at decor@nstr/2} % labels from -2n to 2n.
+\node[scale=\cmdstr at decor@font]at
+(\fpeval{(\ind+\cmdstr at decor@nstr/2)*\cmdstr at decor@width},
+\fpeval{(\cmdstr at decor@floor+1)*\cmdstr at decor@height+\cmdstr at decor@labelver})
+{$\fpeval{\ind+1}$};
+\node[scale=\cmdstr at decor@font]at
+(\fpeval{\ind*\cmdstr at decor@width-\cmdstr at decor@labelhor},
+\fpeval{(\cmdstr at decor@floor+1)*\cmdstr at decor@height+\cmdstr at decor@labelver})
+{-$\fpeval{\cmdstr at decor@nstr/2-\ind}$};
+\node[scale=\cmdstr at decor@font]at
+(\fpeval{(\ind+\cmdstr at decor@nstr/2)*\cmdstr at decor@width},
+\fpeval{\cmdstr at decor@floor*\cmdstr at decor@height-\cmdstr at decor@labelver})
+{$\fpeval{\ind+\cmdstr at decor@nstr/2+1}$};
+\node[scale=\cmdstr at decor@font]at
+(\fpeval{\ind*\cmdstr at decor@width-\cmdstr at decor@labelhor},
+\fpeval{\cmdstr at decor@floor*\cmdstr at decor@height-\cmdstr at decor@labelver})
+{-$\fpeval{\cmdstr at decor@nstr-\ind}$};
+\fi
+\fi
+}
+}
+\makeatletter
+\define at cmdkey[str]{vvpart}{bend}{}
+\define at cmdkey[str]{vvpart}{bulla}{}
+\define at cmdkey[str]{vvpart}{bullb}{}
+\define at cmdkey[str]{vvpart}{bulletends}{}
+\define at cmdkey[str]{vvpart}{floor}{}
+\define at cmdkey[str]{vvpart}{font}{}
+\define at cmdkey[str]{vvpart}{height}{}
+\define at cmdkey[str]{vvpart}{labelver}{}
+\define at cmdkey[str]{vvpart}{labelhor}{}
+\define at cmdkey[str]{vvpart}{norma}{}
+\define at cmdkey[str]{vvpart}{normb}{}
+\define at cmdkey[str]{vvpart}{nstr}{}
+\define at cmdkey[str]{vvpart}{permut}{}
+\define at cmdkey[str]{vvpart}{reflect}{}
+\define at cmdkey[str]{vvpart}{strwidth}{}
+\define at cmdkey[str]{vvpart}{type}{}
+\define at cmdkey[str]{vvpart}{width}{}
+\presetkeys[str]{vvpart}{
+bend=\cmdstr at strands@bend,
+bulla=1,
+bullb=1,
+bulletends=\cmdstr at strands@bulletsize,
+floor=0,
+font=\cmdstr at strands@font,
+height=\cmdstr at strands@height,
+labelver=\cmdstr at strands@labelver,
+labelhor=\cmdstr at strands@labelhor,
+norma=\cmdstr at strands@norma,
+normb=\cmdstr at strands@normb,
+nstr=\cmdstr at strands@nstr,
+permut=0, % use 1 to draw permutations (to use with \permutation).
+reflect=0,
+strwidth=\cmdstr at strands@strwidth,
+type=3,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\vvpartition}[2][]{
+\setkeys[str]{vvpart}{#1} % set variables.
+\node[\cmdstr at strands@normcolor]at(0,\cmdstr at vvpart@norma){\cmdstr at strands@normsymbol};
+\node[\cmdstr at strands@normcolor]at(0,\cmdstr at vvpart@normb){\cmdstr at strands@normsymbol};
+\StrRemoveBraces{#2}[\nobracespart]
+\let\oldnumstrands\cmdstr at vvpart@nstr
+\renewcommand{\cmdstr at vvpart@nstr}
+{\fpeval{max(abs(min(\nobracespart)),abs(max(\nobracespart)),\fpeval{abs(\oldnumstrands)})}}
+\decoratestrands[
+bulla=\cmdstr at vvpart@bulla,
+bullb=\cmdstr at vvpart@bullb,
+bulletends=\cmdstr at vvpart@bulletends,
+floor=\cmdstr at vvpart@floor,
+font=\cmdstr at vvpart@font,
+height=\cmdstr at vvpart@height,
+labelver=\cmdstr at vvpart@labelver,
+labelhor=\cmdstr at vvpart@labelhor,
+nstr=\cmdstr at vvpart@nstr,
+type=\cmdstr at vvpart@type,
+width=\cmdstr at vvpart@width
+]
+\foreach\ind in{0,...,\fpeval{\cmdstr at vvpart@nstr-1}}{
+\ifnum\cmdstr at vvpart@permut=1
+\getelem{#2}{\fpeval{\ind+1}}{\index}
+\draw[line width=\cmdstr at vvpart@strwidth](\fpeval{\ind*\cmdstr at vvpart@width},
+\fpeval{\cmdstr at vvpart@height+\cmdstr at vvpart@floor*\cmdstr at vvpart@height})to
+(\fpeval{(\ifnum\fpeval{\index+0}>0 \index\else\fpeval{\ind+1}\fi-1)*
+\cmdstr at vvpart@width},\cmdstr at vvpart@floor*\cmdstr at vvpart@height);
+\fi
+}
+\ifnum\cmdstr at vvpart@permut=0 \foreach\block in{#2}{
+\StrCount{\block}{,}[\numcom]
+\ifnum\numcom>0\foreach\ind in {2,...,\fpeval{\numcom+1}}{
+\getelem{\block}{\fpeval{\ind-1}}{\firbul}
+\getelem{\block}{\ind}{\secbul}
+\ifnum \cmdstr at vvpart@reflect=1 % reflect connections vertically.
+\let\oldfirbul\firbul
+\renewcommand{\firbul}{-\oldfirbul}
+\let\oldsecbul\secbul
+\renewcommand{\secbul}{-\oldsecbul}
+\fi
+\draw[line width=\cmdstr at vvpart@strwidth]
+(\fpeval{(abs(\firbul)-1)*\cmdstr at vvpart@width},
+\ifnum\firbul>0
+\fpeval{(\cmdstr at vvpart@floor+1)*\cmdstr at vvpart@height}
+\else
+\fpeval{\cmdstr at vvpart@floor*\cmdstr at vvpart@height}
+\fi
+)
+to[bend right=\ifnum \fpeval{\firbul*\secbul}>0
+\fpeval{(\firbul/abs(\firbul))*((abs(\secbul)-abs(\firbul))/
+abs(abs(\secbul)-abs(\firbul)))*\cmdstr at vvpart@bend}
+\else
+0
+\fi]
+(\fpeval{(abs(\secbul)-1)*\cmdstr at vvpart@width},
+\ifnum\secbul>0
+\fpeval{(\cmdstr at vvpart@floor+1)*\cmdstr at vvpart@height}
+\else
+\fpeval{\cmdstr at vvpart@floor*\cmdstr at vvpart@height}
+\fi
+);
+}\fi
+}\fi
+}
+\makeatletter
+\define at cmdkey[str]{vpart}{bend}{}
+\define at cmdkey[str]{vpart}{bulla}{}
+\define at cmdkey[str]{vpart}{bullb}{}
+\define at cmdkey[str]{vpart}{bulletends}{}
+\define at cmdkey[str]{vpart}{floor}{}
+\define at cmdkey[str]{vpart}{font}{}
+\define at cmdkey[str]{vpart}{height}{}
+\define at cmdkey[str]{vpart}{labelver}{}
+\define at cmdkey[str]{vpart}{labelhor}{}
+\define at cmdkey[str]{vpart}{norma}{}
+\define at cmdkey[str]{vpart}{normb}{}
+\define at cmdkey[str]{vpart}{nstr}{}
+\define at cmdkey[str]{vpart}{permut}{}
+\define at cmdkey[str]{vpart}{reflect}{}
+\define at cmdkey[str]{vpart}{rotate}{}
+\define at cmdkey[str]{vpart}{scale}{}
+\define at cmdkey[str]{vpart}{strwidth}{}
+\define at cmdkey[str]{vpart}{tkzpic}{}
+\define at cmdkey[str]{vpart}{type}{}
+\define at cmdkey[str]{vpart}{width}{}
+\presetkeys[str]{vpart}{
+bend=\cmdstr at strands@bend,
+bulla=1,
+bullb=1,
+bulletends=\cmdstr at strands@bulletsize,
+floor=0,
+font=\cmdstr at strands@font,
+height=\cmdstr at strands@height,
+labelver=\cmdstr at strands@labelver,
+labelhor=\cmdstr at strands@labelhor,
+norma=\cmdstr at strands@norma,
+normb=\cmdstr at strands@normb,
+nstr=\cmdstr at strands@nstr,
+permut=0, % use 1 to draw permutations (to use with \permutation).
+reflect=0,
+rotate=\cmdstr at strands@rotate,
+scale=\cmdstr at strands@scale,
+strwidth=\cmdstr at strands@strwidth,
+tkzpic=\cmdstr at strands@tkzpic,
+type=3,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\vpartition}[2][]{
+\setkeys[str]{vpart}{#1} % set variables.
+\ifthenelse{\equal{\cmdstr at vpart@tkzpic}{1}}{
+\begin{tikzpicture}[rotate=\cmdstr at vpart@rotate,scale=\cmdstr at vpart@scale]
+\vvpartition[
+bend=\cmdstr at vpart@bend,
+bulla=\cmdstr at vpart@bulla,
+bullb=\cmdstr at vpart@bullb,
+bulletends=\cmdstr at vpart@bulletends,
+floor=\cmdstr at vpart@floor,
+font=\cmdstr at vpart@font,
+height=\cmdstr at vpart@height,
+labelver=\cmdstr at vpart@labelver,
+labelhor=\cmdstr at vpart@labelhor,
+norma=\cmdstr at vpart@norma,
+normb=\cmdstr at vpart@normb,
+nstr=\cmdstr at vpart@nstr,
+permut=\cmdstr at vpart@permut,
+reflect=\cmdstr at vpart@reflect,
+strwidth=\cmdstr at vpart@strwidth,
+type=\cmdstr at vpart@type,
+width=\cmdstr at vpart@width
+]{#2}
+\end{tikzpicture}
+}{
+\vvpartition[
+bend=\cmdstr at vpart@bend,
+bulla=\cmdstr at vpart@bulla,
+bullb=\cmdstr at vpart@bullb,
+bulletends=\cmdstr at vpart@bulletends,
+floor=\cmdstr at vpart@floor,
+font=\cmdstr at vpart@font,
+height=\cmdstr at vpart@height,
+labelver=\cmdstr at vpart@labelver,
+labelhor=\cmdstr at vpart@labelhor,
+norma=\cmdstr at vpart@norma,
+normb=\cmdstr at vpart@normb,
+nstr=\cmdstr at vpart@nstr,
+permut=\cmdstr at vpart@permut,
+reflect=\cmdstr at vpart@reflect,
+strwidth=\cmdstr at vpart@strwidth,
+type=\cmdstr at vpart@type,
+width=\cmdstr at vpart@width
+]{#2}
+}
+}
+\makeatletter
+\define at cmdkey[str]{apart}{bend}{}
+\define at cmdkey[str]{apart}{bull}{}
+\define at cmdkey[str]{apart}{bulletsize}{}
+\define at cmdkey[str]{apart}{floor}{}
+\define at cmdkey[str]{apart}{font}{}
+\define at cmdkey[str]{apart}{labelver}{}
+\define at cmdkey[str]{apart}{labelhor}{}
+\define at cmdkey[str]{apart}{norma}{}
+\define at cmdkey[str]{apart}{normb}{}
+\define at cmdkey[str]{apart}{num}{}
+\define at cmdkey[str]{apart}{rotate}{}
+\define at cmdkey[str]{apart}{scale}{}
+\define at cmdkey[str]{apart}{strwidth}{}
+\define at cmdkey[str]{apart}{tkzpic}{}
+\define at cmdkey[str]{apart}{type}{}
+\define at cmdkey[str]{apart}{width}{}
+\presetkeys[str]{apart}{
+bend=\cmdstr at strands@bend,
+bull=1,
+bulletsize=\cmdstr at strands@bulletsize,
+floor=0,
+font=\cmdstr at strands@font,
+labelver=\cmdstr at strands@labelver,
+labelhor=\cmdstr at strands@labelhor,
+norma=\cmdstr at strands@norma,
+normb=\cmdstr at strands@normb,
+num=\cmdstr at strands@num,
+rotate=\cmdstr at strands@rotate,
+scale=\cmdstr at strands@scale,
+strwidth=\cmdstr at strands@strwidth,
+tkzpic=\cmdstr at strands@tkzpic,
+type=1,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\arcpartition}[2][]{
+\setkeys[str]{apart}{#1}
+\vpartition[
+bend=\cmdstr at apart@bend,
+bulla=0, % no bullets above.
+bullb=\cmdstr at apart@bull,
+bulletends=\cmdstr at apart@bulletsize,
+floor=\cmdstr at apart@floor,
+font=\cmdstr at apart@font,
+labelver=\cmdstr at apart@labelver,
+labelhor=\cmdstr at apart@labelhor,
+norma=\cmdstr at apart@norma,
+normb=\cmdstr at apart@normb,
+nstr=\cmdstr at apart@num,
+reflect=1, % put connections below.
+rotate=\cmdstr at apart@rotate,
+scale=\cmdstr at apart@scale,
+strwidth=\cmdstr at apart@strwidth,
+tkzpic=\cmdstr at apart@tkzpic,
+type=-\cmdstr at apart@type,
+width=\cmdstr at apart@width
+]{#2}
+}
+\makeatletter
+\define at cmdkey[str]{perm}{bulla}{}
+\define at cmdkey[str]{perm}{bullb}{}
+\define at cmdkey[str]{perm}{bulletends}{}
+\define at cmdkey[str]{perm}{floor}{}
+\define at cmdkey[str]{perm}{font}{}
+\define at cmdkey[str]{perm}{height}{}
+\define at cmdkey[str]{perm}{labelver}{}
+\define at cmdkey[str]{perm}{labelhor}{}
+\define at cmdkey[str]{perm}{norma}{}
+\define at cmdkey[str]{perm}{normb}{}
+\define at cmdkey[str]{perm}{nstr}{}
+\define at cmdkey[str]{perm}{rotate}{}
+\define at cmdkey[str]{perm}{scale}{}
+\define at cmdkey[str]{perm}{strwidth}{}
+\define at cmdkey[str]{perm}{tkzpic}{}
+\define at cmdkey[str]{perm}{type}{}
+\define at cmdkey[str]{perm}{width}{}
+\presetkeys[str]{perm}{
+bulla=1,
+bullb=1,
+bulletends=\cmdstr at strands@bulletsize,
+floor=0,
+font=\cmdstr at strands@font,
+height=\cmdstr at strands@height,
+labelver=\cmdstr at strands@labelver,
+labelhor=\cmdstr at strands@labelhor,
+norma=\cmdstr at strands@norma,
+normb=\cmdstr at strands@normb,
+nstr=\cmdstr at strands@nstr,
+rotate=\cmdstr at strands@rotate,
+scale=\cmdstr at strands@scale,
+strwidth=\cmdstr at strands@strwidth,
+tkzpic=\cmdstr at strands@tkzpic,
+type=2,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\permutation}[2][]{
+\setkeys[str]{perm}{#1}
+\vpartition[
+bulla=\cmdstr at perm@bulla,
+bullb=\cmdstr at perm@bullb,
+bulletends=\cmdstr at perm@bulletends,
+floor=\cmdstr at perm@floor,
+font=\cmdstr at perm@font,
+height=\cmdstr at perm@height,
+labelver=\cmdstr at perm@labelver,
+labelhor=\cmdstr at perm@labelhor,
+norma=\cmdstr at perm@norma,
+normb=\cmdstr at perm@normb,
+nstr=\cmdstr at perm@nstr,
+permut=1, % permutation.
+rotate=\cmdstr at perm@rotate,
+scale=\cmdstr at perm@scale,
+strwidth=\cmdstr at perm@strwidth,
+tkzpic=\cmdstr at perm@tkzpic,
+type=\cmdstr at perm@type,
+width=\cmdstr at perm@width
+]{#2}
+}
+\makeatletter
+\define at cmdkey[str]{tpair}{above}{}
+\define at cmdkey[str]{tpair}{bend}{}
+\define at cmdkey[str]{tpair}{bulla}{}
+\define at cmdkey[str]{tpair}{bullb}{}
+\define at cmdkey[str]{tpair}{bulletends}{}
+\define at cmdkey[str]{tpair}{floor}{}
+\define at cmdkey[str]{tpair}{font}{}
+\define at cmdkey[str]{tpair}{height}{}
+\define at cmdkey[str]{tpair}{labelver}{}
+\define at cmdkey[str]{tpair}{labelhor}{}
+\define at cmdkey[str]{tpair}{norma}{}
+\define at cmdkey[str]{tpair}{normb}{}
+\define at cmdkey[str]{tpair}{nstr}{}
+\define at cmdkey[str]{tpair}{rotate}{}
+\define at cmdkey[str]{tpair}{scale}{}
+\define at cmdkey[str]{tpair}{strwidth}{}
+\define at cmdkey[str]{tpair}{tkzpic}{}
+\define at cmdkey[str]{tpair}{type}{}
+\define at cmdkey[str]{tpair}{width}{}
+\presetkeys[str]{tpair}{
+above=1,
+bend=\cmdstr at strands@bend,
+bulla=1,
+bullb=1,
+bulletends=\cmdstr at strands@bulletsize,
+floor=0,
+font=\cmdstr at strands@font,
+height=\cmdstr at strands@height,
+labelver=\cmdstr at strands@labelver,
+labelhor=\cmdstr at strands@labelhor,
+norma=\cmdstr at strands@norma,
+normb=\cmdstr at strands@normb,
+nstr=\cmdstr at strands@nstr,
+rotate=\cmdstr at strands@rotate,
+scale=\cmdstr at strands@scale,
+strwidth=\cmdstr at strands@strwidth,
+tkzpic=\cmdstr at strands@tkzpic,
+type=-1,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\tiedpair}[3][]{
+\setkeys[str]{tpair}{#1}
+\ifthenelse{\equal{\cmdstr at tpair@tkzpic}{1}}{
+\begin{tikzpicture}[rotate=\cmdstr at tpair@rotate,scale=\cmdstr at tpair@scale]
+\permutation[
+bulla=\cmdstr at tpair@bulla,
+bullb=\cmdstr at tpair@bullb,
+bulletends=\cmdstr at tpair@bulletends,
+floor=\cmdstr at tpair@floor,
+font=\cmdstr at tpair@font,
+height=\cmdstr at tpair@height,
+labelver=\cmdstr at tpair@labelver,
+labelhor=\cmdstr at tpair@labelhor,
+norma=\cmdstr at tpair@norma,
+normb=\cmdstr at tpair@normb,
+nstr=\cmdstr at tpair@nstr,
+strwidth=\cmdstr at tpair@strwidth,
+tkzpic=0,
+type=\cmdstr at tpair@type,
+width=\cmdstr at tpair@width
+]{#2}
+\arcpartition[
+bend=\cmdstr at tpair@bend,
+bull=0, % no bullets.
+bulletsize=\cmdstr at tpair@bulletsize,
+floor=\fpeval{\cmdstr at tpair@floor+\cmdstr at tpair@above*\cmdstr at tpair@height},
+tkzpic=0,
+type=0, % no labels.
+strwidth=\cmdstr at tpair@strwidth,
+width=\cmdstr at tpair@width
+]{#3}
+\end{tikzpicture}
+}{
+\permutation[
+bulla=\cmdstr at tpair@bulla,
+bullb=\cmdstr at tpair@bullb,
+bulletends=\cmdstr at tpair@bulletends,
+floor=\cmdstr at tpair@floor,
+font=\cmdstr at tpair@font,
+height=\cmdstr at tpair@height,
+labelver=\cmdstr at tpair@labelver,
+labelhor=\cmdstr at tpair@labelhor,
+norma=\cmdstr at tpair@norma,
+normb=\cmdstr at tpair@normb,
+nstr=\cmdstr at tpair@nstr,
+strwidth=\cmdstr at tpair@strwidth,
+tkzpic=0,
+type=\cmdstr at tpair@type,
+width=\cmdstr at tpair@width
+]{#2}
+\arcpartition[
+bend=\cmdstr at tpair@bend,
+bull=0, % no bullets.
+floor=\fpeval{\cmdstr at tpair@floor+\cmdstr at tpair@above*\cmdstr at tpair@height},
+tkzpic=0,
+type=0, % no labels.
+strwidth=\cmdstr at tpair@strwidth,
+width=\cmdstr at tpair@width
+]{#3}
+}
+}
+\makeatletter
+\define at cmdkey[str]{tie}{bend}{}
+\define at cmdkey[str]{tie}{bull}{}
+\define at cmdkey[str]{tie}{bulletie}{}
+\define at cmdkey[str]{tie}{floor}{}
+\define at cmdkey[str]{tie}{height}{}
+\define at cmdkey[str]{tie}{color}{}
+\define at cmdkey[str]{tie}{snake}{}
+\define at cmdkey[str]{tie}{snakeamp}{}
+\define at cmdkey[str]{tie}{snakends}{}
+\define at cmdkey[str]{tie}{snakelen}{}
+\define at cmdkey[str]{tie}{style}{}
+\define at cmdkey[str]{tie}{tieheight}{}
+\define at cmdkey[str]{tie}{tiewidth}{}
+\define at cmdkey[str]{tie}{width}{}
+\presetkeys[str]{tie}{
+bend=\cmdstr at strands@tiebend, % bend of the ties.
+bull=1, % use 1 to use bullets, 0 otherwise.
+bulletie=\cmdstr at strands@bulletsize,
+color=\cmdstr at strands@tiecolor, % color of the ties.
+floor=0, % the picture starts at floor*height.
+height=\cmdstr at strands@height, % height of the strands.
+snake=\cmdstr at strands@tiesnake, % true or false to snake the tie line.
+snakeamp=\cmdstr at strands@tiesnakeamp, % snake amplitude.
+snakends=\cmdstr at strands@tiesnakends, % snake lengths of ends.
+snakelen=\cmdstr at strands@tiesnakelen, % snake lengths.
+style=\cmdstr at strands@tiestyle, % type of the tie (solid, dashed, dotted, etc).
+tieheight=\cmdstr at strands@tieheight, % height of the tie respect to the global height.
+tiewidth=\cmdstr at strands@tiewidth, % width of the tie line.
+width=\cmdstr at strands@width % width between strands.
+}{}
+\newcommand{\tie}[2][]{
+\setkeys[str]{tie}{#1}
+\foreach\elem[count=\ind]in{#2}{
+\StrRemoveBraces{\elem}[\nobrace]
+\getelem{\nobrace}{1}{\elemwidth} % get width of elem.
+\getelem{\nobrace}{2}{\elemheight} % get height of elem.
+\StrCount{\nobrace}{,}[\elemcoms]
+\ifnum\elemcoms=0 \renewcommand{\elemheight}{\cmdstr at tie@tieheight}\fi % update height of elem.
+\ifnum \cmdstr at tie@bull=1
+\filldraw[\cmdstr at tie@color](\fpeval{(\elemwidth-1)*\cmdstr at tie@width},
+\fpeval{\elemheight*\cmdstr at tie@height+\cmdstr at tie@floor*\cmdstr at tie@height})
+circle(\cmdstr at tie@bulletie);
+\fi
+\ifnum\ind>1
+\getelem{#2}{\fpeval{\ind-1}}{\prevelem}
+\StrRemoveBraces{\prevelem}[\prevnobrace]
+\getelem{\prevnobrace}{1}{\prevelemwidth}
+\getelem{\prevnobrace}{2}{\prevelemheight}
+\StrCount{\prevnobrace}{,}[\prevelemcoms]
+\ifnum\prevelemcoms=0 \renewcommand{\prevelemheight}{\cmdstr at tie@tieheight}\fi
+\draw[
+bend right=\cmdstr at tie@bend,
+color=\cmdstr at tie@color,
+line width=\cmdstr at tie@tiewidth,
+decorate=\cmdstr at tie@snake,
+decoration={
+snake,
+amplitude=\cmdstr at tie@snakeamp,
+post length=\cmdstr at tie@snakends,
+pre length=\cmdstr at tie@snakends,
+segment length=\cmdstr at tie@snakelen
+},
+style=\cmdstr at tie@style
+]
+(\fpeval{(\elemwidth-1)*\cmdstr at tie@width},
+\fpeval{\elemheight*\cmdstr at tie@height+\cmdstr at tie@floor*\cmdstr at tie@height})to
+(\fpeval{(\prevelemwidth-1)*\cmdstr at tie@width},
+\fpeval{\prevelemheight*\cmdstr at tie@height+\cmdstr at tie@floor*\cmdstr at tie@height});
+\fi
+}
+}
+\makeatletter
+\define at cmdkey[str]{bbackstr}{cdnx}{}
+\define at cmdkey[str]{bbackstr}{cdny}{}
+\define at cmdkey[str]{bbackstr}{color}{}
+\define at cmdkey[str]{bbackstr}{height}{}
+\define at cmdkey[str]{bbackstr}{strwidth}{}
+\define at cmdkey[str]{bbackstr}{timeswidth}{}
+\define at cmdkey[str]{bbackstr}{width}{}
+\presetkeys[str]{bbackstr}{
+cdnx=nothing,
+cdny=nothing,
+height=\cmdstr at strands@height,
+strwidth=\cmdstr at strands@strwidth,
+timeswidth=\cmdstr at strands@timeswidth, % times the width of the back line is bigger.
+width=\cmdstr at strands@width
+}{}
+\newcommand{\bbackstrands}[1][]{ %
+\setkeys[str]{bbackstr}{#1}
+\draw[
+color=\cmdstr at strands@backcolor,
+line width=\fpeval{\cmdstr at bbackstr@timeswidth*\cmdstr at bbackstr@strwidth}pt
+](\cmdstr at bbackstr@cdnx,\cmdstr at bbackstr@cdny)
+to(\cmdstr at bbackstr@cdnx,\fpeval{\cmdstr at bbackstr@cdny-\cmdstr at bbackstr@height});
+\draw[
+color=\cmdstr at strands@backcolor,
+line width=\fpeval{\cmdstr at bbackstr@timeswidth*\cmdstr at bbackstr@strwidth}pt
+](\fpeval{\cmdstr at bbackstr@cdnx+\cmdstr at bbackstr@width},\cmdstr at bbackstr@cdny)
+to(\fpeval{\cmdstr at bbackstr@cdnx+\cmdstr at bbackstr@width},
+\fpeval{\cmdstr at bbackstr@cdny-\cmdstr at bbackstr@height});
+}
+\makeatletter
+\define at cmdkey[str]{lleftstr}{bend}{}
+\define at cmdkey[str]{lleftstr}{cdnx}{}
+\define at cmdkey[str]{lleftstr}{cdny}{}
+\define at cmdkey[str]{lleftstr}{color}{}
+\define at cmdkey[str]{lleftstr}{height}{}
+\define at cmdkey[str]{lleftstr}{strwidth}{}
+\define at cmdkey[str]{lleftstr}{width}{}
+\presetkeys[str]{lleftstr}{
+bend=\cmdstr at strands@bendbraid,
+cdnx=nothing,
+cdny=nothing,
+color=black,
+height=\cmdstr at strands@height,
+strwidth=\cmdstr at strands@strwidth,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\lleftstrand}[1][]{
+\setkeys[str]{lleftstr}{#1}
+\draw[
+color=\cmdstr at lleftstr@color,
+line width=\cmdstr at lleftstr@strwidth pt
+](\cmdstr at lleftstr@cdnx,\fpeval{\cmdstr at lleftstr@cdny+\cmdstr at strands@coverunion})
+to[bend right=\cmdstr at lleftstr@bend]
+(\fpeval{\cmdstr at lleftstr@cdnx+\cmdstr at lleftstr@width/2},
+\fpeval{\cmdstr at lleftstr@cdny-\cmdstr at lleftstr@height/2})
+to[bend left=\cmdstr at lleftstr@bend]
+(\fpeval{\cmdstr at lleftstr@cdnx+\cmdstr at lleftstr@width},
+\fpeval{\cmdstr at lleftstr@cdny-\cmdstr at lleftstr@height-\cmdstr at strands@coverunion});
+}
+\makeatletter
+\define at cmdkey[str]{rrightstr}{bend}{}
+\define at cmdkey[str]{rrightstr}{cdnx}{}
+\define at cmdkey[str]{rrightstr}{cdny}{}
+\define at cmdkey[str]{rrightstr}{color}{}
+\define at cmdkey[str]{rrightstr}{floor}{}
+\define at cmdkey[str]{rrightstr}{height}{}
+\define at cmdkey[str]{rrightstr}{strwidth}{}
+\define at cmdkey[str]{rrightstr}{width}{}
+\presetkeys[str]{rrightstr}{
+bend=\cmdstr at strands@bendbraid,
+cdnx=nothing,
+cdny=nothing,
+color=black,
+floor=0,
+height=\cmdstr at strands@height,
+strwidth=\cmdstr at strands@strwidth,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\rrightstrand}[1][]{ % color / init-x-coordinate / init-y-coordinate.
+\setkeys[str]{rrightstr}{#1}
+\draw[
+color=\cmdstr at rrightstr@color,
+line width=\cmdstr at rrightstr@strwidth pt
+](\fpeval{\cmdstr at rrightstr@cdnx+\cmdstr at rrightstr@width},
+\fpeval{\cmdstr at rrightstr@cdny+\cmdstr at strands@coverunion})
+to[bend left=\cmdstr at rrightstr@bend]
+(\fpeval{\cmdstr at rrightstr@cdnx+\cmdstr at rrightstr@width/2},
+\fpeval{\cmdstr at rrightstr@cdny-\cmdstr at rrightstr@height/2})
+to[bend right=\cmdstr at rrightstr@bend]
+(\cmdstr at rrightstr@cdnx,
+\fpeval{\cmdstr at rrightstr@cdny-\cmdstr at rrightstr@height-\cmdstr at strands@coverunion});
+}
+\makeatletter
+\define at cmdkey[str]{ccrossback}{cdnx}{}
+\define at cmdkey[str]{ccrossback}{cdny}{}
+\define at cmdkey[str]{ccrossback}{height}{}
+\define at cmdkey[str]{ccrossback}{width}{}
+\presetkeys[str]{ccrossback}{
+cdnx=nothing,
+cdny=nothing,
+height=\cmdstr at strands@height,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\ccrossback}[1][]{
+\setkeys[str]{ccrossback}{#1}
+\filldraw[\cmdstr at strands@backcolor]
+(\fpeval{\cmdstr at ccrossback@cdnx+\cmdstr at ccrossback@width/2},
+\fpeval{\cmdstr at ccrossback@cdny-\cmdstr at ccrossback@height/2})
+circle(\cmdstr at strands@braidcross pt);
+}
+\makeatletter
+\define at cmdkey[str]{bbraidgen}{bend}{}
+\define at cmdkey[str]{bbraidgen}{cdnx}{}
+\define at cmdkey[str]{bbraidgen}{cdny}{}
+\define at cmdkey[str]{bbraidgen}{colorleft}{}
+\define at cmdkey[str]{bbraidgen}{coloright}{}
+\define at cmdkey[str]{bbraidgen}{colorsingular}{}
+\define at cmdkey[str]{bbraidgen}{colorvirtual}{}
+\define at cmdkey[str]{bbraidgen}{height}{}
+\define at cmdkey[str]{bbraidgen}{strwidth}{}
+\define at cmdkey[str]{bbraidgen}{type}{}
+\define at cmdkey[str]{bbraidgen}{width}{}
+\presetkeys[str]{bbraidgen}{
+bend=\cmdstr at strands@bendbraid,
+cdnx=0,
+cdny=0,
+colorleft=black,
+coloright=black,
+colorsingular=black,
+colorvirtual=black,
+height=\cmdstr at strands@height,
+strwidth=\cmdstr at strands@strwidth,
+type=1, % negative-braid=-1 | positive-braid=1 | virtual-braid=2 | singular-braid=3
+width=\cmdstr at strands@width
+}{}
+\tikzset{
+cross/.style={ % node style to draw x--crosses inside nodes.
+path picture={
+   \draw[black]
+(path picture bounding box.south east)--
+(path picture bounding box.north west)
+(path picture bounding box.south west)--
+(path picture bounding box.north east);
+}
+}
+}
+\newcommand{\bbraidgen}[1][]{
+\setkeys[str]{bbraidgen}{#1}
+\bbackstrands[ % trivial two-strands-braid.
+cdnx=\cmdstr at bbraidgen@cdnx,
+cdny=\cmdstr at bbraidgen@cdny,
+height=\cmdstr at bbraidgen@height,
+strwidth=\cmdstr at bbraidgen@strwidth,
+width=\cmdstr at bbraidgen@width
+]
+\ifnum\cmdstr at bbraidgen@type<1 % negative generator.
+\rrightstrand[
+bend=\cmdstr at bbraidgen@bend,
+cdnx=\cmdstr at bbraidgen@cdnx,
+cdny=\cmdstr at bbraidgen@cdny,
+color=\cmdstr at bbraidgen@coloright,
+height=\cmdstr at bbraidgen@height,
+strwidth=\cmdstr at bbraidgen@strwidth,
+width=\cmdstr at bbraidgen@width
+]
+\ifnum\cmdstr at bbraidgen@type<2
+\ccrossback[
+cdnx=\cmdstr at bbraidgen@cdnx,
+cdny=\cmdstr at bbraidgen@cdny,
+height=\cmdstr at bbraidgen@height,
+width=\cmdstr at bbraidgen@width
+]
+\fi
+\lleftstrand[
+bend=\cmdstr at bbraidgen@bend,
+cdnx=\cmdstr at bbraidgen@cdnx,
+cdny=\cmdstr at bbraidgen@cdny,
+color=\cmdstr at bbraidgen@colorleft,
+height=\cmdstr at bbraidgen@height,
+strwidth=\cmdstr at bbraidgen@strwidth,
+width=\cmdstr at bbraidgen@width
+]
+\else % positive generator.
+\lleftstrand[
+bend=\cmdstr at bbraidgen@bend,
+cdnx=\cmdstr at bbraidgen@cdnx,
+cdny=\cmdstr at bbraidgen@cdny,
+color=\cmdstr at bbraidgen@colorleft,
+height=\cmdstr at bbraidgen@height,
+strwidth=\cmdstr at bbraidgen@strwidth,
+width=\cmdstr at bbraidgen@width
+]
+\ifnum\cmdstr at bbraidgen@type<2 % over-under circle only if type is one.
+\ccrossback[
+cdnx=\cmdstr at bbraidgen@cdnx,
+cdny=\cmdstr at bbraidgen@cdny,
+height=\cmdstr at bbraidgen@height,
+width=\cmdstr at bbraidgen@width
+]
+\fi
+\rrightstrand[
+bend=\cmdstr at bbraidgen@bend,
+cdnx=\cmdstr at bbraidgen@cdnx,
+cdny=\cmdstr at bbraidgen@cdny,
+color=\cmdstr at bbraidgen@coloright,
+height=\cmdstr at bbraidgen@height,
+strwidth=\cmdstr at bbraidgen@strwidth,
+width=\cmdstr at bbraidgen@width
+]
+\ifnum\cmdstr at bbraidgen@type=2 % virtual crossing.
+\node[
+circle,
+cross,
+draw=\cmdstr at bbraidgen@colorvirtual,
+fill=\cmdstr at strands@backcolor,
+inner sep=0,
+line width=\cmdstr at bbraidgen@strwidth,
+minimum width=\cmdstr at strands@braidvirtcross
+]
+at(\fpeval{\cmdstr at bbraidgen@cdnx+\cmdstr at bbraidgen@width/2},
+\fpeval{\cmdstr at bbraidgen@cdny-\cmdstr at bbraidgen@height/2}){};
+\fi
+\ifnum\cmdstr at bbraidgen@type=3 % singular crossing.
+\filldraw[\cmdstr at bbraidgen@colorsingular]
+(\fpeval{\cmdstr at bbraidgen@cdnx+\cmdstr at bbraidgen@width/2},
+\fpeval{\cmdstr at bbraidgen@cdny-\cmdstr at bbraidgen@height/2})
+circle(\cmdstr at strands@braidsingcross pt);
+\fi
+\fi
+}
+\makeatletter
+\define at cmdkey[str]{ttanglegen}{bend}{}
+\define at cmdkey[str]{ttanglegen}{cdnx}{}
+\define at cmdkey[str]{ttanglegen}{cdny}{}
+\define at cmdkey[str]{ttanglegen}{color}{}
+\define at cmdkey[str]{ttanglegen}{height}{}
+\define at cmdkey[str]{ttanglegen}{strwidth}{}
+\define at cmdkey[str]{ttanglegen}{tiecolor}{}
+\define at cmdkey[str]{ttanglegen}{tied}{}
+\define at cmdkey[str]{ttanglegen}{tiesnake}{}
+\define at cmdkey[str]{ttanglegen}{tiesnakeamp}{}
+\define at cmdkey[str]{ttanglegen}{tiesnakelen}{}
+\define at cmdkey[str]{ttanglegen}{tiesnakends}{}
+\define at cmdkey[str]{ttanglegen}{tiestyle}{}
+\define at cmdkey[str]{ttanglegen}{tiewidth}{}
+\define at cmdkey[str]{ttanglegen}{width}{}
+\presetkeys[str]{ttanglegen}{
+bend=\cmdstr at strands@bendtangle,
+cdnx=0,
+cdny=0,
+color=black,
+height=\cmdstr at strands@height,
+strwidth=\cmdstr at strands@strwidth,
+tiecolor=\cmdstr at strands@tiecolor,
+tied=0,
+tiesnake=\cmdstr at strands@tiesnake,
+tiesnakeamp=\cmdstr at strands@tiesnakeamp,
+tiesnakelen=\cmdstr at strands@tiesnakelen,
+tiesnakends=\cmdstr at strands@tiesnakends,
+tiestyle=\cmdstr at strands@tiestyle,
+tiewidth=\cmdstr at strands@tiewidth,
+width=\cmdstr at strands@width 
+}{}
+\newcommand{\ttanglegen}[1][]{
+\setkeys[str]{ttanglegen}{#1}
+\bbackstrands[ % trivial two-strands-braid.
+cdnx=\cmdstr at ttanglegen@cdnx,
+cdny=\cmdstr at ttanglegen@cdny,
+height=\cmdstr at ttanglegen@height,
+strwidth=\cmdstr at ttanglegen@strwidth,
+width=\cmdstr at ttanglegen@width
+]
+\draw[
+bend right=\cmdstr at strands@bendtangle,
+color=\cmdstr at ttanglegen@color,
+line width=\cmdstr at strands@strwidth
+](\cmdstr at ttanglegen@cdnx,\fpeval{\cmdstr at ttanglegen@cdny+\cmdstr at strands@coverunion})
+to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width/2},
+\fpeval{\cmdstr at ttanglegen@cdny-\cmdstr at ttanglegen@height/3+0.03})
+to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width},
+\fpeval{\cmdstr at ttanglegen@cdny+\cmdstr at strands@coverunion});
+\draw[
+bend left=\cmdstr at strands@bendtangle,
+color=\cmdstr at ttanglegen@color,
+line width=\cmdstr at strands@strwidth
+](\cmdstr at ttanglegen@cdnx,
+\fpeval{\cmdstr at ttanglegen@cdny-\cmdstr at ttanglegen@height-\cmdstr at strands@coverunion})
+to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width/2},
+\fpeval{\cmdstr at ttanglegen@cdny-(2*\cmdstr at ttanglegen@height)/3-0.03})
+to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width},
+\fpeval{\cmdstr at ttanglegen@cdny-\cmdstr at ttanglegen@height-\cmdstr at strands@coverunion});
+\ifnum\cmdstr at ttanglegen@tied=1 % tied version.
+\draw[
+color=\cmdstr at ttanglegen@tiecolor,
+line width=\cmdstr at ttanglegen@tiewidth,
+decorate=\cmdstr at ttanglegen@tiesnake,
+decoration={
+snake,
+amplitude=\cmdstr at ttanglegen@tiesnakeamp,
+post length=\cmdstr at ttanglegen@tiesnakends,
+pre length=\cmdstr at ttanglegen@tiesnakends,
+segment length=\cmdstr at ttanglegen@tiesnakelen
+},
+style=\cmdstr at ttanglegen@tiestyle
+](\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width/2},
+\fpeval{\cmdstr at ttanglegen@cdny-\cmdstr at ttanglegen@height/3+0.03})
+to(\fpeval{\cmdstr at ttanglegen@cdnx+\cmdstr at ttanglegen@width/2},
+\fpeval{\cmdstr at ttanglegen@cdny-(2*\cmdstr at ttanglegen@height)/3-0.03});
+\fi
+}
+\makeatletter
+\define at cmdkey[str]{aaddgen}{bendbraid}{}
+\define at cmdkey[str]{aaddgen}{bendtangle}{}
+\define at cmdkey[str]{aaddgen}{direction}{}
+\define at cmdkey[str]{aaddgen}{floor}{}
+\define at cmdkey[str]{aaddgen}{generator}{}
+\define at cmdkey[str]{aaddgen}{height}{}
+\define at cmdkey[str]{aaddgen}{level}{}
+\define at cmdkey[str]{aaddgen}{numlevs}{}
+\define at cmdkey[str]{aaddgen}{posx}{}
+\define at cmdkey[str]{aaddgen}{posy}{}
+\define at cmdkey[str]{aaddgen}{strwidth}{}
+\define at cmdkey[str]{aaddgen}{tiebull}{}
+\define at cmdkey[str]{aaddgen}{tiebullsize}{}
+\define at cmdkey[str]{aaddgen}{tiecolor}{}
+\define at cmdkey[str]{aaddgen}{tieheight}{}
+\define at cmdkey[str]{aaddgen}{tiesnake}{}
+\define at cmdkey[str]{aaddgen}{tiesnakeamp}{}
+\define at cmdkey[str]{aaddgen}{tiesnakends}{}
+\define at cmdkey[str]{aaddgen}{tiesnakelen}{}
+\define at cmdkey[str]{aaddgen}{tiestyle}{}
+\define at cmdkey[str]{aaddgen}{tiewidth}{}
+\define at cmdkey[str]{aaddgen}{width}{}
+\presetkeys[str]{aaddgen}{
+bendbraid=\cmdstr at strands@bendbraid,
+bendtangle=\cmdstr at strands@bendtangle,
+direction=\cmdstr at strands@direction,
+floor=0,
+generator=s1,
+height=\cmdstr at strands@height,
+level=0,
+numlevs=0,
+posx=nothing, % internal.
+posy=nothing, % internal.
+strwidth=\cmdstr at strands@strwidth,
+tiebull=\cmdstr at strands@tiebull,
+tiebullsize=\cmdstr at strands@tiebullsize,
+tiecolor=\cmdstr at strands@tiecolor,
+tieheight=\cmdstr at strands@tieheight, 
+tiesnake=\cmdstr at strands@tiesnake,
+tiesnakeamp=\cmdstr at strands@tiesnakeamp,
+tiesnakends=\cmdstr at strands@tiesnakends,
+tiesnakelen=\cmdstr at strands@tiesnakelen,
+tiestyle=\cmdstr at strands@tiestyle,
+tiewidth=\cmdstr at strands@tiewidth,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\aaddgen}[1][]{
+\setkeys[str]{aaddgen}{#1}
+\StrChar{\cmdstr at aaddgen@generator}{1}[\firstchar]
+\StrBehind{\cmdstr at aaddgen@generator}{\firstchar}[\numstrand]
+\renewcommand{\cmdstr at aaddgen@posx}{\fpeval{(\numstrand-1)*\cmdstr at aaddgen@width}}
+\ifnum\cmdstr at aaddgen@direction=1
+\renewcommand{\cmdstr at aaddgen@posy}{\fpeval{(\cmdstr at aaddgen@numlevs+2+\cmdstr at aaddgen@floor-\cmdstr at aaddgen@level)*\cmdstr at aaddgen@height}}
+\fi 
+\ifnum\cmdstr at aaddgen@direction=0
+\renewcommand{\cmdstr at aaddgen@posy}{\fpeval{\cmdstr at aaddgen@level*\cmdstr at aaddgen@height}}
+\fi
+\ifthenelse{\equal{\firstchar}{\cmdstr at strands@gencharnegbraid}}{
+\bbraidgen[
+bend=\cmdstr at aaddgen@bendbraid,
+cdnx=\cmdstr at aaddgen@posx,
+cdny=\cmdstr at aaddgen@posy,
+height=\cmdstr at aaddgen@height,
+strwidth=\cmdstr at aaddgen@strwidth,
+type=-1,
+width=\cmdstr at aaddgen@width
+]
+}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@gencharposbraid}}{
+\bbraidgen[
+bend=\cmdstr at aaddgen@bendbraid,
+cdnx=\cmdstr at aaddgen@posx,
+cdny=\cmdstr at aaddgen@posy,
+height=\cmdstr at aaddgen@height,
+strwidth=\cmdstr at aaddgen@strwidth,
+type=1,
+width=\cmdstr at aaddgen@width
+]
+}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@gencharvirtual}}{
+\bbraidgen[
+bend=\cmdstr at aaddgen@bendbraid,
+cdnx=\cmdstr at aaddgen@posx,
+cdny=\cmdstr at aaddgen@posy,
+height=\cmdstr at aaddgen@height,
+strwidth=\cmdstr at aaddgen@strwidth,
+type=2,
+width=\cmdstr at aaddgen@width
+]
+}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@gencharsingular}}{
+\bbraidgen[
+bend=\cmdstr at aaddgen@bendbraid,
+cdnx=\cmdstr at aaddgen@posx,
+cdny=\cmdstr at aaddgen@posy,
+height=\cmdstr at aaddgen@height,
+strwidth=\cmdstr at aaddgen@strwidth,
+type=3,
+width=\cmdstr at aaddgen@width
+]
+}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@genchartangle}}{
+\ttanglegen[
+bend=\cmdstr at aaddgen@bendtangle,
+cdnx=\cmdstr at aaddgen@posx,
+cdny=\cmdstr at aaddgen@posy,
+height=\cmdstr at aaddgen@height,
+strwidth=\cmdstr at aaddgen@strwidth,
+tied=0,
+width=\cmdstr at aaddgen@width
+]
+}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@genchartie}}{
+\tie[
+bull=\cmdstr at aaddgen@tiebull,
+bulletie=\cmdstr at aaddgen@tiebullsize, %%%%%%%%%%%%%%%%%%%%%
+color=\cmdstr at aaddgen@tiecolor,
+height=\cmdstr at aaddgen@height,
+floor=\fpeval{\cmdstr at aaddgen@posy-1},
+snake=\cmdstr at aaddgen@tiesnake,
+snakeamp=\cmdstr at aaddgen@tiesnakeamp,
+snakelen=\cmdstr at aaddgen@tiesnakelen,
+snakends=\cmdstr at aaddgen@tiesnakends,
+style=\cmdstr at aaddgen@tiestyle,
+tieheight=\cmdstr at aaddgen@tieheight,
+tiewidth=\cmdstr at aaddgen@tiewidth,
+width=\cmdstr at aaddgen@width
+]{\numstrand,\fpeval{\numstrand+1}}
+}{\ifthenelse{\equal{\firstchar}{\cmdstr at strands@genchartiedtangle}}{
+\ttanglegen[
+bend=\cmdstr at aaddgen@bendtangle,
+cdnx=\cmdstr at aaddgen@posx,
+cdny=\cmdstr at aaddgen@posy,
+height=\cmdstr at aaddgen@height,
+strwidth=\cmdstr at aaddgen@strwidth,
+tiecolor=\cmdstr at aaddgen@tiecolor,
+tied=1,
+tiesnake=\cmdstr at aaddgen@tiesnake,
+tiesnakeamp=\cmdstr at aaddgen@tiesnakeamp,
+tiesnakelen=\cmdstr at aaddgen@tiesnakelen,
+tiesnakends=\cmdstr at aaddgen@tiesnakends,
+tiestyle=\cmdstr at aaddgen@tiestyle,
+tiewidth=\cmdstr at aaddgen@tiewidth,
+width=\cmdstr at aaddgen@width
+]
+}{DO NOTHING!}}}}}}} % \ifthenelse always use "else", so it will do nothing if other letter.
+}
+\makeatletter
+\define at cmdkey[str]{ggens}{bendbraid}{}
+\define at cmdkey[str]{ggens}{bendtangle}{}
+\define at cmdkey[str]{ggens}{bulla}{}
+\define at cmdkey[str]{ggens}{bullb}{}
+\define at cmdkey[str]{ggens}{bulletends}{}
+\define at cmdkey[str]{ggens}{direction}{}
+\define at cmdkey[str]{ggens}{floor}{}
+\define at cmdkey[str]{ggens}{font}{}
+\define at cmdkey[str]{ggens}{height}{}
+\define at cmdkey[str]{ggens}{labelver}{}
+\define at cmdkey[str]{ggens}{labelhor}{}
+\define at cmdkey[str]{ggens}{nstr}{}
+\define at cmdkey[str]{ggens}{nstrsave}{}
+\define at cmdkey[str]{ggens}{strwidth}{}
+\define at cmdkey[str]{ggens}{tiebull}{}
+\define at cmdkey[str]{ggens}{tiebullsize}{}
+\define at cmdkey[str]{ggens}{tiecolor}{}
+\define at cmdkey[str]{ggens}{tieheight}{}
+\define at cmdkey[str]{ggens}{tiesnake}{}
+\define at cmdkey[str]{ggens}{tiesnakeamp}{}
+\define at cmdkey[str]{ggens}{tiesnakends}{}
+\define at cmdkey[str]{ggens}{tiesnakelen}{}
+\define at cmdkey[str]{ggens}{tiestyle}{}
+\define at cmdkey[str]{ggens}{tiewidth}{}
+\define at cmdkey[str]{ggens}{type}{}
+\define at cmdkey[str]{ggens}{width}{}
+\presetkeys[str]{ggens}{
+bendbraid=\cmdstr at strands@bendbraid,
+bendtangle=\cmdstr at strands@bendtangle,
+bulla=1,
+bullb=1,
+bulletends=\cmdstr at strands@bulletsize,
+direction=\cmdstr at strands@direction,
+floor=0,
+font=\cmdstr at strands@font,
+height=\cmdstr at strands@height,
+labelver=\cmdstr at strands@labelver,
+labelhor=\cmdstr at strands@labelhor,
+nstr=0,
+nstrsave=0,
+strwidth=\cmdstr at strands@strwidth,
+tiebull=\cmdstr at strands@tiebull,
+tiebullsize=\cmdstr at strands@tiebullsize,
+tiecolor=\cmdstr at strands@tiecolor,
+tieheight=\cmdstr at strands@tieheight, 
+tiesnake=\cmdstr at strands@tiesnake,
+tiesnakeamp=\cmdstr at strands@tiesnakeamp,
+tiesnakends=\cmdstr at strands@tiesnakends,
+tiesnakelen=\cmdstr at strands@tiesnakelen,
+tiestyle=\cmdstr at strands@tiestyle,
+tiewidth=\cmdstr at strands@tiewidth,
+type=3,
+width=\cmdstr at strands@width
+}{}
+\newcounter{levelscounter} % count levels.
+\newcommand{\sstrands}[2][]{
+\setkeys[str]{ggens}{#1}
+\StrSubstitute{#2}{ }{}[\cmdstr at ggens@nstrsave] % remove whitespaces.
+\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@gencharposbraid}{}[\cmdstr at ggens@nstrsave]
+\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@gencharnegbraid}{}[\cmdstr at ggens@nstrsave]
+\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@gencharvirtual}{}[\cmdstr at ggens@nstrsave]
+\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@gencharsingular}{}[\cmdstr at ggens@nstrsave]
+\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@genchartangle}{}[\cmdstr at ggens@nstrsave]
+\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@genchartie}{}[\cmdstr at ggens@nstrsave]
+\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@genchartiedtangle}{}[\cmdstr at ggens@nstrsave]
+\StrSubstitute{\cmdstr at ggens@nstrsave}{\cmdstr at strands@genchartrivial}{}[\cmdstr at ggens@nstrsave]
+\StrSubstitute{\cmdstr at ggens@nstrsave}{*}{,}[\cmdstr at ggens@nstrsave]
+\StrSubstitute{\cmdstr at ggens@nstrsave}{-}{,}[\cmdstr at ggens@nstrsave]
+\let\oldnstr\cmdstr at ggens@nstr
+\renewcommand{\cmdstr at ggens@nstr}{\fpeval{max(max(\cmdstr at ggens@nstrsave)+1,\oldnstr)}}
+\StrCount{#2}{*}[\numlevs]
+\permutation[ % backstrands.
+bulla=0,
+bullb=0,
+floor=\fpeval{\cmdstr at ggens@floor/((\numlevs+1)*\cmdstr at ggens@height)}, % ??????????????
+height=\fpeval{(\numlevs+1)*\cmdstr at ggens@height},
+nstr=\cmdstr at ggens@nstr,
+tkzpic=0,
+type=0
+]{1}
+\setcounter{levelscounter}{0}
+\ForEach{*}{ % for each level.
+\stepcounter{levelscounter}
+\ForEachSublevel{-}{ % for each generator in level.
+\aaddgen[ % add the generator.
+bendbraid=\cmdstr at ggens@bendbraid,
+bendtangle=\cmdstr at ggens@bendtangle,
+direction=\cmdstr at ggens@direction,
+floor=\cmdstr at ggens@floor,
+generator=\thislevelitem,
+height=\cmdstr at ggens@height,
+level=\thelevelscounter,
+numlevs=\numlevs,
+strwidth=\cmdstr at ggens@strwidth,
+tiebull=\cmdstr at ggens@tiebull,
+tiebullsize=\cmdstr at ggens@tiebullsize,
+tiecolor=\cmdstr at ggens@tiecolor,
+tieheight=\cmdstr at ggens@tieheight, 
+tiesnake=\cmdstr at ggens@tiesnake,
+tiesnakeamp=\cmdstr at ggens@tiesnakeamp,
+tiesnakends=\cmdstr at ggens@tiesnakends,
+tiesnakelen=\cmdstr at ggens@tiesnakelen,
+tiestyle=\cmdstr at ggens@tiestyle,
+tiewidth=\cmdstr at ggens@tiewidth,
+width=\cmdstr at ggens@width
+]
+}
+}{#2}
+\decoratestrands[
+bulla=\cmdstr at ggens@bulla,
+bullb=\cmdstr at ggens@bullb,
+bulletends=\cmdstr at ggens@bulletends,
+floor=\fpeval{\cmdstr at ggens@floor/((\numlevs+1)*\cmdstr at ggens@height)},
+font=\cmdstr at ggens@font,
+height=\fpeval{(\numlevs+1)*\cmdstr at ggens@height},
+labelver=\cmdstr at ggens@labelver,
+labelhor=\cmdstr at ggens@labelhor,
+nstr=\cmdstr at ggens@nstr,
+type=\cmdstr at ggens@type,
+width=\cmdstr at ggens@width
+]
+}
+\makeatletter
+\define at cmdkey[str]{gens}{bendbraid}{}
+\define at cmdkey[str]{gens}{bendtangle}{}
+\define at cmdkey[str]{gens}{bulla}{}
+\define at cmdkey[str]{gens}{bullb}{}
+\define at cmdkey[str]{gens}{bulletends}{}
+\define at cmdkey[str]{gens}{direction}{}
+\define at cmdkey[str]{gens}{floor}{}
+\define at cmdkey[str]{gens}{font}{}
+\define at cmdkey[str]{gens}{height}{}
+\define at cmdkey[str]{gens}{labelver}{}
+\define at cmdkey[str]{gens}{labelhor}{}
+\define at cmdkey[str]{gens}{nstr}{}
+\define at cmdkey[str]{gens}{nstrsave}{}
+\define at cmdkey[str]{gens}{rotate}{}
+\define at cmdkey[str]{gens}{scale}{}
+\define at cmdkey[str]{gens}{strwidth}{}
+\define at cmdkey[str]{gens}{tiebull}{}
+\define at cmdkey[str]{gens}{tiebullsize}{}
+\define at cmdkey[str]{gens}{tiecolor}{}
+\define at cmdkey[str]{gens}{tieheight}{}
+\define at cmdkey[str]{gens}{tiesnake}{}
+\define at cmdkey[str]{gens}{tiesnakeamp}{}
+\define at cmdkey[str]{gens}{tiesnakends}{}
+\define at cmdkey[str]{gens}{tiesnakelen}{}
+\define at cmdkey[str]{gens}{tiestyle}{}
+\define at cmdkey[str]{gens}{tiewidth}{}
+\define at cmdkey[str]{gens}{tkzpic}{}
+\define at cmdkey[str]{gens}{type}{}
+\define at cmdkey[str]{gens}{width}{}
+\presetkeys[str]{gens}{
+bendbraid=\cmdstr at strands@bendbraid,
+bendtangle=\cmdstr at strands@bendtangle,
+bulla=1,
+bullb=1,
+bulletends=\cmdstr at strands@bulletsize,
+direction=\cmdstr at strands@direction,
+floor=0,
+font=\cmdstr at strands@font,
+height=\cmdstr at strands@height,
+labelver=\cmdstr at strands@labelver,
+labelhor=\cmdstr at strands@labelhor,
+nstr=0,
+nstrsave=0,
+rotate=\cmdstr at strands@rotate,
+scale=\cmdstr at strands@scale,
+strwidth=\cmdstr at strands@strwidth,
+tiebull=\cmdstr at strands@tiebull,
+tiebullsize=\cmdstr at strands@tiebullsize,
+tiecolor=\cmdstr at strands@tiecolor,
+tieheight=\cmdstr at strands@tieheight, 
+tiesnake=\cmdstr at strands@tiesnake,
+tiesnakeamp=\cmdstr at strands@tiesnakeamp,
+tiesnakends=\cmdstr at strands@tiesnakends,
+tiesnakelen=\cmdstr at strands@tiesnakelen,
+tiestyle=\cmdstr at strands@tiestyle,
+tiewidth=\cmdstr at strands@tiewidth,
+tkzpic=\cmdstr at strands@tkzpic,
+type=3,
+width=\cmdstr at strands@width
+}{}
+\newcommand{\strands}[2][]{
+\setkeys[str]{gens}{#1}
+\ifthenelse{\equal{\cmdstr at gens@tkzpic}{1}}{
+\begin{tikzpicture}[rotate=\cmdstr at gens@rotate,scale=\cmdstr at gens@scale]
+\sstrands[
+bendbraid=\cmdstr at gens@bendbraid,
+bendtangle=\cmdstr at gens@bendtangle,
+bulla=\cmdstr at gens@bulla,
+bullb=\cmdstr at gens@bullb,
+bulletends=\cmdstr at gens@bulletends,
+direction=\cmdstr at gens@direction,
+floor=\cmdstr at gens@floor,
+font=\cmdstr at gens@font,
+height=\cmdstr at gens@height,
+labelver=\cmdstr at gens@labelver,
+labelhor=\cmdstr at gens@labelhor,
+nstr=\cmdstr at gens@nstr,
+nstrsave=\cmdstr at gens@nstrsave,
+strwidth=\cmdstr at gens@strwidth,
+tiebull=\cmdstr at gens@tiebull,
+tiebullsize=\cmdstr at gens@tiebullsize,
+tiecolor=\cmdstr at gens@tiecolor,
+tieheight=\cmdstr at gens@tieheight,
+tiesnake=\cmdstr at gens@tiesnake,
+tiesnakeamp=\cmdstr at gens@tiesnakeamp,
+tiesnakends=\cmdstr at gens@tiesnakends,
+tiesnakelen=\cmdstr at gens@tiesnakelen,
+tiestyle=\cmdstr at gens@tiestyle,
+tiewidth=\cmdstr at gens@tiewidth,
+type=\cmdstr at gens@type,
+width=\cmdstr at gens@width
+]{#2}
+\end{tikzpicture}
+}{
+\sstrands[
+bendbraid=\cmdstr at gens@bendbraid,
+bendtangle=\cmdstr at gens@bendtangle,
+bulla=\cmdstr at gens@bulla,
+bullb=\cmdstr at gens@bullb,
+bulletends=\cmdstr at gens@bulletends,
+direction=\cmdstr at gens@direction,
+floor=\cmdstr at gens@floor,
+font=\cmdstr at gens@font,
+height=\cmdstr at gens@height,
+labelver=\cmdstr at gens@labelver,
+labelhor=\cmdstr at gens@labelhor,
+nstr=\cmdstr at gens@nstr,
+nstrsave=\cmdstr at gens@nstrsave,
+strwidth=\cmdstr at gens@strwidth,
+tiebull=\cmdstr at gens@tiebull,
+tiebullsize=\cmdstr at gens@tiebullsize,
+tiecolor=\cmdstr at gens@tiecolor,
+tieheight=\cmdstr at gens@tieheight,
+tiesnake=\cmdstr at gens@tiesnake,
+tiesnakeamp=\cmdstr at gens@tiesnakeamp,
+tiesnakends=\cmdstr at gens@tiesnakends,
+tiesnakelen=\cmdstr at gens@tiesnakelen,
+tiestyle=\cmdstr at gens@tiestyle,
+tiewidth=\cmdstr at gens@tiewidth,
+type=\cmdstr at gens@type,
+width=\cmdstr at gens@width
+]{#2}
+}
+}%    \end{macrocode}
+
+\endinput
+%%
+%% End of file `strands.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/strands/strands.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-07-05 20:50:36 UTC (rev 59837)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-07-05 20:52:31 UTC (rev 59838)
@@ -718,7 +718,7 @@
     stdclsdv stdpage stealcaps steinmetz
     stellenbosch step stepgreek stex
     stickstoo stix stix2-otf stix2-type1 stmaryrd storebox storecmd
-    stricttex stringenc stringstrings structmech struktex
+    strands stricttex stringenc stringstrings structmech struktex
     sttools stubs studenthandouts sty2dtx suanpan
     subdocs subdepth subeqn subeqnarray
     subfig subfigmat subfigure subfiles subfloat substances

Modified: trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2021-07-05 20:50:36 UTC (rev 59837)
+++ trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2021-07-05 20:52:31 UTC (rev 59838)
@@ -147,6 +147,7 @@
 depend smartdiagram
 depend spath3
 depend spectralsequences
+depend strands
 depend swimgraf
 depend syntaxdi
 depend table-fct

Added: trunk/Master/tlpkg/tlpsrc/strands.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.