Some definitions which probably should be in KnotTheory`

Blank URL for the unknot, since Knotilus won't do it.

KnotilusURL[GaussCode[]] = "";

Finer selection of knots and links

AllKnots[n_] := Cases[AllKnots[], Knot[n, __]]

AllKnots[{n_, m_}] := Join @@ Table[AllKnots[i], {i, n, m}]

AllKnots[n_, t_] := Cases[AllKnots[], Knot[n, t, _]]

AllLinks[n_] := Cases[AllLinks[], Link[n, __]]

AllLinks[{n_, m_}] := Join @@ Table[AllLinks[i], {i, n, m}]

AllLinks[n_, t_] := Cases[AllLinks[], Link[n, t, _]]

TorusKnots[Xmax_] := 
      Module[{res}, 
res = 
          Flatten[Table[
              Cases[Range[2, Min[Floor[1 + Xmax/m], m - 1]], 
                n_ /; GCD[m, n] == 1 :> 
                  TorusKnot[m, n]], {m, 3, Xmax}]]; 
Last /@ 
          Sort[{Crossings[#], #} & /@ res]
]

Naming

NameString[
          Knot[n_Integer?(# ≤ 10 &), 
            k_Integer]] /; (k ≤ NumberOfKnots[n]) := 
      ToString[n] <> "_" <> ToString[k]

NameString[
          Knot[n_Integer?(# ≥ 11 &), Alternating, 
            k_Integer]] /; (k ≤ 
            NumberOfKnots[n, Alternating]) := "K" <> 
        ToString[n] <> "a" <> ToString[k]

NameString[
          Knot[n_Integer?(# ≥ 11 &), NonAlternating, 
            k_Integer]] /; (k ≤ 
            NumberOfKnots[n, NonAlternating]) := "K" <> 
        ToString[n] <> "n" <> ToString[k]

NameString[
          Link[n_Integer, Alternating, k_Integer]] /; (k ≤ 
            NumberOfLinks[n, Alternating]) := "L" <> 
        ToString[n] <> "a" <> ToString[k]

NameString[
          Link[n_Integer, NonAlternating, k_Integer]] /; (k ≤ 
            NumberOfLinks[n, NonAlternating]) := "L" <> 
        ToString[n] <> "n" <> ToString[k]

NameString[TorusKnot[m_Integer, n_Integer]] := "T(" <> 
        ToString[m] <> "," <> ToString[n] <> ")"

Recognise knot string names

\(Knot[
          S_String?\((StringMatchQ[#, \((DigitCharacter .. )\) ~~ \("_" ~~ \((DigitCharacter .. )\)\)] &)\)] /; \((\(\((#[[1]] ≤ 
                    10 ∧ #[[2]] ≤ 
                    NumberOfKnots[#[[1]]])\) &\)[ToExpression /@ StringSplit[S, "_"]])\) := 
      Knot @@ \((ToExpression /@ StringSplit[S, "_"])\)\)

\(Knot[
          S_String?\((StringMatchQ[#, "K" ~~ \(\((DigitCharacter .. )\) ~~ \("a" ~~ \((DigitCharacter .. )\)\)\)] &)\)] /; \((\(\((#[[1]] ≥ 
                    11 ∧ #[[2]] ≤ NumberOfKnots[#[[1]], 
                      Alternating])\) &\)[
            ToExpression /@ 
              StringSplit[
                S, {"K", "a"}]])\) := \(Knot[#[[1]], 
            Alternating, #[[2]]] &\)[\((ToExpression /@ StringSplit[S, {"K", "a"}])\)]\)

\(Knot[
          S_String?\((StringMatchQ[#, "K" ~~ \(\((DigitCharacter .. )\) ~~ \("n" ~~ \((DigitCharacter .. )\)\)\)] &)\)] /; \((\(\((#[[1]] ≥ 
                    11 ∧ #[[2]] ≤ NumberOfKnots[#[[1]], 
                      NonAlternating])\) &\)[
            ToExpression /@ 
              StringSplit[
                S, {"K", "n"}]])\) := \(Knot[#[[1]], 
            NonAlternating, #[[2]]] &\)[\((ToExpression /@ StringSplit[S, {"K", "n"}])\)]\)

\(Knot[
          S_String?\((StringMatchQ[#, "L" ~~ \(\((DigitCharacter .. )\) ~~ \("a" ~~ \((DigitCharacter .. )\)\)\)] &)\)] /; \((\(\((1 ≤ #[[2]] ≤ 
                  NumberOfLinks[#[[1]], 
                    Alternating])\) &\)[
            ToExpression /@ 
              StringSplit[
                S, {"L", "a"}]])\) := \(Link[#[[1]], 
            Alternating, #[[2]]] &\)[\((ToExpression /@ StringSplit[S, {"L", "a"}])\)]\)

\(Knot[
          S_String?\((StringMatchQ[#, "L" ~~ \(\((DigitCharacter .. )\) ~~ \("n" ~~ \((DigitCharacter .. )\)\)\)] &)\)] /; \((\(\((1 ≤ #[[2]] ≤ 
                  NumberOfLinks[#[[1]], 
                    NonAlternating])\) &\)[
            ToExpression /@ 
              StringSplit[
                S, {"L", "n"}]])\) := \(Link[#[[1]], 
            NonAlternating, #[[2]]] &\)[\((ToExpression /@ StringSplit[S, {"L", "n"}])\)]\)

\(Knot[
        S_String?\((StringMatchQ[#, "T(" ~~ \(\((DigitCharacter .. )\) ~~ \("," ~~ \(\((DigitCharacter .. )\) ~~ ")"\)\)\)] &)\)] := \(TorusKnot[#[[1]], #[[2]]] &\)[\((ToExpression /@ 
            StringSplit[S, {"T(", ",", ")"}])\)]\)

Recognise Livingston's naming system.

\(Knot[
          S_String?\((StringMatchQ[#, \((DigitCharacter .. )\) ~~ \("a_" ~~ \((DigitCharacter .. )\)\)] &)\)] /; \((\(\((#[[1]] ≥ 
                    11 ∧ #[[2]] ≤ NumberOfKnots[#[[1]], 
                      Alternating])\) &\)[
            ToExpression /@ 
              StringSplit[
                S, {"a_"}]])\) := \(Knot[#[[1]], 
            Alternating, #[[2]]] &\)[\((ToExpression /@ StringSplit[S, {"a_"}])\)]\)

\(Knot[
          S_String?\((StringMatchQ[#, \((DigitCharacter .. )\) ~~ \("n_" ~~ \((DigitCharacter .. )\)\)] &)\)] /; \((\(\((#[[1]] ≥ 
                    11 ∧ #[[2]] ≤ NumberOfKnots[#[[1]], 
                      NonAlternating])\) &\)[
            ToExpression /@ 
              StringSplit[
                S, {"n_"}]])\) := \(Knot[#[[1]], 
            NonAlternating, #[[2]]] &\)[\((ToExpression /@ StringSplit[S, {"n_"}])\)]\)

AlternatingQ[
          Knot[n_, k_]] /; (0 ≤ n ≤ 10 ∧ 
            1 ≤ k ≤ 
              NumberOfKnots[n]) := (k ≤ 
          NumberOfKnots[n, Alternating])
AlternatingQ[Knot[_, Alternating, _]] := 
      True
AlternatingQ[Knot[_, NonAlternating, _]] := 
      False
AlternatingQ[Link[_, Alternating, _]] := 
      True
AlternatingQ[Link[_, NonAlternating, _]] := 
      False
AlternatingQ[_TorusKnot] := True

NextKnot and PreviousKnot

NextKnot[Knot[0, 1]] = Knot[3, 1];
NextKnot[
          Knot[n_Integer?(# ≤ 10 &), k_Integer]] /; (k < 
            NumberOfKnots[n]) := Knot[n, k + 1]
NextKnot[
          Knot[n_Integer?(# ≤ 9 &), k_Integer]] /; (k == 
            NumberOfKnots[n]) := Knot[n + 1, 1]
NextKnot[Knot[10, k_Integer]] /; (k == NumberOfKnots[10]) := 
      Knot[11, Alternating, 1]

NextKnot[
          Knot[n_Integer?(# ≥ 11 &), t_, 
            k_Integer]] /; (k < NumberOfKnots[n, t]) := 
      Knot[n, t, k + 1]
NextKnot[
          Knot[n_Integer?(# ≥ 11 &), Alternating, 
            k_Integer]] /; (k == NumberOfKnots[n, Alternating]) := 
      Knot[n, NonAlternating, 1]
NextKnot[
          Knot[n_Integer?(# ≥ 11 &), NonAlternating, 
            k_Integer]] /; (k == NumberOfKnots[n, NonAlternating]) := 
      Knot[n + 1, Alternating, 1]

PreviousKnot[Knot[0, 1]] = Knot[0, 1];
PreviousKnot[Knot[3, 1]] = Knot[0, 1];
PreviousKnot[Knot[n_Integer?(# ≤ 10 &), 1]] := 
      Knot[n - 1, NumberOfKnots[n - 1]]
PreviousKnot[Knot[n_Integer?(# ≤ 10 &), k_Integer]] := 
      Knot[n, k - 1]

PreviousKnot[Knot[11, Alternating, 1]] = 
        Knot[10, NumberOfKnots[10]];
PreviousKnot[
        Knot[n_Integer?(# ≥ 12 &), Alternating, 1]] := 
      Knot[n - 1, NonAlternating, 
        NumberOfKnots[n - 1, NonAlternating]]
PreviousKnot[
        Knot[n_Integer?(# ≥ 11 &), NonAlternating, 1]] := 
      Knot[n, Alternating, 
        NumberOfKnots[n, Alternating]]
PreviousKnot[
        Knot[n_Integer?(# ≥ 11 &), t_, k_Integer]] := 
      Knot[n, t, k - 1]

NextKnot[Last[AllLinks[]]] = 
        Last[AllLinks[]];
PreviousKnot[Link[2, Alternating, 1]] := 
        Link[2, Alternating, 1];
NextKnot[L_Link] := 
      With[{all = AllLinks[]}, 
        all[[Position[all, L][[1, 
              1]] + 
            1]]]
PreviousKnot[L_Link] := 
      With[{all = AllLinks[]}, 
        all[[Position[all, L][[1, 
              1]] - 1]]]

PreviousKnot[TorusKnot[3, 2]] = TorusKnot[3, 2];

TorusKnotPosition[TorusKnot[m_, n_]] := 
      Module[{l = 
            36}, 
While[! MemberQ[TorusKnots[l], 
              TorusKnot[m, n]], 
          l += 36]; 
Position[TorusKnots[l], 
            TorusKnot[m, n]][[1, 
          1]]
]

PreviousKnot[
        T_TorusKnot] := TorusKnots[Crossings[T]][[
        TorusKnotPosition[T] - 1]]

NextKnot[T_TorusKnot] := 
      Module[{p = TorusKnotPosition[T] + 1, n = 36}, 
While[
          Length[TorusKnots[n]] < p, 
          n += 36]; 
TorusKnots[n][[
          p]]
]

WikiForm

It's important not to wrap integer in <math> tags, so they can be spliced into URLs, etc.

WikiForm /: ToString[a_Integer, WikiForm] := ToString[a]

\(\(WikiForm\  /: \ ToString[s_String, \ WikiForm]\  := \ 
        StringReplace[
"<nowiki>" <> 
            s <> "</nowiki>", 
{"|"\  -> \ "&#124;"}
];\)\)

WikiForm /: ToString[K_Knot, WikiForm] := 
      NameString[K]
WikiForm /: ToString[L_Link, WikiForm] := 
      NameString[L]
WikiForm /: ToStirng[T_TorusKnot, WikiForm] := 
      NameString[T]

WikiForm /: ToString[Null, WikiForm] = "";

MathTags[s_String] := "<math>" <> s <> "</math>"

Presentations

listToString[{}, s_String] := ""

listToString[x_List, s_String] := 
      StringJoin[
        Drop[Flatten[
            Transpose[{ToString /@ x, 
                Table[s, {Length[x]}]}]], -1]]

WikiForm /: ToString[gc_GaussCode, WikiForm] := 
      listToString[List @@ gc, ", "]

WikiForm /: ToString[DTCode[x__Integer], WikiForm] := 
      listToString[{x}, " "]
WikiForm /: ToString[_DTCode, WikiForm] := ""

WikiForm /: 
        ToString[NotAvailable, 
          WikiForm] = "";
WikiForm /: ToString[_NotAvailable, WikiForm] = "";

WikiForm /: ToString[X[i_, j_, k_, l_], WikiForm] := 
      Module[{i1 = ToString[i], j1 = ToString[j], k1 = ToString[k], 
          l1 = ToString[l]}, 
        If[{1, 1, 1, 1} == StringLength /@ {i1, j1, k1, l1}, 
          ToString[StringForm["X<sub>````````</sub>", i1, j1, k1, l1]], 
          ToString[
            StringForm["X<sub>``,``,``,``</sub>", i1, j1, k1, 
              l1]]]]

WikiForm /: ToString[pd_PD, WikiForm] := 
      StringJoin @@ 
        Table[ToString[pd[[i]], WikiForm] <> " ", {i, 
            Length[pd]}]

SymmetryType values

WikiForm /: 
        ToString[Reversible, WikiForm] = "Reversible";
WikiForm /: 
        ToString[FullyAmphicheiral, 
          WikiForm] = "Fully amphicheiral";
WikiForm /: 
        ToString[NegativeAmphicheiral, 
          WikiForm] = "Negative amphicheiral";
WikiForm /: ToString[Chiral, WikiForm] = "Chiral";

WikiForm /: 
        ToString[_SymmetryType, 
          WikiForm] = "";
WikiForm /: 
        ToString[_UnknottingNumber, 
          WikiForm] = "";
WikiForm /: 
        ToString[_ThreeGenus, 
          WikiForm] = "";
WikiForm /: 
        ToString[_BridgeIndex, 
          WikiForm] = "";
WikiForm /: 
        ToString[_SuperBridgeIndex, 
          WikiForm] = "";
WikiForm /: 
        ToString[_NakanishiIndex, WikiForm] = "";

Polynomials

WikiForm /: ToString[poly_?LaurentPolynomialQ, WikiForm] := 
      MathTags[StringReplace[ToString[poly, TeXForm], 
          LaurentPolynomialTeXReplacementRule]]

Defaults for everything else.

WikiTeXForm /: ToString[a_, WikiTeXForm] := 
      StringReplace[
        ToString[a, 
          TeXForm], "\\text{" -> "\\textrm{"]

WikiForm /: ToString[a_, WikiForm] := 
      MathTags[ToString[a, WikiTeXForm]]

Laurent polynomials

PowerQ[_Integer] := True;
\(\(PowerQ[_\^_Integer] = True;\)\)
PowerQ[_Symbol] = True;
PowerQ[_] = False;

MonomialQ[x_Times] := And @@ (PowerQ /@ List @@ x)

MonomialQ[x_] := PowerQ[x]

SplitMonomial[x_?MonomialQ] := 
      If[MatchQ[x, _Times], List @@ x, {x}]

MonomialStringQ[x_String] := 
      MonomialQ[
        ToExpression[
          StringReplace[
            x, {"{" -> "(", "}" -> ")"}], 
          InputForm]]

MonomialStringQ[_] := False

\(PowerToString[x_?PowerQ] := 
      x /. {k_Integer :> ToString[k] <> " ", 
          z_\^n_ :> 
            ToString[z] <> "^{" <> ToString[n] <> "} ", 
          z_Symbol :> ToString[z]}\)

\(InvertMonomialString[x_?MonomialStringQ] := 
      StringJoin @@ \((PowerToString /@ \(\((#\^\(-1\) &)\) /@ 
              SplitMonomial[
                ToExpression[
                  StringReplace[
                    x, {"{" -> "(", "}" -> ")"}], 
                  InputForm]]\))\)\)

LaurentPolynomialQ[x_?MonomialQ] := True
LaurentPolynomialQ[x_Plus] := 
      And @@ (MonomialQ /@ List @@ x)

IfNotOne["1"] = "";
IfNotOne[x_String] := x

LaurentPolynomialTeXReplacementRule = "\\frac{" ~~ numerator : 
                ShortestMatch[__] ~~ "}{" ~~ denominator : 
                    ShortestMatch[__] ~~ "}" ~~ 
                    rest : ("+" | "-" | 
                          EndOfString) :> 
          IfNotOne[
              numerator]  ~~ " " ~~ InvertMonomialString[
                  denominator] ~~ rest;