From 138f77fe71e43adc24ecb030d73df81cc5c4eb7e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 4 Sep 2017 09:45:51 +0900 Subject: add ketpic --- .../ketpic/ketlib/ketpicscifiles6/Putcell.sci | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100755 texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/Putcell.sci (limited to 'texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/Putcell.sci') diff --git a/texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/Putcell.sci b/texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/Putcell.sci new file mode 100755 index 00000000..e0020f0b --- /dev/null +++ b/texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/Putcell.sci @@ -0,0 +1,72 @@ +// 09.11.26 +// 09.12.06 +// 09.12.25 +// 09.12.29 + +function Putcell(varargin) + Nargs=length(varargin); + TbL=varargin(1); + Str=varargin(Nargs); + if type(Str)==1 + Str=string(Str); + end; + Pos=varargin(Nargs-1); + Nrg=varargin(2); + if type(Nrg)==10 + if Nargs==4 + Cell=Findcell(TbL,Nrg); + else + Mrg=varargin(3); + Cell=Findcell(TbL,Nrg,Mrg); + end; + else + Mrg=varargin(3); + Cell=Findcell(TbL,Nrg,Mrg); + end; + Pt=Cell(1); Dr='c'; + Posh=part(Pos,1); + Post=part(Pos,2:length(Pos)); + if (Posh=='r')|(Posh=='R') + Pt=Pt+[Cell(2),0]; + if length(Post)==0 + Dr='w1'; + else + Dr='w'+Post; + end; + end; + if (Posh=='l')|(Posh=='L') + Pt=Pt-[Cell(2),0]; + if length(Post)==0 + Dr='e1'; + else + Dr='e'+Post; + end; + end; + if (Posh=='u')|(Posh=='U') + Pt=Pt+[0,Cell(3)]; + if length(Post)==0 + Dr='s1'; + else + Dr='s'+Post; + end; + end; + if (Posh=='d')|(Posh=='D') + Pt=Pt-[0,Cell(3)]; + if length(Post)==0 + Dr='n1'; + else + Dr='n'+Post; + end; + end; + if (Posh=='b')|(Posh=='B') + Pt=Pt-[0,Cell(3)]; + if length(Post)==0 + Dr='n1'; + else + Dr='n'+Post; + end; + Str='$\mathstrut$'+Str; + end; + Letter(Pt,Dr,Str); +endfunction; + -- cgit v1.2.3