Commit 896277d2 authored by Adrien Clement's avatar Adrien Clement
Browse files

First commit

parents
Loading
Loading
Loading
Loading

README.md

0 → 100644
+4 −0
Original line number Diff line number Diff line
# braidTikz

## Usage
Use this function to get the latex code for drawing the braid which is given by the index of the generators that compose your braid.
 No newline at end of file

braidTikz.jl

0 → 100644
+18 −0
Original line number Diff line number Diff line
"""
    braidTikz(braid)

Return the string which can be put in a latex document to make the tikzpicture of the braid.
To get the right string, you have to print the result.

# Arguments
- 'braid::Vector{Int64}': index of the generators of the braid
"""
function braidTikz(braid)
  temp::String = ""
  res::String = ""
  for i in braid
    temp = temp * "s_" * string(i)* " "
  end
  res = raw"\begin{center} \begin{tikzpicture} \pic[rotate=90,braid/.cd,every strand/.style={ultra thick},flip crossing convention] {braid={" * temp * raw"}}; \end{tikzpicture} \end{center}"
  return(res)
end
 No newline at end of file