Pensieve header: Re-uploading all Khovanov tables for links while removing highlighting.

SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\KnotAtlas"]

<< KnotTheory`

<< "../../2014-04/MathematicaWikiLink/WikiLink2.m"

?TabularKh

TabularKh[khG_]:=Module[{kh,out,width,minr,maxr,minj,maxj,j,r,c,critical,chi},
highlight={};
kh=khG/.{Global`t->t,Global`q->q};
minr=Exponent[kh,t,Min];
maxr=Exponent[kh,t,Max];
minj=Exponent[kh,q,Min];
maxj=Exponent[kh,q,Max];
width=N[100/(maxr-minr+5)];
out=StringJoin["<table border=1>\n","<tr align=center>\n","<td width="<>ToString[2width]<>"%><table cellpadding=0 cellspacing=0>\n","  <tr><td>\\</td><td>&nbsp;</td><td>r</td></tr>\n","<tr><td>&nbsp;</td><td>&nbsp;\\&nbsp;</td><td>&nbsp;</td></tr>\n","<tr><td>j</td><td>&nbsp;</td><td>\\</td></tr>\n","</table></td>\n"];
Do[out=out<>"<td width="<>ToString[width]<>"%>"<>ToString[r]<>"</td>",{r,minr,maxr}];
out=out<>"<td width="<>ToString[2width]<>"%>&chi;</td></tr>\n";
Do[out=out<>"<tr align=center><td>"<>ToString[j]<>"</td>";
chi=0;
Do[c=Coefficient[Expand[kh*t^(1-minr)*q^(1-minj)],t^(r+1-minr)*q^(j+1-minj)];
chi+=(-1)^r*c;
critical=MemberQ[highlight,j-2r];
out=out<>Which[
critical&&c≠0,"<td bgcolor=yellow>"<>ToString[c]<>"</td>",
critical&&c==0,"<td bgcolor=yellow>&nbsp;</td>",
!critical&&c≠0,"<td>"<>ToString[c]<>"</td>",
!critical&&c==0,"<td>&nbsp;</td>"
],{r,minr,maxr}];
out=out<>"<td>"<>ToString[chi]<>"</td></tr>\n",{j,maxj,minj,-2}];
out=out<>"</table>"]

L=Link["L11n459"];
WriteString["TabularKh-L11n459.html",
TabularKh[Kh[L][q,t]]
]

url="http://katlas.org/w";
username="DrorsRobot";
Clear[password];
password:= password=InputString["Password for "<>username<>": "]

wc=CreateWikiConnection[url, username, password]

?WikiSetPageText

WikiSetPageText[wc, "Data:L11n459/KhovanovTable", TabularKh[Kh[Link["L11n459"]][q,t]]]

Link /: ToString[Link[n_,Alternating, k_]] := "L"<>ToString[n]<>"a"<>ToString[k];
Link /: ToString[Link[n_,NonAlternating, k_]] := "L"<>ToString[n]<>"n"<>ToString[k];

(
WikiSetPageText[wc , "Data:"<>ToString[#]<>"/KhovanovTable", TabularKh[Kh[#][q,t]]];
Print[#]
) & /@ AllLinks[{2,11}];