% (c) Olivier Pirson --- DragonSoft --- Knots.tex
\documentclass[a4paper]{article}

\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{eulervm}

\usepackage{color}
\usepackage[margin=2.5cm]{geometry}
\usepackage{path}
\usepackage[baseurl=http://www.opimedia.be/DS/,colorlinks,urlcolor=blue]{hyperref}
\hypersetup{pdftitle={Knots.sty}}
\hypersetup{pdfauthor={Olivier Pirson <olivier\_pirson\_opi@yahoo.fr>}}
\hypersetup{pdfsubject={Composition of mathematic's knots in LaTeX}}
\hypersetup{pdfkeywords={knot, link, mathematic}}

\usepackage{Knots}



\definecolor{Gray}{rgb}{.4,.4,.4}
\definecolor{Mail}{rgb}{0,.5,0}

% Débuté le jeudi 15 mars 2007
\date{December $23$, $2011$}

\title{\texttt{Knots.sty}\\
  v.$01.01$}

\author{%
  Olivier \textsc{Pirson}\\
  \href{mailto:olivier_pirson_opi@yahoo.fr?subject=[Knots.sty]}%
       {\color{Mail}\path|olivier\_pirson\_opi@yahoo.fr|}\\
  \href{http://www.opimedia.be/DS/}{\path|http://www.opimedia.be/DS/|}}



\begin{document}%
%
\maketitle\thispagestyle{empty}%

\section{Pieces of knots}
\Kgridtrue
\noindent
\begin{tabular}{@{}l@{\ }l@{\ }l@{\ }l@{\ }l@{\ }l@{\ }l@{\ }l@{\ }l@{\ }l@{\ }l@{}}%
  knots:\\
  \Knots{1}{1}{\e}\,e
  & \Knots{1}{1}{\)}\,) & \Knots{1}{1}{\(}\,( & \Knots{1}{1}{\^}\,\^ & \Knots{1}{1}{\_}\,\_
  & \Knots{1}{1}{\/}\,/ & \Knots{1}{1}{\\}\,\textbackslash
  & \Knots{1}{1}{\"}\," & \Knots{1}{1}{\=}\,=
  & \Knots{1}{1}{\%}\,\% & \Knots{1}{1}{\&}\,\&\\
  \textbackslash{}Kempty
  & \textbackslash{}Kleft & \textbackslash{}Kright & \textbackslash{}Ktop & \textbackslash{}Kbottom
  & \textbackslash{}Kup & \textbackslash{}Kdown & \textbackslash{}Kvert & \textbackslash{}Khori
  & \textbackslash{}Kcrossup & \textbackslash{}Kcrossdown\\
\end{tabular}

\bigskip
\noindent
\begin{tabular}{@{}l@{\ }l@{\ }l@{\ }l@{\qquad\qquad\qquad}l@{}}%
  labelstates:\hspace{-5em}
  & & & & universes:\\
  \Knots{1}{1}{\A}\,A & \Knots{1}{1}{\B}\,B & \Knots{1}{1}{\a}\,a & \Knots{1}{1}{\b}\,b
  & \Knots{1}{1}{\x}\,x\\
  \textbackslash{}KcrossupA & \textbackslash{}KcrossupB
  & \textbackslash{}KcrossdownA & \textbackslash{}KcrossdownB
  & \textbackslash{}Kcross\\
\end{tabular}

\bigskip
\noindent
\begin{tabular}{@{}l@{\,}l@{\,}l@{\,}l@{\,}l@{\,}l@{}}%
   \LaTeX{} :\hspace{-5em}\\
   \ \Knots{1}{1}{\l}\,l & $\leftarrow$\ E & $\downarrow$\ n & $\rightarrow$\ N
   & \Knots{1}{1}{\Z}\,Z & \Knots{1}{1}{\z}\,z\\
   \ \textbackslash{}Klightbox & \textbackslash{}Kback
   & \textbackslash{}Knewline & \textbackslash{}Kpreviousline
   & \textbackslash{}Kupbroken & \textbackslash{}Kdownbroken\\
\end{tabular}



\section{Examples}
\Kgridfalse
\noindent
{\Kgridtrue
  \fbox{%
    \Knots{2}{1}{\(\)}}} $0_1$\qquad
\fbox{%
  \Knots{3}{1}{\(\%\)}}
\fbox{%
  \Knots{4}{1}{\(\%\&\)}}
\fbox{%
  \Knots{4}{1}{\(\%\&[16]\)[16]}}

\Kgridtrue

\bigskip
\noindent
\fbox{%
  \Knots{4}{3}{%
    \e\/\%\\\n
    \(\(\e\&\n
    \e\\\%\/\n}} $3_1$\hfill
\fbox{%
  \Knots{5}{5}{%
    \e\e\e\_\n
    \e\/\%\e\\\n
    \(\(\e\&\&\n
    \e\\\%\e\/\n
    \e\e\e\^\n}} $4_1$

\bigskip
\noindent
\fbox{%
  \Knots{7}{4}{%
    \e\e\e\_\n
    \e\/\%\e\%\\\n
    \(\(\e\^\e\)\)\n
    \e\\\%\%\%\/\n}} $5_1$

\medskip
\hrulefill
%
\end{document}
