diff options
author | Norbert Preining <norbert@preining.info> | 2022-10-27 03:01:07 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-10-27 03:01:07 +0000 |
commit | 876d640726265ada7e067f22dda368dd49ed9ad1 (patch) | |
tree | 8a7e5c35cb74a7fcf340169e19efcf89ffe06f68 /graphics/pgf/contrib/braids/braids.tex | |
parent | fac21618bdcd44d7ca47228c8b856488b12ee6a2 (diff) |
CTAN sync 202210270300
Diffstat (limited to 'graphics/pgf/contrib/braids/braids.tex')
-rw-r--r-- | graphics/pgf/contrib/braids/braids.tex | 55 |
1 files changed, 49 insertions, 6 deletions
diff --git a/graphics/pgf/contrib/braids/braids.tex b/graphics/pgf/contrib/braids/braids.tex index 7dab9f0873..fa99fd937b 100644 --- a/graphics/pgf/contrib/braids/braids.tex +++ b/graphics/pgf/contrib/braids/braids.tex @@ -10,7 +10,15 @@ \usepackage{listings} \lstloadlanguages{[LaTeX]TeX} -\lstset{breakatwhitespace=true,breaklines=true,language=TeX} + \lstset{ + gobble=2, + breakatwhitespace=true, + breaklines=true, + language=[LaTeX]TeX, + basicstyle=\small\ttfamily, + keepspaces=true, + columns=fullflexible +} \usepackage{fancyvrb} @@ -21,7 +29,6 @@ \begin{center} \setlength{\parindent}{0pt} \fbox{\begin{minipage}{.9\linewidth} - \lstset{breakatwhitespace=true,breaklines=true,language=TeX,basicstyle=\small} \lstinputlisting[]{example.out} \end{minipage}} @@ -105,15 +112,27 @@ The usual syntax for this is as follows: \DescribeMacro{braid-word} The \Verb+braid-word+ is an expression in the braid group, such as \Verb+s_1 s_2^{-1} s_{3,5}+. The generator labels are not significant. -If the subscript is a single number, as in \Verb+s_2+, the crossing goes from that number over the next. -If the subscript is two numbers, as in \Verb+s_{2,4}+, the crossing goes from the first over the second, with both the crossing strands passing over all of the intervening strands. + +The subscript determines how the strands cross, as follows: +\begin{enumerate} +\item If the subscript is a single number, as in \Verb+s_2+, the crossing goes from that number over the next. +\item If the subscript is two or more numbers separated by a comma, as in \Verb+s_{2,4}+ or \Verb+s_{1,3,5}+, imagine holding the numbered strands and moving each to the position of the next with the last strand moving under the others to where the first stands. +Any intermediate non-specified strand is behind all those involved in the crossing. +\item If the subscript is hyphenated, as in \Verb+s_{1-5}+, this is equivalent to \Verb+s_{1,2,3,4,5}+. +This can be used as part of a list, as in \Verb+s_{1-3,5}+. +\end{enumerate} + +All of these crossings take place in the same amount of vertical space. +Be advised that crossings involving a lot of strands can get quite squashed. + The exponent can be \Verb+1+, \Verb+{-1}+, or missing (in which case it defaults to \Verb+1+, note also that the exponent is read as a \TeX-token so \Verb+{1}+ is also legal). -If the exponent is \(-1\) then the over and under strands swap. +If the exponent is \(-1\) then the braid element represented by the crossing is inverted. \begin{itemize} \item \Verb+s_1+ is strand \(1\) over strand \(2\). \item \Verb+s_1^{-1}+ is strand \(2\) over strand \(1\). \item \Verb+s_{1,3}+ is strand \(1\) over strand \(3\), and both are over strand \(2\). +\item \Verb+s_{1-3}+ is strand \(3\) under strand \(2\) and then under strand \(1\). \end{itemize} Certain other symbols are allowed in the \Verb+braid-word+ which control the rendering of the braid. @@ -217,9 +236,13 @@ With a \Verb+name prefix+, the coordinate names look like the following: The crossing number can also be either \Verb+s+ or \Verb+e+ for the start and end of the strand. Note that \Verb+-1-0+ and \Verb+-1-s+ are slightly different in that \Verb+s+ includes the border height. +In addition, if the braid is named then a rectangular node is defined that fits around the whole braid. +This node is not actually rendered but its anchors can be used afterwards as if it had been. + \DescribeMacro{anchor} The key \Verb+anchor+ (in the \Verb+braid+ name space) can be used to shift the braid so that a different part of it is at the specified location. -It uses the same syntax as the coordinates, except without the \Verb+<name prefix>-+. +If the argument contains a hyphen then it is assumed to refer to a point on a strand with the same interpretation as the coordinates (except without the \Verb+<name prefix>-+, of course). +If the argument does not contain a hyphen then it is taken to be an anchor of a surrounding rectangular node (the node might not itself exist -- if the braid isn't named -- but that doesn't affect the positioning). In the following example, the braid is shifted so that where the third strand starts the second level is at the position \Verb+(1,1)+ \begin{example} @@ -282,6 +305,26 @@ Here are more detailed examples. \end{example} +\begin{example} +\begin{center} +\begin{tikzpicture} +\pic[ + braid/.cd, + number of strands=3, + ultra thick, + strand 1/.style={red}, + strand 2/.style={green}, + strand 3/.style={blue}, + gap=0.1, +% control factor=0, +% nudge factor=0, + name prefix=braid, +] {braid={a_{1-3} a_{1,3}}}; +\end{tikzpicture} +\end{center} + +\end{example} + \newpage \section{Original Package Usage (Depreciated)} |