summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/ketcindy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-02-03 22:44:58 +0000
committerKarl Berry <karl@freefriends.org>2019-02-03 22:44:58 +0000
commit2dcfe2f07af05124d5ebee4672d67d7eeae7af60 (patch)
tree7008760d5ea7041b1f981e9c3d1d8ef6719013ce /Master/texmf-dist/scripts/ketcindy
parent9c1b590fa92293b7bc04195a05641af25185dc64 (diff)
ketcindy (3feb19)
git-svn-id: svn://tug.org/texlive/trunk@49922 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/ketcindy')
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dlogr.txt4
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dr.cs26
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1logr.txt31
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs886
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2logr.txt58
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2r.cs1291
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutlogr.txt16
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutr.cs228
-rwxr-xr-xMaster/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent.r115
-rwxr-xr-xMaster/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_rep2e.r97
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlibC/ketlibClog.txt4
-rw-r--r--Master/texmf-dist/scripts/ketcindy/ketlibC/surflib.h90
-rw-r--r--Master/texmf-dist/scripts/ketcindy/template2allbuttons.cdybin0 -> 5213 bytes
-rw-r--r--Master/texmf-dist/scripts/ketcindy/template2slide.cdybin5830 -> 0 bytes
14 files changed, 1869 insertions, 977 deletions
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dlogr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dlogr.txt
index 9b60514ba5d..de1caada09d 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dlogr.txt
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dlogr.txt
@@ -1,3 +1,7 @@
+// 20190128
+// Vertexedgeface changed ( size of point name, drawpoint )
+// 20190127
+// Nohiddenseg debugged ( for changing Ltype )
// 20181218
// Letter3d,Expr3d added
// 20181212
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dr.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dr.cs
index 7f378e9cd87..e4e59151022 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dr.cs
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylib3dr.cs
@@ -14,7 +14,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>
//
-println("ketcindylib3d(20181218) loaded");
+println("ketcindylib3d(20190128) loaded");
//help:start();
@@ -625,7 +625,7 @@ Subgraph(name3,opcindy):=( //181029
);
tmp=name+"="+Textformat(sub2d,5);
parse(tmp);
- GCLIST=append(GCLIST,[name,0,opcindy]);
+ GCLIST=append(GCLIST,[name,[0,1],opcindy]); //190127
sub2d;
);
////%Subgraph end////
@@ -1189,6 +1189,7 @@ Xyzaxparaname(Xrange,Yrange,Zrange,options):=(
);
////%Xyzax3paraname end////
+////%Datalist3d start////
Datalist3d():=(
//help:Datalist3d();
regional(out,tmp,tmp2,tmp3);
@@ -1198,7 +1199,9 @@ Datalist3d():=(
tmp3=apply(tmp2,replace(#,"2d","3d"));
out=tmp3;
);
+////%Datalist3d end////
+////%Datalist2d start////
Datalist2d():=(
//help:Datalist2d();
regional(out,tmp,tmp2,tmp3);
@@ -1208,7 +1211,9 @@ Datalist2d():=(
// tmp3=apply(tmp2,replace(#,"2d","3d"));
out=tmp2;
);
+////%Datalist2d end////
+////%Embed start////
Embed(nm,Pd2str,funstr,varstr):=
Embed(nm,Pd2str,funstr,varstr,[]);
Embed(nm,Pd2str,funstr,varstr,options):=(
@@ -1298,6 +1303,7 @@ Embed(nm,Pd2str,funstr,varstr,options):=(
);
Out;
);
+////%Embed end////
////%Rotatepoint3d start////
Rotate3pt(point,w1,w2):=Rotatepoint3d(point,w1,w2,[0,0,0]);
@@ -2422,18 +2428,15 @@ IntersectsgpL(name,sgstr,pLstr,optionsorg):=(
tmp2=(ss>-Eps)&(ss<1+Eps)&(tt>-Eps)&(tt<1+Eps)&(ss+tt<1+Eps);//181029
out=[pR,tmp1,tmp2,tseg,ss,tt]; //181027to
tmp=ptflg_2;
- tmp1=(tmp1)%(substring(tmp,0,1)=="e"); //181025from
+ tmp1=(tmp1)%(substring(tmp,0,1)=="i"); //190114
tmp2=(tmp2)%(substring(tmp,1,2)=="e");
if(tmp1&tmp2&(scrflg=="Y"), //181031
if(ptflg_1=="P", //181025
- Putpoint3d([name,pR]);
- Fixpoint3d([name,pR]);
+ Putpoint3d([name,pR],"fix");
+// Fixpoint3d([name,pR]); //190114
,
Drawpoint3d(pR,options);
);
-// println(" pt"+name+" data:"+format(out,5));
- ,
-// println("pt"+name+" data:"+format(out,5));
);
,
println(" "+sgstr+" and "+pLstr+" may be parallel");//181025to
@@ -2933,7 +2936,8 @@ VertexEdgeFace(nm,vfnLorg,optionorg):=(
parse(tmp);
Defvar(vname+"2d",parse(vname+"2d"));
if(dispflg==1, //181106
- drawtext(parse(vname+"2d"),vname);
+ drawtext(parse(vname+"2d"),vname,size->8); //190128
+ draw(parse(vname+"2d"),pointsize->3,color->[0,1,0]); //190128
);
); //180905to
);
@@ -3385,7 +3389,7 @@ Nohiddenbyfaces(nm,segstr,faceL,vtxL,optionorg,optionsh):=(
tmp=replace(seg,"3d","2d");
tmp1=select(GCLIST,#_1==tmp);
tmp1=tmp1_1;
- if(tmp1_2==0,
+ if(tmp1_2_1==0, //190127
tmp2=append(tmp2,seg);
);
);
@@ -3564,6 +3568,7 @@ Faceremovaldata(nm,vfdata,crvdata,options):=(
);
////%Faceremovaldata end////
+////%Fullformfunc start////
Fullformfunc(FdL):=(
regional(Out,nn,ii,Jrg,flg,Urg,Vrg,kk,Uname,
Zf,Xname,Xf,Yname,Yf,tmp,tmp1,tmp2);
@@ -3647,6 +3652,7 @@ Fullformfunc(FdL):=(
tmp=[DrwS,BdyL];
Out=concat(Out,tmp);
);
+////%Fullformfunc end////
Surffun(nm,Fd):=(
regional(name,coord,var1,var2,rng1,rng2,bdy,tmp,tmp1,tmp2);
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1logr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1logr.txt
index 813140039fd..ab492956087 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1logr.txt
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1logr.txt
@@ -1,5 +1,32 @@
-// 20181217
-// Drwxy debugged
+/ 20190128
+// Ketinit changed (Userhome added)
+// Changesetting majorly changed
+// 20190127
+// Mvprod added
+// 20190126
+// Pointdata changed ( list of list removed, Ltype)
+// 20190125
+// Assign debugged ( for 1 argument)
+// Getlinestyle changed ( Ltype)
+// 20190122
+// no ketjs added (Ketinit)
+// 20190119
+// Getlinestyle changed/debugged (Ltype changed )
+// 20190118
+// Divoptions changed ("dr,thickness" )
+// 20190116
+// Ketinit() debuggded ( Mackc for Linux)
+// 20190115
+// Plotdata debugged( ( => [ )
+// Pointdata change( colorcode => colorcmyk2rgb)
+// 20190103
+// Paramplot debugged ( "pt" localized )
+// 20181231
+// Pointdata changed ( "Inside=(cmyk list)" option added )
+// Setorigin debugged (GENTEN used)
+// 20181230
+// Pointdata changed ( "Inside" option added )
+// Integrate debugged (case of funstr)
// 20181216
// Ketinit changed (AXSTYLE changed)
// 20181215
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs
index a3376741a8d..e473027def3 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic1r.cs
@@ -9,14 +9,14 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-// f
+//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>
//
-println("KeTCindy V.3.2.3(20181216)");
+println("KeTCindy V.3.2.5");
println(ketjavaversion());
-println("ketcindylibbasic1(20181125) loaded");
+println("ketcindylibbasic1[20190131] loaded");
//help:start();
@@ -71,7 +71,7 @@ Ketinit(work,sy,rangex,rangey):=(//181001to
KCOLOR=[0,0,0];
GLIST=[];
GCLIST=[];
-// GDATALIST=[];
+// GDATALIST=[]; //no ketjs
GOUTLIST=[];
POUTLIST=[];
VLIST=[];
@@ -97,6 +97,8 @@ Ketinit(work,sy,rangex,rangey):=(//181001to
ADDPACK=[]; // 16.05.16
GPACK="tpic"; //180817
ErrFlag=0;
+ KETJSOP=[]; //190129
+ // no ketjs on 190122
setdirectory(Dirwork);
if(!isstring(Fhead), // 17.10.13from, 17.11.12
Fhead=text(curkernel());
@@ -122,8 +124,8 @@ Ketinit(work,sy,rangex,rangey):=(//181001to
Dircdy=substring(Dircdy,1,length(Dircdy));
);
);
- Changesetting(Homehead+pathsep()+getname()); //180913
- Changesetting(Dircdy); //181017
+ Userhome=Homehead+pathsep()+getname(); //190128
+ Changesetting(); //190128
Changework(Dircdy+pathsep()+work); //180329to,181001
Fnametex=Fhead+".tex";
FnameR=Fhead+".r";
@@ -139,6 +141,7 @@ Ketinit(work,sy,rangex,rangey):=(//181001to
Shellparent="/kc.command";
,
Shellparent="/kc.sh";
+ Mackc="sh"; //190116
); //181125to
if(!isexists(Dirwork,""),
println(Dirwork+" not exists");
@@ -152,6 +155,7 @@ Ketinit(work,sy,rangex,rangey):=(//181001to
println(setexec(Dirwork,Shellparent));
);
);
+// no ketjs off 190122
ArrowlineNumber=1; // 15.01.05
ArrowheadNumber=1;
BezierNumber=1; //15.01.03
@@ -163,6 +167,7 @@ Ketinit(work,sy,rangex,rangey):=(//181001to
YMIN=rangey_1/SCALEY;
YMAX=rangey_2/SCALEY;
Setwindow("Msg=n"); // 16.05.31
+// no ketjs on 190122
// for Presentation
letterc=[0.98,0.13,0,0.43]; boxc=[0,0.32,0.52,0];
shadowc=[0,0,0,0.5]; mboxc="yellow"; //17.03.02 regional debugged
@@ -173,6 +178,7 @@ Ketinit(work,sy,rangex,rangey):=(//181001to
if(indexof(PathT,"pdflatex")+indexof(PathT,"lualatex")>0,
LibnameS=replace(LibnameS,"ketpic","ketpic2e");
);//17.12.03until
+// no ketjs off 190122
);
////%Ketinit end////
@@ -250,7 +256,7 @@ Readlines(path,file):=(
//help:Readlines(path,file);
regional(tmp,out);
out=readfile2str(path,file);
- out=tokenize(out,"/LF/");
+ out=tokenize(out,"/L"+"F/"); //190129
tmp=out_(length(out));
if(length(tmp)==0,
out=out_(1..(length(out)-1));
@@ -260,22 +266,22 @@ Readlines(path,file):=(
////%Readlines end////
////%Changesetting start////
-Changesetting(dir):=( //181017
- regional(fname);
- fname="ketcindychange.txt";
- if(!isexists(dir,fname),
- if(dir==Dircdy,
- fname="ketcindy.conf";
- ,
- fname=".ketcindy.conf";
- );
+Changesetting():=( //190128
+ regional(dir,fname);
+ dir=Homehead+pathsep()+getname();
+ fname=".ketcindy.conf";
+ if(isexists(dir,fname),
+ println("read "+fname+" in "+dir);
+ setdirectory(dir);
+ import(fname);
);
+ dir=Dircdy; fname="ketcindy.conf";
if(isexists(dir,fname),
println("read "+fname+" in "+dir);
setdirectory(dir);
import(fname);
);
-); //181017to
+);
////%Changesetting end////
////%Cindyname start////
@@ -308,7 +314,7 @@ Setwindow(str):=(
// createpoint("SW",Pcrd([XMIN,YMIN]));
// createpoint("NE", Pcrd([XMAX,YMAX]));
Putpoint("SW",Pcrd([XMIN,YMIN]));
- Putpoint("NE", Pcrd([XMAX,YMAX]));
+ Putpoint("NE", Pcrd([XMAX,YMAX]));
);
if(msg=="y",
println("Setwindow(["+XMIN+","+XMAX+"],["+YMIN+","+YMAX+"])");
@@ -373,6 +379,47 @@ DqDq(str):=(
);
////%DqDq end////
+////%PPa start//// 190111
+PPa():=PPa("");
+PPa(str):="("+str+")";
+////%PPa end////
+
+////%PaO start//// 190111
+PaO():=PaO("");
+PaO(Arg):=(
+ regional(out);
+ if(isstring(Arg),
+ out="("+Arg;
+ ,
+ out="";
+ repeat(Arg,
+ out=out+"(";
+ );
+ );
+ out;
+);
+////%PaO end////
+
+////%PaC start//// 190111
+PaC():=PaC("");
+PaC(Arg):=(
+ regional(out);
+ if(isstring(Arg),
+ out=Arg+")";
+ ,
+ out="";
+ repeat(Arg,
+ out=out+")";
+ );
+ );
+ out;
+);
+////%PaC end////
+
+////%PPa start//// 190111
+PPa(str):="("+str+")";
+////%PPa end////
+
////%Tab2list start////
Tab2list(dtstr):=Tab2list(dtstr,[]);
Tab2list(dtstrorg,options):=(
@@ -787,7 +834,7 @@ Changework(dirorg,options):=( //16.10.21
,
println("Directory "+dir+" not exist, so "+Dqq(Dirwork)+" not changed");
); //180618to
-// println("Directory "+dir+" not exist, so set to "+Dircdy);//180604(2lines)
+// println("Directory "+dir+" not exist, so set to "+Dircdy);//180604[2lines]
// Dirwork=Dircdy;
// ErrFlag=-1;
,
@@ -826,17 +873,17 @@ Changestyle(nameL,style):=(
if(length(tmp)>0,
Ltype=Ltypeorg;
GCLIST=select(GCLIST,#_1!=name);
- COM2ndlist=select(COM2ndlist,
- (indexof(#,"("+name)==0)%(indexof(#,"Shade")>0)); // 15.05.23,16.12.13
+ COM2ndlist=select(COM2ndlist, //no ketjs
+ (indexof(#,"("+name)==0)%(indexof(#,"Shade")>0)); // 15.05.23,16.12.13 //no ketjs
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
+ ); //no ketjs off
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
+ ); //no ketjs off
,
if(Noflg==1,Ltype=0);
);
@@ -864,7 +911,7 @@ Op(n,object):=( // 16.05.25
////%Op end////
////%Ptselected start////
-Ptselected():=Isptselected(allpoints());//180711(2lines)
+Ptselected():=Isptselected(allpoints());//180711[2lines]
Ptselected(ptlist):=Isptselected(ptlist);
Isptselected():=Isptselected(allpoints()); //180706
Isptselected(ptlist):=(
@@ -1117,19 +1164,15 @@ Sprintf(value,dig):=(
);
////%Sprintf end////
-Assign(str):=( // old
- regional(out);
- out=str;
- forall(VLIST,
- tmp=substring(#_1,0,length(#_1)-1);
- out=replace(out,tmp,"("+#_2+")");
- );
- out;
-);
-
////%Assign start////
+Assign(str):=( //190125from
+ regional(tmp);
+ tmp=[];
+ forall(VLIST,tmp=concat(tmp,[#_1,#_2]));
+ Assign(str,tmp);
+); //190125to
Assign(funstr,vrL):=(
- regional(nn,out,tmp,tmp1);
+ regional(nn,out);
nn=length(vrL)/2;
out=funstr;
forall(1..nn,
@@ -1137,7 +1180,6 @@ Assign(funstr,vrL):=(
);
out;
);
-
Assign(funstr,varname,rep):=(
//help:Assign("x^2+a*x","a",1.3);
//help:Assign("a*x^2+b*x",["a",1,"b",2]);
@@ -1154,7 +1196,7 @@ Assign(funstr,varname,rep):=(
ii=indexof(funstr,varname);
if(ii>0,
Flg=0;
- if(ii>1,
+ if(ii>1,
tmp=substring(funstr,ii-2,ii-1);
if(contains(Notvar,tmp),
tmp2=tmp2+substring(funstr,0,ii);
@@ -1270,7 +1312,7 @@ Divoptions(options):=(
tmp1=parse(tmp2);
color=tmp1;
if(length(tmp1)==4,
- tmp1=colorCmyk2Rgb(tmp1);
+ tmp1=Colorcmyk2rgb(tmp1);
);
,
tmp1=Colorname2rgb(tmp2); color=tmp1; //181212
@@ -1369,6 +1411,28 @@ Crossprod(a,b):=(
);
////%Crossprod end////
+////%Mvprod start////
+Mvprod(mat,vec):=( //190127
+ regional(vecL);
+ if(MeasureDepth(vec)==0,vecL=[vec],vecL=vec);
+ Mvprod(mat,vecL,length(vecL));
+);
+Mvprod(mat,vecL,nn):=(
+//help:Mvprod(mat,vec(list));
+ regional(tmp,out);
+ if(nn==1,
+ out=mat*vecL_1;
+ ,
+ out=[];
+ forall(1..nn,
+ tmp=mat*vecL_#;
+ out=append(out,tmp);
+ );
+ );
+ out;
+);
+////%Mvprod end////
+
////%Ptstart start////
Ptstart(Fig):=(
//help:Ptstart("gr1");
@@ -1427,7 +1491,7 @@ Paramoncrv(pP,Gdata):=Paramoncurve(pP,Gdata);//180723
////%Paramoncrv end////
////%ParamonCurve start////
ParamonCurve(point,Gdata):=(
-//help:ParamonCurve(A,"gr1");//180723(3lines)
+//help:ParamonCurve(A,"gr1");//180723[3lines]
regional(Tmp,PtL,pP);
if(ispoint(point),pP=point.xy,pP=point);
// Eps=10^(-8);
@@ -1631,7 +1695,7 @@ IntersectcrvsPp(Gr1,Gr2,options):=(
Data1=apply(Data1,LLcrd(#));
Data2=apply(Data2,LLcrd(#));
if(length(Data1)==length(Data2),
- Tmp1=Reverse(Data2);
+ Tmp1=reverse(Data2);
Eps0=10^(-6);
Tmp2=0;
forall(1..(length(Data1)),
@@ -2046,7 +2110,7 @@ Collectsameseg(ptdL):=(
);
gL=[];
tmp=apply(tmp1md,#_4);
- dst=min(tmp);
+ dst=min(tmp);
forall(tmp1md,
if(#_4<dst+Eps00,
gL=append(gL,#);
@@ -2194,7 +2258,7 @@ NearestptcrvPhy(point,PL):=(
////%Nearestptcrv start////
Nearestptcrv(point,plist):=(
//help:Nearestptcrv(A,"gr1");
- regional(tmp,pt);//180723(3lines)
+ regional(tmp,pt);//180723[3lines]
if(ispoint(point),pt=point.xy,pt=point);
tmp=Nearestpt(pt,plist);
tmp_1;
@@ -2334,7 +2398,7 @@ Derivative(fun,var,value,options):=(
);
);
if(method=="D",
- str="d(";
+ str="d"+PaO();
str=str+replace(fun,var,"#")+",";
str=str+value+")";
tmp=Pcrd([1,parse(str)]); // 14.11.08
@@ -2385,7 +2449,7 @@ Tangentplot(nm,pdstr,ptinfo,optionsorg):=(
println(" Derivative cannot be calculated");
flg=1;
,
- tmp=sort(tmp,[#_3]);//1807120(3lines)
+ tmp=sort(tmp,[#_3]);//1807120[3lines]
pt=tmp_ch_1;
par=tmp_ch_2;
);
@@ -2485,7 +2549,7 @@ Integratefn(fnstr,rngstr,options):=( //180708from
ex=range_2;
dx=(ex-sx)/Num;
xn=apply(0..Num,sx+#*dx);
- yn=apply(xn,parse(Assign(fnstr,[var,textformat(#,5)])));
+ yn=apply(xn,parse(Assign(fnstr,[var,#]))); //181230
plt=apply(1..(Num+1),[xn_#,yn_#]);
Sm=IntegrateO(plt,range);
);//180708to
@@ -2494,8 +2558,8 @@ Integratefn(fnstr,rngstr,options):=( //180708from
forall(1..Num,
Lx=range_1+(range_2-range_1)*(#-1)/Num;
Rx=range_1+(range_2-range_1)*#/Num;
- va1=parse(replace(fnstr,vastr,textformat(Lx,5)));
- va2=parse(replace(fnstr,vastr,textformat(Rx,5)));
+ va1=parse(replace(fnstr,vastr,Textformat(Lx,5)));
+ va2=parse(replace(fnstr,vastr,Textformat(Rx,5)));
Sm=Sm+(va1+va2)*(Rx-Lx)/2;
);
);
@@ -2505,14 +2569,14 @@ Integratefn(fnstr,rngstr,options):=( //180708from
ex=range_2;
dx=(ex-sx)/Num;
xn=apply(0..Num,sx+#*dx);
- yn=apply(xn,parse(replace(fnstr,vastr,textformat(#,5))));
+ yn=apply(xn,parse(replace(fnstr,vastr,Textformat(#,5))));
dx=dx/2;
repeat(Num,s,
x0=xn_s;
x1=(xn_s+xn_(s+1))/2;
x2=xn_(s+1);
y0=yn_s;
- y1=parse(replace(fnstr,vastr,textformat(x1,5)));
+ y1=parse(replace(fnstr,vastr,Textformat(x1,5)));
y2=yn_(s+1);
Sm=Sm+dx*(y0+4*y1+y2)/3;
);
@@ -2701,19 +2765,19 @@ Inversefun(fnstr,rngstr,value):=(
x1=range_1; x2=range_2;
repeat(15,
x3=(x1+x2)/2;
- va1=parse(replace(fnstr,varstr,textformat(x1,5)));
- va2=parse(replace(fnstr,varstr,textformat(x3,5)));
+ va1=parse(replace(fnstr,varstr,Textformat(x1,5)));
+ va2=parse(replace(fnstr,varstr,Textformat(x3,5)));
if((va1>value & va2>value) % (va1<value & va2<value),
x1=x3;
,
x2=x3;
);
);
- va1=parse(replace(fnstr,varstr,textformat(x1,5)))-value;
- va2=parse(replace(fnstr,varstr,textformat(x2,5)))-value;
+ va1=parse(replace(fnstr,varstr,Textformat(x1,5)))-value;
+ va2=parse(replace(fnstr,varstr,Textformat(x2,5)))-value;
if(x1==range_1 % x2==range_2,
- println("not found in ("+textformat(range_1,5)
- +","+textformat(range_2,5)+")");
+ println("not found in ("+Textformat(range_1,5)
+ +","+Textformat(range_2,5)+")");
);
if(abs(va1)<=abs(va2),x1,x2);
);
@@ -2770,34 +2834,48 @@ Texcom(strorg):=( //17.09.22
);
////%Texcom end////
+////%Ketcindylogo start////
Ketcindylogo():=(
//help:Ketcindylogo();
Com2nd("Texcom("+Dq+"\def\ketcindy{{K\kern-.20em
\lower.5ex\hbox{E}\kern-.125em{TCindy}}}"+Dq+")");
);
+////%Ketcindylogo end////
-Drwline():=Drwline(textformat(GrL,5));
+////%Drwline start////
+Drwline():=Drwline(Textformat(GrL,5));
Drwline(gstr):=(
Com2nd("Drwline("+gstr+")");
);
+////%Drwline end////
+
+////%Dashline start////
Dashline(gstr):=(
Com2nd("Dashline("+gstr+")");
);
+////%Dashline end////
+////%Invdashline start////
Invdashline(gstr):=(
Com2nd("Invdashline("+gstr+")");
);
+////%Invdashline end////
+////%Dottedline start////
Dottedline(gstr):=(
Com2nd("Dottedline("+gstr+")");
);
+////%Dottedline end////
+////%SetEnglish start////
SetEnglish():=(
//help:SetEnglish();
Com0th("setlanguage('en')");
);
+////%SetEnglish end////
+////%Drawlinetype start////
Drawlinetype(name,type):=(
//help:Drawlinetype("gr1","da,1");
regional(Dop,tmp,tmp1,tmp2);
@@ -2820,6 +2898,7 @@ Drawlinetype(name,type):=(
Dottedline(name+Dop);
);
);
+////%Drawlinetype end////
////%Setunitlen start////
Setunitlen():=(
@@ -2836,7 +2915,7 @@ Setunitlen(UI):=(
OL="+-*/";
if(length(UI)>0,
ULEN=UI;
- GLIST=append(GLIST,"Setunitlen("+Dq+UI+Dq+")");//180513
+ GLIST=append(GLIST,"Setunitlen("+Dq+UI+Dq+")");//180513 //no ketjs
);
Is=1;
VL="";
@@ -2881,14 +2960,15 @@ Setunitlen(UI):=(
Setmarklen(ratio):=(
//help:Setmarklen(0.2);
MARKLEN=ratio*0.2;//16.11.01
- Com2nd("Setmarklen("+textformat(ratio,5)+")");
+ Com2nd("Setmarklen("+Textformat(ratio,5)+")");
);
////%Setmarklen end////
////%Setorigin start////
Setorigin(point):=(
//help:Setorigin([1,2]);
- Com2nd("Setorigin("+textformat(point,5)+")");
+ GENTEN=point; //181231
+ Com2nd("Setorigin("+Textformat(point,5)+")");
);
////%Setorigin end////
@@ -3065,20 +3145,20 @@ Setcolor(parorg):=( //180603renew
cstr=text(par);
cstr=substring(cstr,1,length(cstr)-1);
if(length(par)==3,
- cstr="Texcom('\\color[rgb]{"+cstr+"}')";
+ cstr="Texcom('\\color[rgb]{"+cstr+"}')"; //no ketjs
KCOLOR=par;
);
if(length(par)==4,
- cstr="Texcom('\\color[cmyk]{"+cstr+"}')";
- tmp=ColorCmyk2Rgb(par);
+ cstr="Texcom('\\color[cmyk]{"+cstr+"}')"; //no ketjs
+ tmp=Colorcmyk2rgb(par);
KCOLOR=tmp;
);
- Com2nd(cstr);
+ Com2nd(cstr); //no ketjs
);
////%Setcolor end////
-////%ColorRgb2Cmyk start////
-ColorRgb2Cmyk(clr):=(
+////%Colorrgb2cmyk start////
+Colorrgb2cmyk(clr):=(
// help:ColorRgb([0.2,0.5,0.1]);
regional(clrnew,tmp,black);
tmp=apply(clr,1-#);
@@ -3091,10 +3171,10 @@ ColorRgb2Cmyk(clr):=(
); //181112to
clrnew;
);
-////%ColorRgb2Cmyk end////
+////%Colorrgb2cmyk end////
-////%ColorCmyk2Rgb start////
-ColorCmyk2Rgb(clr):=(
+////%Colorcmyk2rgb start////
+Colorcmyk2rgb(clr):=(
// help:ColorRgb([0.2,0.5,0.1,0.2]);
regional(clrnew,tmp,black);
black=clr_4;
@@ -3102,7 +3182,7 @@ ColorCmyk2Rgb(clr):=(
clrnew=tmp_(1..3);
clrnew;
);
-////%ColorCmyk2Rgb end////
+////%Colorcmyk2rgb end////
////%Colorrgbhsv start////
Colorrgbhsv(rgb):=(
@@ -3215,16 +3295,16 @@ Colorhslrgb(hsl):=(
var2 = ( ll + ss ) - ( ss * ll );
);
var1 = 2.0 * ll - var2;
- rr = hue2rgb( var1, var2, hh + ( 1.0 / 3.0 ) );
- gg = hue2rgb( var1, var2, hh );
- bb = hue2rgb( var1, var2, hh - ( 1.0 / 3.0 ) );
+ rr = Hue2rgb( var1, var2, hh + ( 1.0 / 3.0 ) );
+ gg = Hue2rgb( var1, var2, hh );
+ bb = Hue2rgb( var1, var2, hh - ( 1.0 / 3.0 ) );
);
[rr,gg,bb];
);
////%Colorhslrgb end////
-////%Colorhue2rgb start////
-hue2rgb(vv1,vv2,vh):=(
+////%Hue2rgb start////
+Hue2rgb(vv1,vv2,vh):=(
regional(out);
if ( vh < 0.0 ,vh =vh+1);
if ( vh > 1.0 ,vh =vh-1);
@@ -3243,7 +3323,7 @@ hue2rgb(vv1,vv2,vh):=(
);
out;
);
-////%Colorhue2rgb end////
+////%Hue2rgb end////
////%Colorrgbhwb start////
Colorrgbhwb(sL):=(
@@ -3365,36 +3445,51 @@ GetLinestyle(str,name):=(
noflg=parse(substring(str,0,1));
if(substring(name,0,3)=="sub",subflg=1,subflg=0); // 16.02.29
tmp1=substring(str,1,3);
+ tmp2=""; //190119from
+ tmp=indexof(str,",");
+ if(tmp>0,
+ tmp2=substring(str,tmp,length(str));
+ ); //190119to
if(tmp1=="dr" % tmp1=="Dr",
- Ltype=0;
+// Ltype=0;
+ if(length(tmp2)==0,tmp2="1"); //190125
+ Ltype=[0,tmp2]; //190119
if(noflg==0 & subflg==0, // 16.02.29
Drwline(name+Dop);
);
);
if(tmp1=="da" % tmp1=="Da",
- Ltype=1;
+// Ltype=1;
+ if(length(tmp2)==0,tmp2="1,1"); //190125
+ Ltype=[1,tmp2]; //190119
if(noflg==0 & subflg==0, // 16.02.29
Dashline(name+Dop);
);
);
if(tmp1=="id" % tmp1=="Id",
- Ltype=2; // 15.11.09
+// Ltype=2; // 15.11.09
+ if(length(tmp2)==0,tmp2="1,1"); //190125
+ Ltype=[2,tmp2]; //190119
if(noflg==0 & subflg==0, // 16.02.29
Invdashline(name+Dop);
);
);
if(tmp1=="do" % tmp1=="Do",
- Ltype=3;
+// Ltype=3;
+ if(length(tmp2)==0,tmp2="1,1"); //190125
+ Ltype=[3,tmp2]; //190119
if(noflg==0 & subflg==0, // 16.02.29
Dottedline(name+Dop);
);
);
if(tmp1=="dp" % tmp1=="Dp",
- Ltype=0;
+// Ltype=0;
+ if(length(tmp2)==0,tmp2="1"); //190125
+ Ltype=[0,tmp2]; //190119
tmp1=parse(name);
tmp2="";
forall(tmp1,
- tmp2=tmp2+textformat(#_1,5)+",";
+ tmp2=tmp2+Textformat(#_1,5)+",";
);
tmp2=substring(tmp2,0,length(tmp2)-1);
if(noflg==0,
@@ -3439,7 +3534,7 @@ Chunderscore(str):=(
);
if(indexof(str,"]")>0,
tmp1=replace(tmp1,",]",")");
- tmp1=replace(tmp1,"[","list(");
+ tmp1=replace(tmp1,"[","list"+PaO());
,
tmp1=substring(tmp1,0,length(tmp1)-1);
);
@@ -3480,11 +3575,11 @@ AddGraph(nm,pltdata,options):=(
pdata=tmp1;
if(Noflg<3,
println("generate addgraph "+name);
- tmp=name+"="+textformat(pdata,5);
+ tmp=name+"="+Textformat(pdata,5);
parse(tmp);
if(isstring(pltdata), // 16.04.04 from
if(indexof(pltdata,"]")>0,
- tmp1="list(Listplot("+substring(pltdata,1,length(pltdata));
+ tmp1="list"+PaO()+"Listplot"+PaO()+substring(pltdata,1,length(pltdata));
tmp1=replace(tmp1,"]",",]");
,
tmp1="Listplot("+substring(pltdata,0,length(pltdata))+",]";
@@ -3513,37 +3608,37 @@ AddGraph(nm,pltdata,options):=(
if(indexof(pltdata,"[")>0,
tmp1=tmp1+")";
);
- GLIST=append(GLIST,name+"="+tmp1);
+ GLIST=append(GLIST,name+"="+tmp1); //no ketjs
,
if(MeasureDepth(pdata)==1,
- tmp1=name+"=Listplot("+textformat(pdata,5)+")";
+ tmp1=name+"=Listplot("+Textformat(pdata,5)+")";
,
- tmp1="list(";
+ tmp1="list"+PaO();
forall(1..(length(pdata)),
- tmp=name+"p"+textformat(#,5)+"=";
+ tmp=name+"p"+Textformat(#,5)+"=";
if(length(pdata_#)>1, // 15.01.22
- tmp=tmp+"Listplot("+textformat(pdata_#,5)+")";
+ tmp=tmp+"Listplot("+Textformat(pdata_#,5)+")";
,
- tmp=tmp+"Pointdata("+textformat(pdata_#_1,5)+")";
+ tmp=tmp+"Pointdata("+Textformat(pdata_#_1,5)+")";
);
- GLIST=append(GLIST,tmp);
- tmp1=tmp1+name+"p"+textformat(#,5)+",";
+ GLIST=append(GLIST,tmp); //no ketjs
+ tmp1=tmp1+name+"p"+Textformat(#,5)+",";
);
tmp1=name+"="+substring(tmp1,0,length(tmp1)-1)+")";
);
- GLIST=append(GLIST,tmp1);
+ GLIST=append(GLIST,tmp1); //no ketjs
);
); // 16.04.04 until
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
+ ); //no ketjs off
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -3600,7 +3695,7 @@ Joincrvs(nm,plotstrL,options):=(
pS=Ptstart(PtL);
pQ=Ptstart(Qd);
pR=Ptend(Qd);
- rMN=min([|pP-pQ|,|pP-pR|,|pS-pQ|,|pS-pR|]);
+ rMN=min([|pP-pQ|,|pP-pR|,|pS-pQ|,|pS-pR|]);
if(rMN==|pP-pR|,
Qd=reverse(Qd);
,
@@ -3624,25 +3719,25 @@ Joincrvs(nm,plotstrL,options):=(
if(Noflg<3,
println("generate joincurve "+name);
tmp1=apply(PtL,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
tmp1="";
forall(plotstrL,
tmp1=tmp1+#+",";
);
tmp1=substring(tmp1,0,length(tmp1)-1);
- GLIST=append(GLIST,name+"=Joincrvs("+tmp1+")");
+ GLIST=append(GLIST,name+"=Joincrvs("+tmp1+")"); //no ketjs
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -3680,7 +3775,7 @@ Partcrv(nm,pA,pB,PkLstr,options):=(
Out2=Partcrv("",1,pB,PkLstr,["nodata"]);
tmp=Ptstart(PkL)-Ptend(PkL);
if(|tmp|<Eps,
- Ans=Joincrvs("",[Out1,Out2],["nodata"]);
+ Ans=Joincrvs("",[Out1,Out2],["nodata"]);
,
Ans=[apply(Out1,Pcrd(#)),apply(Out2,Pcrd(#))];
);
@@ -3688,8 +3783,8 @@ Partcrv(nm,pA,pB,PkLstr,options):=(
);
if(Flg==0,
nS=ceil(pA);
- nE=floor(pB);
- PPL=[];
+ nE=floor(pB);
+ PPL=[];
if(pA<nS-Eps,
pP=(nS-pA)*PkL_(nS-1)+(1-nS+pA)*PkL_nS;
PPL=[pP];
@@ -3707,14 +3802,14 @@ Partcrv(nm,pA,pB,PkLstr,options):=(
tmp=Nearestpt(LLcrd(Pcrd(pA)),PkL);
Ta=tmp_2;
tmp=Nearestpt(LLcrd(Pcrd(pB)),PkL); // 15.09.12
- Tb=tmp_2;
+ Tb=tmp_2;
Ans=Partcrv("",Ta,Tb,PkL,["nodata"] );
Ans=apply(Ans,Pcrd(#));
);
if(Noflg<3,
println("generate partcrv "+name);
tmp1=apply(Ans,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
// GLIST=append(GLIST, // 16.04.03
if(DepthFlg==0,
@@ -3722,20 +3817,20 @@ Partcrv(nm,pA,pB,PkLstr,options):=(
,
tmp=PkLstr+"(1)";
);
- tmp1=name+"=Partcrv("+textformat(Lcrd(pA),5)
- +","+textformat(Lcrd(pB),5)+","+tmp+")"; // 16.04.03
- GLIST=append(GLIST,tmp1);
+ tmp1=name+"=Partcrv("+Textformat(Lcrd(pA),5)
+ +","+Textformat(Lcrd(pB),5)+","+tmp+")"; // 16.04.03
+ GLIST=append(GLIST,tmp1); //no ketjs
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -3761,8 +3856,11 @@ Pointdata(nm,list):=Pointdata(nm,list,[]);
Pointdata(nm,listorg,options):=(
//help:Pointdata("1",[2,4],["Size=5"]);
//help:Pointdata("2",[[2,3],[4,1]]);
+//help:Pointdata(options=["Size=(1)","Disp=(y)","Inside="]);
+//help:Pointdata("Inside=1(def)/ratio/rgblist/colorname/-1"]);
regional(list,name,nameL,ptlist,opstr,opcindy,
- eqL,dispflg,size,thick,tmp,tmp1,tmp2,tmp3,Ltype,Noflg,color);
+ eqL,dispflg,size,thick,tmp,tmp1,tmp2,tmp3,
+ Ltype,Noflg,color,inside);
name="pt"+nm;
nameL=name+"L";
tmp=Divoptions(options);
@@ -3770,65 +3868,80 @@ Pointdata(nm,listorg,options):=(
Noflg=tmp_2;
eqL=tmp_5;
opcindy=tmp_(length(tmp));
- opstr=tmp_(length(tmp)-1);
+// opstr=tmp_(length(tmp)-1);
color=tmp_(length(tmp)-2);
size="";
dispflg="Y";
- if(length(eqL)>0,
- forall(eqL,
- tmp=Strsplit(#,"=");
- tmp1=Toupper(substring(tmp_1,0,1));
- tmp2=Toupper(substring(tmp_2,0,1));
- if(tmp1=="S",
- size=tmp2;
- opcindy=opcindy+",size->"+text(size); //181013
- );
- if(tmp1=="D", //181030from
- dispflg=tmp2;
- );
+ inside=color;
+ forall(eqL,
+ tmp=Strsplit(#,"=");
+ tmp1=Toupper(substring(tmp_1,0,1));
+ if(tmp1=="S",
+ size=Toupper(substring(tmp_2,0,1));;
+ opcindy=opcindy+",size->"+text(size); //181013
+ );
+ if(tmp1=="D", //181030from
+ dispflg=Toupper(substring(tmp_2,0,1));
);
+ if(tmp1=="I", //181229from
+ if(contains(["","no"],tmp_2),
+ if(tmp_2=="no",inside=append(inside,-1));
+ ,
+ tmp2=substring(tmp_2,0,1);
+ if(contains(["-","0","1",".","["],tmp2),
+ tmp=parse(tmp_2);
+ if(length(tmp)==4,tmp=Colorcmyk2rgb(tmp)); //190115
+ if(!isstring(tmp),tmp=[tmp]);
+ ,
+ tmp=Colorname2rgb(tmp_2);
+ );
+ inside=concat(inside,tmp);
+ );
+ ); //181229to
);
if(dispflg=="Y",
println("generate pointdata "+name);
); //181030to
- if(isstring(listorg),list=parse(listorg),list=listorg); //17.10.23
+ if(isstring(listorg),
+ list=parse(listorg)
+ ,
+ list=listorg
+ ); //17.10.23
if(MeasureDepth(list)==0,list=[list]);//180530
tmp=MeasureDepth(list);
- if(tmp>0, // 2015.02.21
- if(tmp==1,ptlist=list,ptlist=list_1);
- tmp=apply(ptlist,[textformat(Pcrd(#),5)]);
- tmp1=text(tmp);
- tmp2=substring(tmp1,1,length(tmp1)-1);
- tmp3=tmp1;
- ,
- ptlist=list;
- tmp1=textformat(Pcrd(ptlist),5);
- tmp2=tmp1;
- tmp3="["+tmp1+"]";
- );
+ if(tmp==1,ptlist=list,ptlist=list_1); //190126from
+ tmp=apply(ptlist,[Textformat(Pcrd(#),5)]);
+ tmp1=text(tmp);
+ tmp2=substring(tmp1,1,length(tmp1)-1);
+ tmp3=tmp1;
tmp=name+"="+tmp1;
parse(tmp);
tmp=nameL+"="+tmp3;
- parse(tmp);
+ parse(tmp); //190126to
if(Noflg<3,
if(isstring(listorg), //17.10.23
tmp2=listorg;
,
- tmp2="list("; //17.10.10from
+ tmp2="list"+PaO(); //17.10.10from
forall(list,
if(isstring(#),
tmp=#;
,
- if(ispoint(#),tmp=text(#),tmp=textformat(#,6));
+ if(ispoint(#),
+ tmp=text(#);
+ ,
+ tmp=Textformat(#,6);
+ );
);
tmp2=tmp2+tmp+",";
);
- tmp2=substring(tmp2,0,length(tmp2)-1)+")"; //17.10.10until
+ tmp2=substring(tmp2,0,length(tmp2)-1)+")";
+ //17.10.10until
);
- GLIST=append(GLIST,name+"=Pointdata("+tmp2+")");
+ GLIST=append(GLIST,name+"=Pointdata("+tmp2+")"); //no ketjs
);
if(Noflg<2,
- tmp=[nameL,0,opcindy];
+ tmp=[nameL,[0,1],opcindy]; //190126
GCLIST=append(GCLIST,tmp);
if(Noflg==0,
if(length(size)>0,
@@ -3838,17 +3951,20 @@ Pointdata(nm,listorg,options):=(
if(length(size)>0,tmp1=parse(size),tmp1=1);
tmp1=max(tmp1,1)/8;
Setpen(tmp1); // 16.04.09 until
- if((Noflg==0)&(color!=KCOLOR), //181020
- Texcom("{");Com2nd("Setcolor("+color+")");//180711
- );
- Com2nd("Drwpt(list("+name+")"+opstr+")");
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
+ Texcom("{");
+ Com2nd("Setcolor("+color+")");//180711
+ ); //no ketjs off
+ opstr=","+Textformat(inside,2);
+ Com2nd("Drwpt"+PaO()+"list"+PaO()+name+")"+opstr+")");
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180711
- );
+ ); //no ketjs off
Setpen(thick); // 16.04.09
- if(length(size)>0,
- Com2nd("Setpt("+textformat(TenSize/TenSizeInit,1)+")");
- );
+ if(length(size)>0, //no ketjs on
+ tmp=Textformat(TenSize/TenSizeInit,1);
+ Com2nd("Setpt("+tmp+")");
+ ); //no ketjs off
);
);
ptlist;
@@ -3856,6 +3972,23 @@ Pointdata(nm,listorg,options):=(
////%Pointdata end////
////%Listplot start////
+Listplot(list):=Listplot(list,[]);
+Listplot(Arg1,Arg2):=(
+ regional(name,list,options,str);
+ if(isstring(Arg1),
+ name=Arg1;
+ list=Arg2;
+ Listplot(name,list,[]);
+ ,
+ list=Arg1;
+ options=Arg2;
+ name="";
+ forall(list, // 16.10.07from
+ name=name+#.name;
+ );// 16.10.07until
+ Listplot(name,list,options);
+ );
+);
Listplot(nm,list,options):=(
//help:Listplot([A,B]);
// help:Listplot(["A","B"]);
@@ -3866,7 +3999,7 @@ Listplot(nm,list,options):=(
name=substring(nm,1,length(nm));
,
name="sg"+nm;
- ); // until
+ ); // upto
tmp=Divoptions(options);
Ltype=tmp_1;
Noflg=tmp_2;
@@ -3877,7 +4010,7 @@ Listplot(nm,list,options):=(
cutend=[0,0];//180719
forall(eqL,
tmp=Strsplit(#,"=");
- tmp1=Toupper(substring(tmp_1,0,1));
+ tmp1=Toupper(substring(tmp_1,0,1));
tmp2=tmp_2;
if(tmp1=="M",
tmp=Toupper(substring(tmp2,0,1));
@@ -3904,19 +4037,19 @@ Listplot(nm,list,options):=(
ptlist_1=ptlist_1+tmp*cutend_1;
ptlist_(length(ptlist))=ptlist_(length(ptlist))-tmp*cutend_2;
);//180719to
- tmp=name+"="+textformat(ptlist,5);
+ tmp=name+"="+Textformat(ptlist,5);
parse(tmp);
- GLIST=append(GLIST,name+"=Listplot("+textformat(ptlist,5)+")"); // 180719
+ GLIST=append(GLIST,name+"=Listplot("+Textformat(ptlist,5)+")"); // 180719 //no ketjs
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180711
- );
+ ); //no ketjs off
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180711
- );
+ ); //no ketjs off
,
if(Noflg==1,Ltype=0);
);
@@ -3925,23 +4058,6 @@ Listplot(nm,list,options):=(
tmp1=apply(list,Lcrd(#));
tmp1;
);
-Listplot(Arg1,Arg2):=(
- regional(name,list,options,str);
- if(isstring(Arg1),
- name=Arg1;
- list=Arg2;
- Listplot(name,list,[]);
- ,
- list=Arg1;
- options=Arg2;
- name="";
- forall(list, // 16.10.07from
- name=name+#.name;
- );// 16.10.07until
- Listplot(name,list,options);
- );
-);
-Listplot(list):=Listplot(list,[]);
////%Listplot end////
////%Lineplot start////
@@ -3977,20 +4093,20 @@ Lineplot(nm,list,options):=(
if(Noflg<3,
println("generate Lineplot "+name);
tmp1=apply(Out,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- GLIST=append(GLIST,name+"=Lineplot("+textformat(list,5)+opstr+")");
+ GLIST=append(GLIST,name+"=Lineplot("+Textformat(list,5)+opstr+")"); //no ketjs
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
+ ); //no ketjs off
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -4049,7 +4165,7 @@ Plotdata(name1,func,variable,options):=(
if(substring(#,0,1)=="E",
if(substring(tmp1,0,1)=="[", //180817from
Ec=parse(tmp1);
- tmp1=replace(tmp1,"[","c(");
+ tmp1=replace(tmp1,"[","c"+PaO());
tmp1=replace(tmp1,",",".0,");
tmp1=replace(tmp1,"]",".0)");
opstr=opstr+","+Dqq("Exc="+tmp1); //180817to
@@ -4084,7 +4200,7 @@ Plotdata(name1,func,variable,options):=(
PdL=[];
Ke=1;
forall(0..Num,
- xx=x1+#*(x2-x1)/Num; // differs from Scilab ( / Num-1)
+ xx=x1+#*(x2-x1)/Num; // differs from Scilab [ / Num-1]
if(length(Exfun)>0,
tmp=parse(Exfun);
if(abs(tmp)<Eps,
@@ -4103,7 +4219,7 @@ Plotdata(name1,func,variable,options):=(
,
PdL=concat(PdL,[["inf"],tmp]);
);
- );
+ );
,
PdL=[tmp];
);
@@ -4172,22 +4288,22 @@ Plotdata(name1,func,variable,options):=(
tmp1=append(tmp1,apply(tmp2,Pcrd(#)));
);
);
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp1=replace(func,LFmark,"");
+ tmp1=replace(func,LFmark,""); //no ketjs on
tmp2=replace(variable,LFmark,"");
tmp=name+"=Plotdata('"+tmp1+"','"+tmp2+"'"+opstr+")";
- GLIST=append(GLIST,tmp);
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
+ ); //no ketjs off
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
+ ); //no ketjs off
,
if(Noflg==1,Ltype=0);
);
@@ -4197,13 +4313,13 @@ Plotdata(name1,func,variable,options):=(
,
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
+ ); //no ketjs off
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
+ ); //no ketjs off
,
if(Noflg==1,Ltype=0);
);
@@ -4220,7 +4336,7 @@ Paramplot(nm,funstr,variable):=Paramplot(nm,funstr,variable,[]);
Paramplot(nm,funstr,variable,options):=(
//help:Paramplot("1","[2*cos(t),sin(t)]","t=[0,2*pi]");
regional(name,Out,tmp,tmp1,tmp2,vname,func,str,Rng,Num,
- Ec,Exfun,Dc,eqL,Fntmp,Vatmp,t1,t2,dt,tt,pa,ke,
+ Ec,Exfun,Dc,eqL,Fntmp,Vatmp,t1,t2,dt,tt,pa,ke, pt, //190103
Ltype,Noflg,Inflg,Outflg,opstr,opcindy,color);
if(substring(nm,0,1)=="-", // 180928from
name=substring(nm,1,length(nm));
@@ -4251,7 +4367,7 @@ Paramplot(nm,funstr,variable,options):=(
if(substring(#,0,1)=="E",
if(substring(tmp1,0,1)=="[", //180817from
Ec=parse(tmp1);
- tmp1=replace(tmp1,"[","c(");
+ tmp1=replace(tmp1,"[","c"+PaO());
tmp1=replace(tmp1,",",".0,");
tmp1=replace(tmp1,"]",".0)");
opstr=opstr+","+Dqq("Exc="+tmp1); //180817to
@@ -4342,22 +4458,22 @@ Paramplot(nm,funstr,variable,options):=(
tmp1=append(tmp1,apply(tmp2,Pcrd(#)));
);
);
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp1=replace(funstr,LFmark,""); // 15.11.13
+ tmp1=replace(funstr,LFmark,""); // 15.11.13 //no ketjs on
tmp2=replace(variable,LFmark,"");
tmp=name+"=Paramplot('"+tmp1+"','"+tmp2+"'"+opstr+")";
- GLIST=append(GLIST,tmp);
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
+ ); //no ketjs off
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
+ ); //no ketjs off
,
if(Noflg==1,Ltype=0);
);
@@ -4367,14 +4483,14 @@ Paramplot(nm,funstr,variable,options):=(
,
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
+ ); //no ketjs off
Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
if(Inflg==1,
@@ -4408,7 +4524,7 @@ Connectseg(Pdata):=(
ctr=0;
while((length(vL)>0)&(ctr<1000),
ctr=ctr+1;
- qd=PlotL_(length(PlotL));
+ qd=PlotL_(length(PlotL));
ah=qd_1; ao=qd_(length(qd));
flg=0;
forall(1..(length(vL)),jj,
@@ -4416,7 +4532,7 @@ Connectseg(Pdata):=(
tmp1=Pdata_(vL_jj);
pp=tmp1_1; qq=tmp1_(length(tmp1));
if(Norm(pp-ao)<Eps,
- tmp=tmp1_(2..(length(tmp1)));
+ tmp=tmp1_(2..(length(tmp1)));
if(length(tmp)>0,
qd=concat(qd,tmp);
);
@@ -4560,7 +4676,7 @@ Implicitplot(name1,func,xrng,yrng,optionsorg):=(
xval1=xval2;
eval11=eval21;
eval12=eval22;
- if(length(qL)==2,
+ if(length(qL)==2,
out=append(out,qL);
);
);
@@ -4583,21 +4699,21 @@ Implicitplot(name1,func,xrng,yrng,optionsorg):=(
tmp1=append(tmp1,apply(tmp2,Pcrd(#)));
);
);
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp=name+"=Implicitplot('"+func+"','"+xrng+"','"+yrng+"'"+opstr+")";
- GLIST=append(GLIST,tmp);
+ tmp=name+"=Implicitplot('"+func+"','"+xrng+"','"+yrng+"'"+opstr+")"; //no ketjs
+ GLIST=append(GLIST,tmp); //no ketjs
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -4688,9 +4804,9 @@ Circledata(nm,cenrad,options):=(
if(Noflg<3,
println("generate Circledata "+name);
tmp1=apply(Out,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- if(length(cenrad)==2,
+ if(length(cenrad)==2, //no ketjs on
tmp=name+"=Circledata("+cenrad+opstr+")";
,
if(ra>0,
@@ -4699,18 +4815,18 @@ Circledata(nm,cenrad,options):=(
tmp=name+"=Lineplot("+cenrad_1+","+cenrad_2+")";
);
);
- GLIST=append(GLIST,tmp);
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -4790,20 +4906,20 @@ Framedata(nm,list,optionsorg):=(
if(Noflg<3,
println("generate Framedata "+name);
tmp1=apply(Out,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- GLIST=append(GLIST,name+"=Framedata("+pA+","+dx+","+dy+")");
+ GLIST=append(GLIST,name+"=Framedata("+pA+","+dx+","+dy+")"); //no ketjs
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //181020
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //181020
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //181020 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -4826,20 +4942,20 @@ Framedata(nm,cent,dx,dy,options):=(
if(Noflg<3,
println("generate Framedata "+name);
tmp1=apply(Out,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- GLIST=append(GLIST,name+"=Framedata("+cent.xy+","+dx+","+dy+")");
+ GLIST=append(GLIST,name+"=Framedata("+cent.xy+","+dx+","+dy+")"); //no ketjs
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -4906,28 +5022,28 @@ Ovaldata(nm,Pdata,options):=(
if(Noflg<3,
println("generate Ovaldata "+name);
tmp1=apply(Graph,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- GLIST=append(GLIST,
- name+"=Ovaldata("+Ctr+","+Dx+","+Dy+opstr+")");//16.01.30
+ GLIST=append(GLIST, //no ketjs
+ name+"=Ovaldata("+Ctr+","+Dx+","+Dy+opstr+")");//16.01.30 //no ketjs
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
tmp1=apply(Graph,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp=textformat(Ctr,5)+","+textformat(Dx,5)+","+textformat(Dy,5);
+ tmp=Textformat(Ctr,5)+","+Textformat(Dx,5)+","+Textformat(Dy,5);
);
Graph;
);
@@ -5035,7 +5151,7 @@ Parabolaplot(nm,ptlist,rng,options):=(
tmp=tmp+"+("+format(tmp2,5)+")";
tmp1=parse(rng);
tmp1=[pA_1-(tmp1_2-tmp1_1)/2,pA_1+(tmp1_2-tmp1_1)/2];
- tmp2="x="+textformat(tmp1,5);
+ tmp2="x="+Textformat(tmp1,5);
Plotdata(nm+"para",tmp,tmp2,append(options,"nodisp"));
Rotatedata(nm+"para","gr"+nm+"para",angle,append(options,pB));
);
@@ -5194,7 +5310,7 @@ println([4573,ptlist]);
tmp=angle+#*2*pi/number;
tmp1=pA+rr*[cos(tmp),sin(tmp)];
if(#>0 & #<number,
- if((ispoint(ptlist_2))&(geo=="Y"), //180708(3lines)
+ if((ispoint(ptlist_2))&(geo=="Y"), //180708[3lines]
Putpoint((ptlist_2).name+text(#),tmp1);//16.10.07
);
//Pointdata(nm,ptL);
@@ -5266,7 +5382,7 @@ Setarrow(arglist):=(
);
[YaSize,YaAngle,YaPosition,YaCut,YasenStyle];
);
-////%Setarrow start////
+////%Setarrow end////
////%Arrowheaddata start////
@@ -5331,7 +5447,7 @@ Arrowheaddata(point,direction,options):=(
);
);
gG=apply(0..10,pP+ookisa*cos(hiraki)*[cos(2*pi/10*#),sin(2*pi/10*#)]);
- Flg=0;
+ Flg=0;
forall(1..rF,Nj,
if(Flg==0,
pB=Ptcrv(rF+1-Nj,Houkou);
@@ -5429,7 +5545,7 @@ Arrowhead(nm,point,direction,optionsorg):=(//181018from
if(!Inwindow(LLcrd(pP)),Noflg=2);//181018
if(Noflg<3,
tmp1=apply(list,LLcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
);
if(Noflg<2,
@@ -5451,14 +5567,14 @@ Arrowhead(nm,point,direction,optionsorg):=(//181018from
hostr=format(apply(Houkou,LLcrd(#)),5);
);
);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
+ ); //no ketjs off
Com2nd("Arrowhead("+ptstr+","+hostr+opstr+")");
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
-);
+ ); //no ketjs off
+ );
);
////%Arrowhead end////
@@ -5580,7 +5696,7 @@ Anglemark(Arg1,Arg2):=( // 2015.04.28 from
,
plist=Arg1;
options=Arg2;
- tmp=textformat(plist,5);
+ tmp=Textformat(plist,5);
tmp=replace(tmp,",","");
nm=substring(tmp,1,length(tmp)-1);
Anglemark(nm,plist,options);
@@ -5642,34 +5758,34 @@ Anglemark(nm,plist,options):=(
Th=Rg_1+#*(Rg_2-Rg_1)/Num;
Out=append(Out,Ctr+ra*[cos(Th),sin(Th)]);
);
- Th=(Rg_1+Rg_2)/2; //16.10.31from(moved)
+ Th=(Rg_1+Rg_2)/2; //16.10.31from[moved]
tmp1=Ctr+Brat*ra*[cos(Th),sin(Th)];
tmp="Defvar("+Dq+Bpos+"=";
- tmp=tmp+textformat(tmp1,5)+Dq+");";
- parse(tmp);//16.10.31until(moved)
+ tmp=tmp+Textformat(tmp1,5)+Dq+");";
+ parse(tmp);//16.10.31to[moved]
if(length(Bname)>0,
parse(Bname);
);
if(Noflg<3,
println("generate anglemark "+name+" and "+Bpos);
tmp1=apply(Out,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp=textformat(plist,5);
+ tmp=Textformat(plist,5); //no ketjs on
tmp1=substring(tmp,1,length(tmp)-1);
tmp=name+"=Anglemark("+tmp1+opstr+")";
- GLIST=append(GLIST,tmp);
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -5690,7 +5806,7 @@ Paramark(Arg1,Arg2):=( // 17.03.27 from
,
plist=Arg1;
options=Arg2;
- tmp=textformat(plist,5);
+ tmp=Textformat(plist,5);
tmp=replace(tmp,",","");
nm=substring(tmp,1,length(tmp)-1);
Paramark(nm,plist,options);
@@ -5738,29 +5854,29 @@ Paramark(nm,plist,options):=(
Out=append(Out,pA+ra*(pC-pA)/|pC-pA|);
if(length(Bname)>0,
tmp1=pA+Brat*ra*(pB-pA)/|pB-pA|+Brat*ra*(pC-pA)/|pC-pA|;
- tmp="Defvar("+Dq+Bpos+"="+textformat(tmp1,5)+Dq+");";
+ tmp="Defvar("+Dq+Bpos+"="+Textformat(tmp1,5)+Dq+");";
parse(tmp);
- parse(Bname);
+ parse(Bname);
);
if(Noflg<3,
println("generate paramark "+name);
tmp1=apply(Out,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp1=substring(textformat(plist,5),1,length(textformat(plist,5))-1);
+ tmp1=substring(Textformat(plist,5),1,length(Textformat(plist,5))-1); //no ketjs on
tmp=name+"=Paramark("+tmp1+opstr+")";
- GLIST=append(GLIST,tmp);
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -5791,7 +5907,7 @@ Bowdata(plist):=Bowdata(plist,[]);
Bowdata(plist,options):=(
regional(nm,tmp);
if(islist(plist), // 16.12.04from
- tmp=textformat(plist,5);
+ tmp=Textformat(plist,5);
tmp=replace(tmp,",","");
nm=substring(tmp,1,length(tmp)-1);
Bowdata(nm,plist,options);
@@ -5854,9 +5970,9 @@ Bowdata(nm,plist,options):=(
ra=Ydata_2;
Th=(Ydata_3+Ydata_4)*0.5;
BOWMIDDLE=[pC_1+ra*cos(Th),pC_2+ra*sin(Th)];
- Bpos="md"+name; // 16.10.31from(moved)
- tmp="Defvar("+Dq+Bpos+"="+textformat(BOWMIDDLE,5)+Dq+");";
- parse(tmp);// 16.10.31until(moved)
+ Bpos="md"+name; // 16.10.31from[moved]
+ tmp="Defvar("+Dq+Bpos+"="+Textformat(BOWMIDDLE,5)+Dq+");";
+ parse(tmp);// 16.10.31to[moved]
if(length(Bname)>0, //16.11.01from
tmp=indexof(Bops,",");
if(tmp>0,
@@ -5892,7 +6008,7 @@ Bowdata(nm,plist,options):=(
Bname=Bname+",";
if(indexof(Bname,"rot")>0,
if(rev==1,tmp=pB-pA,tmp=pA-pB);
- Bname=Bname+textformat(tmp,5)+",";
+ Bname=Bname+Textformat(tmp,5)+",";
,
Bname=Bname+Dq+"c"+Dq+",";
);
@@ -5927,27 +6043,27 @@ Bowdata(nm,plist,options):=(
if(Noflg<3,
println("generate bowdata "+name+" and "+Bpos);//16.10.31
if(MeasureDepth(Out)==1,Out=[Out]);
- tmp1=[];
+ tmp1=[];
forall(Out,tmp2,
tmp=apply(tmp2,Pcrd(#));
tmp1=append(tmp1,tmp);
);
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp1=substring(textformat(plist,5),1,length(textformat(plist,5))-1);
+ tmp1=substring(Textformat(plist,5),1,length(Textformat(plist,5))-1); //no ketjs on
tmp=name+"=Bowdata("+tmp1+opstr+")";
- GLIST=append(GLIST,tmp);
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
- Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
+ Texcom("}");//180722
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -6082,7 +6198,7 @@ Deqplot(nm,deqorg,rngorg,initt,initf,options):=( //17.10.06
);
rng=rngorg;
if(indexof(rng,"=")==0,
- rng=rng+"="+textformat([XMIN,XMAX],6);
+ rng=rng+"="+Textformat([XMIN,XMAX],6);
);
deq=deqorg;
deq=replace(deq,"'","`"); //180527
@@ -6137,33 +6253,33 @@ Deqplot(nm,deqorg,rngorg,initt,initf,options):=( //17.10.06
deq=deq+"]";
);
if(Noflg<3,
- pdL=deqdata(deq,rng,initt,initf,Num);
+ pdL=Deqdata(deq,rng,initt,initf,Num);
if(phase==1,
pdL=apply(pdL,#_(2..3));
);
tmp1=apply(pdL,Pcrd(#));
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
);
- if(Noflg<1,
+ if(Noflg<1, //no ketjs on
tmp=Assign(deq);
tmp=replace(deq,"'","`");
tmp=name+"=Deqplot('"+tmp+"','"+rng+"',";
- tmp=tmp+format(initt,6)+","+textformat(initf,6);
+ tmp=tmp+format(initt,6)+","+Textformat(initf,6);
tmp=tmp+","+text(sel)+",'Num="+text(Num)+"')";
tmp=RSform(tmp);
GLIST=append(GLIST,tmp);
- );
+ ); //no ketjs off
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -6194,7 +6310,7 @@ EnclosingS(nm,plist,options):=(
Start=[];
Flg=0;
forall(realL,
- if(isList(#) % ispoint(#),
+ if(islist(#) % ispoint(#),
Start=Lcrd(#); // 15.09.12
,
Flg=Flg+1;
@@ -6305,26 +6421,26 @@ EnclosingS(nm,plist,options):=(
AnsL_(length(AnsL))=AnsL_1;//16.10.20
if(Noflg<3,
println("generate Enclosing "+name);
- tmp=name+"="+textformat(AnsL,5);
+ tmp=name+"="+Textformat(AnsL,5);
parse(tmp);
- tmp=name+"=Enclosing(";//16.11.07from
- tmp1="list(";
+ tmp=name+"=Enclosing(";//16.11.07from //no ketjs on
+ tmp1="list"+PaO();
forall(plist,
tmp1=tmp1+#+",";
);
tmp=tmp+substring(tmp1,0,length(tmp1)-1)+")"+opstr+")";
- GLIST=append(GLIST,tmp);//16.11.07until
+ GLIST=append(GLIST,tmp);//16.11.07to //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -6336,7 +6452,7 @@ EnclosingS(nm,plist,options):=(
/////////// new enclosing ///////////
////%Enclosing start////
-Enclosing(nm,plist):=Enclosing2(nm,plist,[]);//180706(2lines)
+Enclosing(nm,plist):=Enclosing2(nm,plist,[]);//180706[2lines]
Enclosing(nm,plistorg,options):=Enclosing2(nm,plistorg,options);
Enclosing2(nm,plist):=Enclosing2(nm,plist,[]);
Enclosing2(nm,plistorg,options):=(
@@ -6433,7 +6549,7 @@ Enclosing2(nm,plistorg,options):=(
tmp2=Prepend(Op(length(tmp1),tmp),tmp2);
Gdata=replace(Gdata,"(","");
Gdata=replace(Gdata,")","");
- tmp=Gdata+"="+textformat(tmp2,6);
+ tmp=Gdata+"="+Textformat(tmp2,6);
parse(tmp);
plist_nxtno=Gdata;
t2=Length(tmp1);
@@ -6474,28 +6590,28 @@ Enclosing2(nm,plistorg,options):=(
);
if(Noflg<3,
println("generate Enclosing "+name);
- tmp=name+"="+textformat(AnsL,5);
+ tmp=name+"="+Textformat(AnsL,5);
parse(tmp);
tmp=name+"=Enclosing2(";//16.11.07from
- tmp1="list(";
+ tmp1="list"+PaO();
forall(plistorg, //18.02.02
tmp1=tmp1+#+",";
);
- tmp=tmp+substring(tmp1,0,length(tmp1)-1)+")";//18.0706from
+ tmp=tmp+substring(tmp1,0,length(tmp1)-1)+")";//18.0706from //no ketjs on
if(length(Start)>0,tmp=tmp+","+Textformat(Start,6));
tmp=tmp+","+text(epspara)+")";//18.0706to,180707
- GLIST=append(GLIST,tmp);//16.11.07until
+ GLIST=append(GLIST,tmp);//16.11.07to //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -6524,7 +6640,7 @@ Makehatch(iolistorg,pt,vec,bdylist):=(
tmp="["+substring(tmp,0,length(tmp)-1)+"]";
iolist_#=parse(tmp);
);
- Scalebkup=[SCALEX,SCALEY];//181020(2lines)
+ Scalebkup=[SCALEX,SCALEY];//181020[2lines]
SCALEX=1;
SCALEY=1;
sg=Lineplot("",[pt,pt+vec],["nodata"]);
@@ -6697,14 +6813,14 @@ Hatchdatacindy(nm,iostr,bdylistorg,optionsorg):=(
);
);//180717to
if(tmp=="s",
- Listplot(name,[LLcrd(tmp2_1),[tmp2_1_1,2*YMIN-YMAX], //180717(2lines)
+ Listplot(name,[LLcrd(tmp2_1),[tmp2_1_1,2*YMIN-YMAX], //180717[2lines]
[tmp2_(length(tmp2))_1,2*YMIN-YMAX],LLcrd(tmp2_(length(tmp2)))],
["nodisp"]);
Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]);//180717
bname="join"+text(kk)+name;
);
if(tmp=="n",
- Listplot(name,[LLcrd(tmp2_1),[tmp2_1_1,2*YMAX-YMIN], //180717(2lines)
+ Listplot(name,[LLcrd(tmp2_1),[tmp2_1_1,2*YMAX-YMIN], //180717[2lines]
[tmp2_(length(tmp2))_1,2*YMAX-YMIN],LLcrd(tmp2_(length(tmp2)))],
["nodisp"]);
Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]);
@@ -6722,8 +6838,8 @@ Hatchdatacindy(nm,iostr,bdylistorg,optionsorg):=(
Joincrvs(text(kk)+name,[namep,"sg"+name],["nodisp"]);//180717
bname="join"+text(kk)+name;
);
- ,
- Enclosing2(text(kk)+name,tmp,["nodisp"]);//180619(2lines);
+ ,
+ Enclosing2(text(kk)+name,tmp,["nodisp"]);//180619[2lines]
bname="en"+text(kk)+name;
);
);
@@ -6851,7 +6967,7 @@ Hatchdatacindy(nm,iostr,bdylistorg,optionsorg):=(
vec=[cos(angle),sin(angle)];
nvec=[-sin(angle),cos(angle)];
AnsL=[];
- ctr=0;//181005(2lines)
+ ctr=0;//181005[2lines]
forall(0..(maxnum_1), kk,
pt=startP+kk*interval*nvec;
sha=Makehatch(iostr,pt,vec,bdylist);
@@ -6868,41 +6984,41 @@ Hatchdatacindy(nm,iostr,bdylistorg,optionsorg):=(
AnsL=concat(AnsL,sha);
);
);
- tmp1=apply(AnsL,textformat(#,5));
+ tmp1=apply(AnsL,Textformat(#,5));
tmp=name+"="+tmp1;
parse(tmp);
);
if((Noflg<3)&(mkflg>-1),
if(fileflg!="Y", //181102
println("generate Hatchdata "+name);
- tmp=name+"="+textformat(AnsL,5);
+ tmp=name+"="+Textformat(AnsL,5);
parse(tmp);
- if(!islist(iostr),tmp1=[iostr],tmp1=iostr);
- tmp="c(";
+ if(!islist(iostr),tmp1=[iostr],tmp1=iostr); //no ketjs on
+ tmp="c"+PaO();
forall(tmp1,
tmp=tmp+Dq+#+Dq+",";
);
tmp=substring(tmp,0,length(tmp)-1)+")";
tmp2=name+"=Hatchdata("+tmp;
forall(bdynameL,
- tmp2=tmp2+",list("+#+")";
+ tmp2=tmp2+",list"+PaO()+#+")";
);
tmp2=tmp2+opstr+")";
- GLIST=append(GLIST,tmp2);
+ GLIST=append(GLIST,tmp2); //no ketjs off
,
- GLIST=append(GLIST,"ReadOutData("+Dq+fname+Dq+")");//181102
+ GLIST=append(GLIST,"ReadOutData("+Dq+fname+Dq+")");//181102 //no ketjs
);
);
if((Noflg<2)&(mkflg>-1),
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -6980,7 +7096,7 @@ Shade(nm,plistorg,options):=( //180613to
);
); //180929to
if(length(color)==4, //180602from
- tmp=colorCmyk2rgb(color);
+ tmp=Colorcmyk2rgb(color);
);
flg=0; ctr=1;
if(encflg==1, //180929from
@@ -7004,7 +7120,7 @@ Shade(nm,plistorg,options):=( //180613to
tmp2=append(tmp2,tmp);
);
tmp1=Dqq("-"+name+text(ctr));
- tmp2=textformat(tmp2,6)+",["+Dqq("nodisp")+"]";
+ tmp2=Textformat(tmp2,6)+",["+Dqq("nodisp")+"]";
tmp=name+text(ctr)+"=Listplot("+tmp1+","+tmp2+")";
parse(tmp);
plist_jj=name+text(ctr);
@@ -7018,11 +7134,11 @@ Shade(nm,plistorg,options):=( //180613to
,
G2=Joincrvs("1",plist,["nodata"]);
G2=apply(G2,Pcrd(#));
- tmp1="fillpoly("+textformat(G2,5)+opcindy+");";
+ tmp1="fillpoly("+Textformat(G2,5)+opcindy+");";
parse(tmp1);
);
Str="Shade(";
- tmp1="list(";
+ tmp1="list"+PaO();
forall(plist,
if(isstring(#), // from 16.01.24
if(length(#)>1,
@@ -7031,13 +7147,13 @@ Shade(nm,plistorg,options):=( //180613to
tmp1=tmp1+Dq+#+Dq+",";
);
,
- tmp1=tmp1+"Listplot("+textformat(#,5)+"),";
+ tmp1=tmp1+"Listplot("+Textformat(#,5)+"),";
); //16.01.24to
);
Str=Str+substring(tmp1,0,length(tmp1)-1)+")"+")"; //180929
- Com2nd("Texcom("+Dqq("{")+")",["before"]);Com2nd("Setcolor("+color+")",["before"]);//180722
+ Com2nd("Texcom("+Dqq("{")+")",["before"]);Com2nd("Setcolor("+color+")",["before"]);//180722 //no ketjs on
Com2nd(Str,["before"]);
- Com2nd("Texcom("+Dqq("}")+")",["before"]);//180722
+ Com2nd("Texcom("+Dqq("}")+")",["before"]);//180722 //no ketjs off
);
////%Shade end////
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2logr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2logr.txt
index 849afc3c4b7..64a995c970e 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2logr.txt
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2logr.txt
@@ -1,9 +1,67 @@
+// 20190203
+// Mkketcindyjs debugged ( in case of local=y )
+// 20190202
+// Bezier changed ( (nm, ptlist(2)) supported)
+// Htickmark,Vtickmark changed ( option added)
+// 20190201
+// Mkketcindyjs debugged ( for removing button case the last is not "," )
+// Ketjsoption renamed to Setketcindyjs
+// Mkketcindyjs changed ( "grid" option added )
+// 20190131
+// Mkketcindyjs changed (removespace of ignoretun,buttons to be removed)
+// 20190130
+// Mkketcindyjs changed (USEDFUN (global) added)
+// Ketjsoption changed (color)
+// 20190129
+// "/LF/" => "/L"+"F/"
+// Ketjsoption added
+// Mkketcindyjs changed ( option "Web","Local","Scale","Nolabel")
+// Copyketcindyjs debugged ( for Windows )
+// Mkketcindyjs changed ( option "Color" added)
+// 20190128
+// Mkketcindyjs changed ( texflg removed , katex is OK )
+// Copyketcindyjs added
+// 20190126
+// Windispg debugged (for Pointdata)
+// Mkketcindyjs change ( point size )
+// 20190125
+// Windispg redebugged ("size")
+// 20190123
+// Windispg debugged ("size")
+// 20190123
+// Dashlinedata debugged/changed (ptn )
+// Windispg changed (ptn=0)
+// 20190122
+// Windispg changed ("connect"=>"drawall" for do,da )
+// no ketjs added (Windispg,Mkketcindyjs)
+// Dashlinedata added
+// 20190120
+// Slider changed (color,size options )
+// 20190119
+// Mkketcindyjs debugge ( ketlib slot addede to csinit )
+// Windispg changed ( size of "dr" supported);
+// 20190118
+// Mkketcindyjs changed ( position of "katex", ketlib slot addede to csinit )
+// Windispg debugged ( dashtype,linecolor v.s. opcindy )
+// 20190116
+// Findfun, Extractfun, Extractall, Mkketcindyjs added (for new ketcindyjs)
+// 20190103
+// Drwxy changed (Addax(0) added in the case of add=0 )
+// Drwxy changed ( "O=" option added )
+// 20190101
+// Viewtex changed ( for tikz )
+// // 20181231
+// Drwxy debugged (GENTEN used, xrng/yrng changed )
+// Drwpt debugged ( Pointdata used )
+// Viewtex debugged ( tikz )
// 20181224
// WritetoRS changed (Closefile("0"))
// 20181219
// BBdata debugged (macosx => ismacosx )
// 20181218
// Letter, Expr changed (pt,dir,str,options added )
+// 20181217
+// Drwxy debugged
// 20181216
// Drwxy changed ( linestyle,colorax,colorla )
// 20181215
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2r.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2r.cs
index c904a1d0fae..a9611b0f98d 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2r.cs
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindylibbasic2r.cs
@@ -14,7 +14,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>
//
-println("ketcindybasic2(20181224) loaded");
+println("ketcindybasic2[20190203] loaded");
//help:start();
@@ -164,24 +164,24 @@ Rotatedata(nm,plist,angle,options):=(
tmp1=append(tmp1,tmp);
);
if(length(tmp1)==1,tmp1=tmp1_1);
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp1=text(plist);
+ tmp1=text(plist); //no ketjs on
tmp1=RSform(tmp1,1);// 180602
tmp=name+"=Rotatedata("+tmp1+","
- +textformat(angle,5)+","+RSform(textformat(Pt,5))+")"; //17.12.23
- GLIST=append(GLIST,tmp);
+ +Textformat(angle,5)+","+RSform(Textformat(Pt,5))+")"; //17.12.23
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -234,23 +234,23 @@ Translatedata(nm,plist,mov,options):=(
tmp1=append(tmp1,tmp);
);
if(length(tmp1)==1,tmp1=tmp1_1);
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp1=text(plist);
+ tmp1=text(plist); //no ketjs on
tmp1=RSform(tmp1,1);// 180602
- tmp=name+"=Translatedata("+tmp1+","+RSform(textformat(mov,5))+")";
- GLIST=append(GLIST,tmp);
+ tmp=name+"=Translatedata("+tmp1+","+RSform(Textformat(mov,5))+")";
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -272,10 +272,10 @@ Scaledata(nm,plist,Arg1,Arg2):=(
//help:Scaledata("1",["crAB","pt1"],2,[[0,0]]);
regional(tmp,options);
if(islist(Arg2),
- tmp=Arg1;//180603(2lines)
+ tmp=Arg1;//180603[2lines]
if(!islist(tmp),tmp=[tmp,tmp]);
tmp=Lcrd(tmp);
- options=Arg2;
+ options=Arg2;
Scaledata(nm,plist,tmp_1,tmp_2,options);
,
Scaledata(nm,plist,Arg1,Arg2,[]);
@@ -326,24 +326,24 @@ Scaledata(nm,plist,rx,ry,options):=(
tmp1=append(tmp1,tmp);
);
if(length(tmp1)==1,tmp1=tmp1_1);
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp1=text(plist);
+ tmp1=text(plist); //no ketjs on
tmp1=RSform(tmp1,1); // 180602
tmp=name+"=Scaledata("+tmp1+","
- +textformat(rx,5)+","+textformat(ry,5)+","+RSform(textformat(Pt,5))+")";
- GLIST=append(GLIST,tmp);
+ +Textformat(rx,5)+","+Textformat(ry,5)+","+RSform(Textformat(Pt,5))+")";
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -412,23 +412,23 @@ Reflectdata(nm,plist,symL,options):=(
tmp1=append(tmp1,tmp);
);
if(length(tmp1)==1,tmp1=tmp1_1);
- tmp=name+"="+textformat(tmp1,5);
+ tmp=name+"="+Textformat(tmp1,5);
parse(tmp);
- tmp1=text(plist);
+ tmp1=text(plist); //no ketjs on
tmp1=RSform(tmp1,1);// 180602
- tmp=name+"=Reflectdata("+tmp1+","+RSform(textformat(symL,5))+")";//17.12.23
- GLIST=append(GLIST,tmp);
+ tmp=name+"=Reflectdata("+tmp1+","+RSform(Textformat(symL,5))+")";//17.12.23
+ GLIST=append(GLIST,tmp); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -490,7 +490,7 @@ MakeRarg(arglist):=(
if(isstring(#),
tmpstr=Dq+RSslash(#)+Dq;
,
- tmpstr=textformat(#,6);
+ tmpstr=Textformat(#,6);
);
str=str+tmpstr+",";
);
@@ -500,23 +500,24 @@ MakeRarg(arglist):=(
////%MakeRarg end////
////%Htickmark start////
-Htickmark(arglist):=(
+Htickmark(arglist):=Htickmark(arglist,[]); //190203
+Htickmark(arglist,options):=( //190203
//help:Htickmark([1,"1",2,"sw","2"]);
regional(nn,tmp,tmp1,tmp2,mark);
mark=MARKLEN/SCALEY;
tmp1=select(1..(length(arglist)),!isstring(arglist_#)); //180710from
forall(tmp1,nn,
Listplot("ht"+text(nn),
- [[arglist_nn,mark],[arglist_nn,-mark]],["Msg=n"]);//181017
+ [[arglist_nn,mark],[arglist_nn,-mark]],["Msg=n"]);//181017
if(nn+2<=length(arglist),
tmp=arglist_(nn+2);
if(!isstring(tmp),
- Expr([[arglist_nn,0],"s1",arglist_(nn+1)]);
+ Expr([[arglist_nn,0],"s1",arglist_(nn+1)],options); //190203
,
- Expr([[arglist_nn,0],arglist_(nn+1),arglist_(nn+2)]);
+ Expr([[arglist_nn,0],arglist_(nn+1),arglist_(nn+2)],options); //190203
);
,
- Expr([[arglist_nn,0],"s1",arglist_(nn+1)]);
+ Expr([[arglist_nn,0],"s1",arglist_(nn+1)],options); //190203
);
);//180710to
// tmp="";
@@ -526,23 +527,24 @@ Htickmark(arglist):=(
////%Htickmark end////
////%Vtickmark start////
-Vtickmark(arglist):=(
+Vtickmark(arglist):=Vtickmark(arglist,[]); //190203
+Vtickmark(arglist,options):=( //190203
//help:Vtickmark([1,"1",2,"sw","2"]);
regional(nn,tmp,tmp1,tmp2,mark);
mark=MARKLEN/SCALEX;
tmp1=select(1..(length(arglist)),!isstring(arglist_#)); //180710from
forall(tmp1,nn,
Listplot("vt"+text(nn),
- [[mark,arglist_nn],[-mark,arglist_nn]],["Msg=n"]); //181021
+ [[mark,arglist_nn],[-mark,arglist_nn]],["Msg=n"]); //181021
if(nn+2<=length(arglist),
tmp=arglist_(nn+2);
if(!isstring(tmp),
- Expr([[0,arglist_nn],"w1",arglist_(nn+1)]);
+ Expr([[0,arglist_nn],"w1",arglist_(nn+1)],options); //190203
,
- Expr([[0,arglist_nn],arglist_(nn+1),arglist_(nn+2)]);
+ Expr([[0,arglist_nn],arglist_(nn+1),arglist_(nn+2)],options); //190203
);
,
- Expr([[0,arglist_nn],"w1",arglist_(nn+1)]);
+ Expr([[0,arglist_nn],"w1",arglist_(nn+1)],options); //190203
);
);//180710to// tmp=MakeRarg(arglist);
// Com2nd("Vtickmark("+tmp+")");
@@ -581,7 +583,7 @@ Htick(px,lenorg,options):=(
////%Setax start////
Setax(arglist):=(
-//help:Setax(["l","x","e","y","n","O","sw",]);
+//help:Setax(["l","x","e","y","n","O","sw"]);
//help:Setax([7,"nw"]);
//help:Setax([8,linestyle,colorax,colorlabel]);
regional(st,nn,tmp); //181215from
@@ -601,19 +603,29 @@ Setax(arglist):=(
////%Setax end////
////%Drwxy start////
-Drwxy():=Drwxy([]);
-Drwxy(optionsorg):=(
+Drwxy():=Drwxy(0,[]); //190103from
+Drwxy(Arg):=(
+ if(islist(Arg),Drwxy(0,Arg); Drwxy(Arg,[]));
+);
+Drwxy(add):=Drwxy(add,[]);
+Drwxy(add,optionsorg):=( //190103to
//help:Drwxy();
-//help:Drwxy(options=["Origin=[0,0]","Xrng=","Yrng=","Ax=l,x,e,..."]);
+//help:Drwxy(1[the last axis will be drawn],oprions);
+//help:Drwxy(options);
+//help:Drwxy(options=["Xrng=","Yrng=","Ax=l,x,e,..."]);
regional(options,color,eqL,strL,org,xrng,yrng,ax,st,nn,size,
linesty,colorax,colorla,tmp,tmp1,tmp2);
options=optionsorg;
tmp=Divoptions(options);
color=tmp_(length(tmp)-2);
eqL=tmp_5;
- org=[0,0];
- xrng=[XMIN,XMAX];
- yrng=[YMIN,YMAX];
+ org=GENTEN;
+ //tmp1=max([org_1+XMIN,XMIN]);
+ //tmp2=min([org_1+XMAX,XMAX]);
+ xrng=[XMIN,XMAX]; //190103
+ //tmp1=max([org_2+YMIN,YMIN]);
+ //tmp2=min([org_2+YMAX,YMAX]);
+ yrng=[YMIN,YMAX]; //190103
ax=AXSTYLE;
linesty=ax_8;
if(isstring(ax_9),colorax=ax_9,colorax=text(ax_9));
@@ -631,10 +643,10 @@ Drwxy(optionsorg):=(
forall(eqL,
tmp=Strsplit(#,"=");
tmp1=Toupper(substring(tmp_1,0,1));
- if(tmp1=="O",
+ if(tmp1=="O", //190103from
org=parse(tmp_2);
options=remove(options,[#]);
- );
+ ); //190103to
if(tmp1=="X",
xrng=parse(tmp_2);
options=remove(options,[#]);
@@ -663,7 +675,7 @@ Drwxy(optionsorg):=(
strL=select(options,isstring(#)); //181216
tmp=select(strL,contains(["dr","da","do","id"],substring(#,0,2)));
if(length(tmp)==0,options=append(options,YasenStyle));
- tmp=substring(ax_1,1,length(ax_1)); //181216(2lines)
+ tmp=substring(ax_1,1,length(ax_1)); //181216[2lines]
if(length(tmp)>0,size=parse(tmp),size=YaSize);
tmp1=concat(options,[size,YaAngle,YaPosition,YaCut,colorax]);//181216
tmp=[[xrng_1,org_2],[xrng_2,org_2]];
@@ -678,22 +690,28 @@ Drwxy(optionsorg):=(
Listplot("axy"+text(AXCOUNT),tmp,tmp1);
);
AXCOUNT=AXCOUNT+1;
- Expr([[xrng_2,org_2],ax_3,ax_2],[colorla]);//181216(3lines)
+ Expr([[xrng_2,org_2],ax_3,ax_2],[colorla]);//181216[3lines]
Expr([[org_1,yrng_2],ax_5,ax_4],[colorla]);
Letter([org,ax_7,ax_6],[colorla]);
- // Addax(0); // 16.01.21
+ if(add==0, //190103
+ Addax(0);
+ );
);
////%Drwxy end////
////%Drwpt start////
-Drwpt(pstr):=Drawpoint(pstr);
+Drwpt(pstr):=Drwpt(pstr,1); //181231
Drwpt(ptlist,nn):=( // 16.03.05 from
//help:Drwpt(A);
-//help:Drwpt("[1,1],0");
-//help:Drwpt(A,0);
//help:Drwpt([1,2],0);
- Drawpoint(ptlist,nn);
+ if(!isreal(DrwPtCtr), //181231from
+ DrwPtCtr=1;
+ );
+ Pointdata(text(DrwPtCtr),ptlist,["Inside="+text(nn)]);
+ DrwPtCtr=DrwPtCtr+1; //181231to
);
+////%Drwpt end////
+////%Drawpoint start////
Drawpoint(pstr):=(
if(isstring(pstr),
println("Drwpt : "+pstr);
@@ -718,12 +736,12 @@ Drawpoint(ptlistorg,nn):=(
tmp1=max(TenSize/TenSizeInit,1)/8;
Setpen(tmp1); // 16.04.09 until
forall(ptlist,
- tmp=textformat(#,5)+","+text(nn);
+ tmp=Textformat(#,5)+","+text(nn);
Com2nd("Drwpt("+tmp+")"); // 16.04.09
);
Setpen(thick); // 16.04.09
);// 16.03.05 until
-////%Drwpt end////
+////%Drawpoint end////
////%Addax start////
Addax(param):=(
@@ -770,7 +788,7 @@ Letter(list,options):=(
aln="left";
forall(opL,
tmp=indexof(#,"->");
- tmp1=removespace(substring(#,0,tmp-1));
+ tmp1=Removespace(substring(#,0,tmp-1));
tmp2=substring(#,tmp+1,length(#));
if(tmp1=="size",sz=parse(tmp2));
if(tmp1=="color",clr=parse(tmp2));
@@ -781,7 +799,7 @@ Letter(list,options):=(
Dmv=8;
Nj=1;
while(Nj+2<=length(list),
-// Pos=textformat(list_Nj,5);
+// Pos=Textformat(list_Nj,5);
Pos=list_Nj;
Dir=list_(Nj+1);
tmp=indexof(Dir,"s")+indexof(Dir,"n");//16.10.19from
@@ -799,15 +817,15 @@ Letter(list,options):=(
Str=RSslash(Str); // 17.09.24
Str=replace(Str,"`","'");//180303
tmp=Dq+","+Dq+Str+Dq+")";
- if(Noflg==0,
+ if(Noflg==0, //no ketjs on
if((Noflg==0)&(color!=KCOLOR), //180904
Texcom("{");Com2nd("Setcolor("+color+")");//180722
);
- Com2nd("Letter("+Lcrd(Pos)+","+Dq+Dir+tmp);//16.10.10
- if((Noflg==0)&(color!=KCOLOR), //180904
+ Com2nd("Letter("+Lcrd(Pos)+","+Dq+Dir+tmp);//16.10.10
+ if((Noflg==0)&(color!=KCOLOR), //180904
Texcom("}");//180722
);
- );
+ ); //no ketjs off
if(Noflg<2,
Xmv=0;//16.10.13
Ymv=-4;
@@ -936,11 +954,24 @@ Exprrot(pt,dir,tmov,nmov,str,options):=(
////%Exprrot end////
////%Slider start////
-Putslider(ptstr,p1,p2):=Slider(ptstr,p1,p2);
-Slider(ptstr,p1,p2):=( //17.04.11
+Slider(ptstr,p1,p2):=Slider(ptstr,p1,p2,[]);
+Slider(ptstr,p1,p2,options):=(//190120
//help:Slider("A-C-B",[-3,0],[3,0]);
- regional(pA,pB,pC,seg,sname,Alpha,tmp,tmp1);
- tmp=indexall(ptstr,"-");
+//help:Slider(options=["Color=0.6*[0,0,1]","Size=2"]);
+ regional(pA,pB,pC,seg,sname,Alpha,color,size,tmp,tmp1);
+ color="Color=0.6*[0,0,1]"; //190120from
+ size="size->2";
+ forall(options,
+ tmp=Toupper(substring(#,0,1));
+ if(tmp=="C",
+ color=#;
+ );
+ if(tmp=="S",
+ tmp=Strsplit(#,"=");
+ size="size->"+tmp_2;
+ );
+ ); //190120to
+ tmp=Indexall(ptstr,"-");
pA=substring(ptstr,0,tmp_1-1);
pC=substring(ptstr,tmp_1,tmp_2-1);
pB=substring(ptstr,tmp_2,length(ptstr));
@@ -958,7 +989,7 @@ Slider(ptstr,p1,p2):=( //17.04.11
);
Putpoint(pA,p1);
Putpoint(pB,p2);
- Listplot([parse(pA),parse(pB)],["notex","color->[0,0.4,0.4]","size->2"]);
+ Listplot([parse(pA),parse(pB)],["Msg=n","notex",color,size]);
// create([sname],"Segment",[parse(pA),parse(pB)]);
// tmp2=Listplot("",[p1,p2],["nodata"]);
Putonseg(pC,parse("sg"+pA+pB));
@@ -975,7 +1006,22 @@ Putpoint(name,Ptinit,Pt):=(
if(!contains(ptstr,name),
createpoint(name,Pcrd([Ptinit_1,Ptinit_2]));
,
- ptstr=name+".xy="+textformat(Pcrd(Pt),5);
+ ptstr=name+".xy="+Textformat(Pcrd(Pt),5);
+ parse(ptstr);
+ );
+);
+////%Putpoint end////
+
+////%Putpoint start////
+Putpoint(name,Pt):=Putpoint(name,Pt,Pt);
+Putpoint(name,Ptinit,Pt):=(
+//help:Putpoint("A",[1,2],[1,A.y]);
+ regional(ptstr);
+ ptstr=apply(allpoints(),#.name);//16.10.06
+ if(!contains(ptstr,name),
+ createpoint(name,Pcrd([Ptinit_1,Ptinit_2]));
+ ,
+ ptstr=name+".xy="+Textformat(Pcrd(Pt),5);
parse(ptstr);
);
);
@@ -1012,7 +1058,16 @@ Bezierpt(t,ptlist,ctrlist):=(
////%Bezier start////
Bezier(ptctrlist):=BezierCurve(ptctrlist_3,ptctrlist_1,ptctrlist_2,[]);
-Bezier(ptctrlist,options):=BezierCurve(ptctrlist_3,ptctrlist_1,ptctrlist_2,options);
+Bezier(Arg1,Arg2):=( //190202from
+ regional(nm,ptctrlist,options);
+ if(islist(Arg1),
+ ptctrlist=Arg1; options=Arg2;
+ BezierCurve(ptctrlist_3,ptctrlist_1,ptctrlist_2,options);
+ ,
+ nm=Arg1; ptctrlist=Arg2;
+ BezierCurve(nm,ptctrlist_1,ptctrlist_2,[]);
+ );
+); //190202to
Bezier(nm,ptlist,ctrlist):=BezierCurve(nm,ptlist,ctrlist,[]);
Bezier(nm,ptlist,ctrlist,options):=BezierCurve(nm,ptlist,ctrlist,options);
////%Bezier end////
@@ -1042,9 +1097,9 @@ BezierCurve(nm,ptlistorg,ctrlistorg,options):=(
ptlist=apply(ptlistorg,Lcrd(#)); // 16.08.16
ctrlist=[]; // 14.12.31
if(length(ctrlistorg)==length(ptlist)-1,
- forall(ctrlistorg,tmp1,
+ forall(1..(length(ctrlistorg)),ii, //190202
+ tmp1=apply(ctrlistorg_ii,Lcrd(#)); //190202
if(MeasureDepth(tmp1)==0,tmp=[tmp1],tmp=tmp1);
- tmp=apply(tmp,Lcrd(#)); // 16.08.16
ctrlist=append(ctrlist,tmp);
);
,
@@ -1070,24 +1125,24 @@ BezierCurve(nm,ptlistorg,ctrlistorg,options):=(
if(Noflg<3,
println("generate Bezier "+name);
out=apply(list,Pcrd(#));
- tmp=name+"="+textformat(out,5);
+ tmp=name+"="+Textformat(out,5);
parse(tmp);
- tmp1=textformat(ptlist,5);
+ tmp1=Textformat(ptlist,5); //no ketjs on
tmp1=RSform(tmp1,2); //17.12.23
- tmp2=textformat(ctrlist,5);
+ tmp2=Textformat(ctrlist,5);
tmp2=RSform(tmp2,3); //17.12.23
- GLIST=append(GLIST,name+"=Bezier("+tmp1+","+tmp2+opstr+")");
+ GLIST=append(GLIST,name+"=Bezier("+tmp1+","+tmp2+opstr+")"); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -1188,14 +1243,14 @@ Putbezierdata(name,ptL,options):=(
tmp1=name+"p"+text(#-1);
Putpoint(tmp1,tmp,Lcrd(parse(tmp1))); // 16.08.16
inspect(parse(tmp1),"labeled",false); //15.01.22
- Letter([parse(tmp1),"ne",tmp1],["notex"]); //15.01.22
+ Letter([parse(tmp1),"ne",tmp1],["notex"]); //15.01.22
inspect(parse(tmp1),"ptsize",psize);
inspect(parse(tmp1),"color",3);
tmp=(p1+2*p2)/3;
tmp2=name+"q"+text(#-1);
- Putpoint(tmp2,tmp,Lcrd(parse(tmp2))); // 16.08.16
+ Putpoint(tmp2,tmp,Lcrd(parse(tmp2))); // 16.08.16
inspect(parse(tmp2),"labeled",false); //15.01.22
- Letter([parse(tmp2),"ne",tmp2],["notex"]); //15.01.22
+ Letter([parse(tmp2),"ne",tmp2],["notex"]); //15.01.22
inspect(parse(tmp2),"ptsize",psize);
inspect(parse(tmp2),"color",3);
ctrs=append(ctrs,[parse(tmp1),parse(tmp2)]);
@@ -1204,7 +1259,7 @@ Putbezierdata(name,ptL,options):=(
tmp1=name+"p"+text(#-1);
Putpoint(tmp1,tmp,Lcrd(parse(tmp1))); // 16.08.16
inspect(parse(tmp1),"labeled",false); //15.01.22
- Letter([parse(tmp1),"ne",tmp1],["notex"]); //15.01.22
+ Letter([parse(tmp1),"ne",tmp1],["notex"]); //15.01.22
inspect(parse(tmp1),"ptsize",psize);
inspect(parse(tmp1),"color",3);
ctrs=append(ctrs,[parse(tmp1)]);
@@ -1294,7 +1349,7 @@ Writebezier(head,seL):=(
tmp1=bz_#;
);
tmp1=replace(tmp1,"Bezier(","[");
- tmp1=replace(tmp1,"list(","[");
+ tmp1=replace(tmp1,"list"+PaO(),"[");
tmp1=replace(tmp1,")","]");
tmp1=replace(tmp1,",",".xy,");
tmp1=replace(tmp1,"]",".xy]");
@@ -1336,7 +1391,7 @@ Readbezier(file,optionorg):=(
tmp1=parse(tmp+"k");
tmp2=parse(tmp+"c");
if(MeasureDepth(tmp2)==1,tmp2=[tmp2]); // 16.04.22from
- if(geo==1,
+ if(geo==1,
alpha="abcdefghijklmnopqrstuvwxyz";
forall(1..length(tmp1),
tmp="k"+BezierNumber+"n"+text(nc)+substring(alpha,#-1,#);
@@ -1507,7 +1562,7 @@ Bzspline(nm,ptLorg,options):=(
pt1=parse("C"+text(#-1)+"q");
create([lstr],"Join",[pt1,pt]);
tmp2="C"+text(#)+"p";
- tmp=Append((2*pt.xy-pt1.xy),1);
+ tmp=append((2*pt.xy-pt1.xy),1);
create([tmp2],"PointOnLine",[parse(lstr),tmp]);
);
);
@@ -1523,7 +1578,7 @@ Bzspline(nm,ptLorg,options):=(
pt1=parse("C"+text(length(ptL)-1)+"q");
create([lstr],"Join",[pt1,pt]);
tmp1="C1p";
- tmp=Append((2*pt.xy-pt1.xy),1);
+ tmp=append((2*pt.xy-pt1.xy),1);
create([tmp1],"PointOnLine",[parse(lstr),tmp]);
);
ctrlist=[];
@@ -1575,14 +1630,14 @@ Bzsspline(nm,ptLorg,options):=(
if(cflg==0,
pt=ptL_1;
pt1=ptL_2;
- Putpoint("C1p",(4*pt+pt1)/5,Lcrd(C1p)); // 16.08.16
+ Putpoint("C1p",(4*pt+pt1)/5,Lcrd(C1p)); // 16.08.16
inspect(C1p,"ptsize",3);
inspect(C1p,"color",3);
);
if(cflg==1,
pt=ptL_1;
pt1=Lcrd(parse("C"+text(length(ptL)-1)+"q")); // 16.08.16
- tmp1="Putpoint("+Dq+"C1p"+Dq+",2*pt-pt1)"; // 16.08.16
+ tmp1="Putpoint("+Dq+"C1p"+Dq+",2*pt-pt1)"; // 16.08.16
parse(tmp1);
);
ctrlist=[];
@@ -1659,7 +1714,7 @@ MeetCurve(Crv,Xorg,Yorg):=(
Ban=concat(tmp1,tmp2);
Tate=select(Ban,
abs(Cv_#_1-Cv_(#+1)_1)<=
- 10^(-2)*abs(Cv_#_2-Cv_(#+1)_2)
+ 10^(-2)*abs(Cv_#_2-Cv_(#+1)_2)
);
Ban=remove(Ban,Tate);
Ylist=[];
@@ -1694,11 +1749,11 @@ MeetCurve(Crv,Xorg,Yorg):=(
);
////%MeetCurve end////
-////%PutonLine start////
-PutonLine(name,p1,p2):=PutonLine(name,p1,p2,[]);
-PutonLine(name,p1org,p2org,options):=(
-//help:PutonLine("C","sgAB");
-//help:PutonLine("C",pA,pB);
+////%Putonline start////
+Putonline(name,p1,p2):=PutonLine(name,p1,p2,[]);
+Putonline(name,p1org,p2org,options):=(
+//help:Putonline("C","sgAB");
+//help:Putonline("C",pA,pB);
regional(par,p1,p2,dx,dy,tmp,tmp1,tmp2);
par=0.5;
tmp=Divoptions(options);
@@ -1725,19 +1780,20 @@ PutonLine(name,p1org,p2org,options):=(
);
);
);
-////%PutonLine end////
+////%Putonline end////
-////%PutonSeg start////
-PutonSeg(name,sgstr):=(
+////%Putonseg start////
+Putonseg(name,sgstr):=(
regional(seg,p1,p2);
if(isstring(sgstr),seg=parse(sgstr),seg=sgstr);
- PutonSeg(name,LLcrd(seg_1),LLcrd(seg_2));
+ Putonseg(name,LLcrd(seg_1),LLcrd(seg_2));
);
-PutonSeg(name,p1,p2):=PutonSeg(name,p1,p2,[]);
-PutonSeg(name,p1org,p2org,options):=(
-//help:PutonSeg("C","sgAB");
-//help:PutonSeg("C",pA,pB);
- regional(par,dx,dy,p,tmp,tmp1,tmp2);
+Putonseg(name,p1,p2):=Putonseg(name,p1,p2,[]);
+Putonseg(name,p1org,p2org,options):=(
+//help:Putonseg("C","sgAB");
+//help:Putonseg("C",pA,pB);
+ regional(Eps,par,dx,dy,p,tmp,tmp1,tmp2);
+ Eps=10^(-5);
par=0.5;
tmp=Divoptions(options);
if(length(tmp_6)>0,
@@ -1745,31 +1801,31 @@ PutonSeg(name,p1org,p2org,options):=(
);
p1=Lcrd(p1org);//16.10.11from
p2=Lcrd(p2org);
- PutonLine(name,p1,p2,[par]);
+ Putonline(name,p1,p2,[par]);
+ p1=Pcrd(p1); p2=Pcrd(p2); //190120
dx=p2_1-p1_1;
dy=p2_2-p1_2;
p=parse(name+".xy");
- p=LLcrd(p);
- if(abs(dx)>abs(dy) & (p_1-p1_1)*(p_1-p2_1)>0,
- if(|p-p1|<|p-p2|,
- parse(name+".xy=Pcrd(p1)");
- ,
- parse(name+".xy=Pcrd(p2)");
- );
- );
- if(abs(dx)<abs(dy) & (p_2-p1_2)*(p_2-p2_2)>0,
- if(|p-p1|<|p-p2|,
- parse(name+".xy=Pcrd(p1)");
- ,
- parse(name+".xy=Pcrd(p2)");//16.10.11until
- );
- );
-);
-////%PutonSeg end////
+// p=LLcrd(p);
+ if(abs(dx)>abs(dy), //190120from
+ if(p1_1>p2_1,tmp=p1;p1=p2;p2=tmp);
+ if(p_1<p1_1,parse(name+".xy="+Textformat(p1,5));p=p1);
+ if(p_1>p2_1,parse(name+".xy="+Textformat(p2,5));p=p2);
+ tmp=(p2_2-p1_2)/(p2_1-p1_1)*(p_1-p1_1)+p1_2;
+ parse(name+".y="+tmp);
+ ,
+ if(p1_2>p2_2,tmp=p1;p1=p2;p2=tmp);
+ if(p_2<p1_2,parse(name+".xy="+Textformat(p1,5));p=p1);
+ if(p_2>p2_2,parse(name+".xy="+Textformat(p2,5));p=p2);
+ tmp=(p2_1-p1_1)/(p2_2-p1_2)*(p_2-p1_2)+p1_1;
+ parse(name+".x="+tmp);
+ ); //190120to
+);
+////%Putonseg end////
-////%PutonCurve start////
-PutonCurve(pn,crv):=PutonCurve(pn,crv,[]);
-PutonCurve(pn,crv,options):=(
+////%Putoncurve start////
+Putoncurve(pn,crv):=Putoncurve(pn,crv,[]);
+Putoncurve(pn,crv,options):=(
//help:Putoncurve("A","gr1");
//help:Putoncurve("A","gr1",[0,XMAX]);
regional(Pmt,pstr,optionL,leftlim,rightlim,tmp,tmp1,Flg,Msg);
@@ -1793,25 +1849,25 @@ PutonCurve(pn,crv,options):=(
);
);
Pmt=MeetCurve(crv,leftlim,0);
- pstr=apply(allpoints(),textformat(#,5)); // 15.04.07
+ pstr=apply(allpoints(),Textformat(#,5)); // 15.04.07
if(!contains(pstr,pn),
createpoint(pn,Pcrd(Pmt));
,
tmp1=parse(pn+".x");
if(tmp1< leftlim % tmp1>rightlim,
if(tmp1< leftlim,tmp= leftlim, tmp=rightlim);
- Pmt=MeetCurve(crv,textformat(tmp,5),pn+".y");
+ Pmt=MeetCurve(crv,Textformat(tmp,5),pn+".y");
,
Pmt=MeetCurve(crv,pn+".x",pn+".y");
);
- ptstr=pn+".xy="+textformat(Pcrd(Pmt),5)+";";
+ ptstr=pn+".xy="+Textformat(Pcrd(Pmt),5)+";";
parse(ptstr);
);
if(Msg=="y",
println("Put "+pn+" on Curve "+text(crv));
);
);
-////%PutonCurve end////
+////%Putoncurve end////
////%CrossPoint start////
CrossPoint(name,Crv1,Crv2,range):=(
@@ -1872,16 +1928,16 @@ Periodfun(defL,reporg,optionorg):=( // 16.11.24
forall(1..(length(defL)/3),nn,
fun=defL_(3*nn-2);
range=defL_(3*nn-1);
- tmp1=if(isstring(range_1),parse(range_1),range_1); //17.06.11(2lines)
+ tmp1=if(isstring(range_1),parse(range_1),range_1); //17.06.11[2lines]
tmp2=if(isstring(range_2),parse(range_2),range_2);
minx=min(minx,tmp1);
maxx=max(maxx,tmp2);
num=defL_(3*nn);
options=append(options,"Num="+text(num));
Plotdata("pe"+text(nn),fun,
- "x="+textformat([tmp1,tmp2],5),options);
+ "x="+Textformat([tmp1,tmp2],5),options);
pdata=append(pdata,"grpe"+text(nn));
- tmp1=range_1; //17.06.11(4lines)
+ tmp1=range_1; //17.06.11[4lines]
if(isstring(tmp1),tmp1=replace(tmp1,"pi","%pi"),tmp1=format(tmp1,5));
tmp2=range_2;
if(isstring(tmp2),tmp2=replace(tmp2,"pi","%pi"),tmp2=format(tmp2,5));
@@ -1900,7 +1956,7 @@ Periodfun(defL,reporg,optionorg):=( // 16.11.24
forall(1..(rep_2),nr,
forall(1..(length(pdata)),np,
Translatedata("p"+np+text(nr),pdata_np,[per*nr,0],options);
- tmp2=concat(tmp2,["trp"+np+text(nr)]);
+ tmp2=concat(tmp2,["trp"+np+text(nr)]);
);
);//180724to
pdata=concat(tmp1,pdata);
@@ -2125,9 +2181,9 @@ Tabledata(nm,xLst,yLst,rmvL,optionorg):=(
Putpoint(tmp,Tgrid(tmp1));
,
Putpoint(tmp,Tgrid(tmp1),[R0.x,parse(tmp+".y")]);
- rlist_(#+1)=parse(tmp+".xy");
+ rlist_(#+1)=parse(tmp+".xy"); //no ketjs
);
- Putpoint(tmp,Tgrid(tmp1),[R0.x,parse(tmp+".y")]);
+ Putpoint(tmp,Tgrid(tmp1),[R0.x,parse(tmp+".y")]);
inspect(parse(tmp),"ptsize",3);
inspect(parse(tmp),"labeled",false);
if(mod(#,tick)==0 % #==n,
@@ -2358,7 +2414,7 @@ Findcell(Tbdata,pos1,pos2):=(
regional(tmp1,tmp2,posnw,posse,ctr,dx,dy);
if(isstring(pos1),
posnw=Tgrid(pos1); // 15.05.20
- posse=Tgrid(pos2);
+ posse=Tgrid(pos2);
//posnw=parse(pos1);
//posse=parse(pos2);
,
@@ -2479,9 +2535,9 @@ RSform(str,listfrom):=(
//help:RSform(string,listfrom);
regional(posL,mxlv,rep1,rep2,rep3,prev,out,
tmp,tmp1,tmp2);
- rep1="c("; rep2="c("; rep3="list(";
- if(listfrom<3,rep2="list(");
- if(listfrom==1,rep1="list(");
+ rep1="c"+PaO(); rep2="c"+PaO(); rep3="list"+PaO();
+ if(listfrom<3,rep2="list"+PaO());
+ if(listfrom==1,rep1="list"+PaO());
posL=Bracket(str,"[]");
tmp=apply(posL,#_2);
mxlv=max(tmp);
@@ -2505,8 +2561,8 @@ RSform(str,listfrom):=(
out=replace(out,".xy","");
out=replace(out,".x","[1]");
out=replace(out,".y","[2]");
- out=replace(out,"c(1)","[1]");//17.10.06(2lines)
- out=replace(out,"c(2)","[2]");
+ out=replace(out,"c"+PPa("1"),"[1]");//17.10.06[2lines]
+ out=replace(out,"c"+PPa("2"),"[2]");
out;
);
////%RSform end////
@@ -2524,8 +2580,8 @@ RSslash(str):=( //17.09.24
Rform(list):=(
regional(plotlist,comp,pos,out,strL,tmp,tmp1,tmp2,tmp3,Nj);
out=list;
- out=replace(out,"[[[","list([[");
- out=replace(out,"[","c(");
+ out=replace(out,"[[[","list"+PaO()+"[[");
+ out=replace(out,"[","c"+PaO());
out=replace(out,"]",")");
out=replace(out,".xy","");
out=replace(out,".x","[1]");
@@ -2587,7 +2643,7 @@ IftoR(strorg):=( //180802
regional(str,ifL,ppL,cpL,kk,sL,out,
tmp,tmp1,tmp2,tmp3,tmp4);
str=replace(strorg,LFmark,"");
- ifL=Indexall(str,"if(");
+ ifL=Indexall(str,"if"+PaO());
ppL=Bracket(str,"()");
cpL=Indexall(str,",");
tmp1=Bracket(str,"[]");
@@ -2633,7 +2689,7 @@ FortoR(strorg):=(
if(forstr==0,
out=str;
,
- pre=substring(str,0,forstr-1)+"for(";
+ pre=substring(str,0,forstr-1)+"for"+PaO();
ppL=Bracket(str,"()");
tmp1=forstr+6;
tmp=select(ppL,#_1==tmp1);
@@ -2669,7 +2725,7 @@ Deffun(name,bodylist):=(
funstr=funstr+");";
parse(funstr);
tmp=indexof(name,"(");
- str=substring(name,0,tmp-1)+"<-function(";
+ str=substring(name,0,tmp-1)+"<-function"+PaO();
str=str+substring(name,tmp,length(name))+"{";
forall(1..(length(bodylist)-1),nbody,
bdy=bodylist_nbody;
@@ -2704,7 +2760,7 @@ Deffun(name,bodylist):=(
str=str+bdy+";";
);
);
- str=str+"return("+bodylist_(length(bodylist))+")}";
+ str=str+"return"+PaO()+bodylist_(length(bodylist))+")}";
FUNLIST=append(FUNLIST,str);
);
////%Deffun end////
@@ -2725,69 +2781,141 @@ Inwindow(point,xrng,yrng):=(
);
////%Inwindow end////
-////%Windispg start////
-Windispg():=(
- regional(Nj,Nk,Dt,Vj,tmp,tmp1,tmp2,opcindy);
- if(ADDAXES=="1", //181215from
- Drwxy();
-// ADDAXES="0";
- ); //181215to
- gsave();
- layer(KETPIClayer);
- forall(GCLIST,Nj,
- if(isstring(Nj_1),Dt=parse(Nj_1),Dt=Nj_1); // 11.17
- if(islist(Dt) & length(Dt)>0, // 12.19,12.22
- tmp=MeasureDepth(Dt);
- if(tmp==1,Dt=[Dt]);
- opcindy=Nj_3;
- if(Nj_2<0,tmp1=0,tmp1=Nj_2);
- if(tmp1<10,
- forall(Dt,Nk,
- tmp2=Nk; // 14.12.04
- if(length(Nk)>1,
- tmp="connect("+textformat(tmp2,5)+
- ",dashtype->"+text(tmp1)+",linecolor->"+KCOLOR+opcindy+")";
- parse(tmp);
- ,
- if(length(Nk)==1,
- tmp="draw("+text(tmp2_1)+opcindy+")"; // 14.12.31
- parse(tmp);
- );
+////%Dashlinedata start////
+Dashlinedata(dataorg,sen,gap,ptn):=(
+ regional(data,eps,dtall,len,lenlist,ii,lenall,kari,
+ naga,tobi,nsen,seglist,segunit,hajime,owari,jj,
+ flg,tt,ptL,out,tmp,tmp1,tmp2);
+ eps=10.0^(-6);
+ if(isstring(dataorg),data=parse(dataorg),data=dataorg);
+ dtall=length(data);
+ out=[];
+ len=0; lenlist=[0];
+ forall(2..dtall,ii,
+ len=len+|data_ii-data_(ii-1)|;
+ lenlist=append(lenlist,len);
+ );
+ lenall=lenlist_dtall;
+ if(lenall>0,
+ kari=(sen+gap)*0.1;naga=sen*0.1;tobi=gap*0.1;
+ if(|data_1-data_dtall|<eps,
+ nsen=max([re(ceil(lenall/kari)),3]);
+ segunit=lenall/nsen;
+ naga=segunit*sen/(sen+gap);
+ tobi=segunit*gap/(sen+gap);
+ seglist=apply(0..(nsen-1),#*segunit);
+ ,
+ if(ptn==0,
+ nsen=max([re(ceil((lenall+tobi)/kari)),3]);
+ segunit=lenall*(sen+gap)/(nsen*sen+(nsen-1)*gap);
+ naga=segunit*sen/(sen+gap);
+ tobi=segunit*gap/(sen+gap);
+ seglist=apply(0..(nsen-1),#*segunit);
+ ,
+ nsen=max([re(ceil((lenall+naga)/kari)),3]);
+ segunit=lenall*(sen+gap)/((nsen-1)*sen+nsen*gap);
+ naga=segunit*sen/(sen+gap);
+ tobi=segunit*gap/(sen+gap);
+ seglist=apply(0..(nsen-2),tobi+#*segunit);
+ );
+ );
+ hajime=1;owari=1;
+ forall(1..(length(seglist)),ii,
+ len=seglist_ii;
+ flg=0;
+ forall(owari..dtall,jj,
+ if(flg==0,
+ if(len<lenlist_jj-eps,
+ flg=jj;
+ );
+ );
+ );
+ if(flg>0,hajime=flg-1);
+ flg=0;
+ forall(hajime..dtall,jj,
+ if(flg==0,
+ if(len+naga<lenlist_jj-eps,
+ flg=jj;
);
);
);
+ if(flg>0,owari=flg-1);
+ tt=len-lenlist_hajime;
+ tt=tt/(lenlist_(hajime+1)-lenlist_hajime);
+ tmp=data_hajime+tt*(data_(hajime+1)-data_hajime);
+ ptL=[tmp];
+ forall((hajime+1)..owari,jj,
+ ptL=append(ptL,data_jj);
+ );
+ tt=(len+naga-lenlist_owari);
+ tt=tt/(lenlist_(owari+1)-lenlist_owari);
+ tmp=data_owari+tt*(data_(owari+1)-data_owari);
+ ptL=append(ptL,tmp);
+ out=append(out,ptL);
);
);
- grestore();
- layer(0);
+ out;
);
-Windispg(pltdata):=(
- regional(pdata,Nj,Nk,Dt,tmp,tmp1,tmp2,opcindy);
+////%Dashlinedata end////
+
+////%Windispg start////
+Windispg():=(
+ if(ADDAXES=="1", //181215from
+ Drwxy();
+ ADDAXES="0";
+ ); //181215to
+ Windispg(GCLIST); //190125
+);
+Windispg(gcLorg):=( //190125
+ regional(gcL,Nj,Nk,Dt,Vj,tmp,tmp1,tmp2,tmp3,tmp4,opcindy);
+ gcL=gcLorg; //190125from
+ if(length(gcL)>0,
+ if(!islist(gcL_1),gcL=[gcL]);
+ ); //190125to
gsave();
layer(KETPIClayer);
- if(!islist(pltdata),tmp=[pltdata],tmp=pltdata);
- pdata=select(GCLIST,contains(tmp,#_1));
- forall(pdata,Nj,
+ forall(gcL,Nj,
if(isstring(Nj_1),Dt=parse(Nj_1),Dt=Nj_1); // 11.17
if(islist(Dt) & length(Dt)>0, // 12.19,12.22
tmp=MeasureDepth(Dt);
if(tmp==1,Dt=[Dt]);
opcindy=Nj_3;
- if(Nj_2<0,tmp1=0,tmp1=Nj_2);
+ tmp=Nj_2; //190119from
+ if(!islist(tmp),tmp=[tmp,""]); //190123
+ if(tmp_1<0,tmp1=0,tmp1=tmp_1); //190119from
if(tmp1<10,
forall(Dt,Nk,
- tmp2=Nk; // 14.12.04
if(length(Nk)>1,
- tmp="connect("+textformat(tmp2,5)+ // 15.05.11
- ",dashtype->"+text(tmp1)+
- ",linecolor->"+KCOLOR+opcindy+")";
- parse(tmp);
- ,
- if(length(Nk)==1,
- tmp="draw("+text(tmp2_1)+opcindy+")"; // 14.12.31
+ tmp3="";
+ if(indexof(opcindy,"color")==0, //190122from
+ tmp3=tmp3+",linecolor->"+KCOLOR;
+ );
+ tmp3=tmp3+opcindy;
+ if(tmp1==0, //190126from
+ if((length(tmp_2)>0)&(indexof(opcindy,"size")==0),
+ tmp3=tmp3+",size->"+tmp_2;
+ ); //190124to
+ tmp="connect("+Textformat(Nk,5)+tmp3+");";//190125
parse(tmp);
+ ,
+ if(tmp1==1,
+ tmp4=Dashlinedata(Nk,2.5,2.5,0);
+ forall(tmp4,
+ tmp="connect("+Textformat(#,5)+tmp3+");";
+ parse(tmp);
+ );
+ ,
+ tmp3=",dashtype->"+text(tmp1)+tmp3;
+ forall(1..(length(Nk)-1),
+ tmp="draw("+Textformat([Nk_#,Nk_(#+1)],5)+tmp3+");";
+ parse(tmp);
+ );
+ );
);
- );
+ ,
+ tmp="draw("+text(Nk_1)+opcindy+");"; // 14.12.31
+ parse(tmp);
+ ); //190126to
);
);
);
@@ -2830,7 +2958,7 @@ WritetoRS(filename,shchoice):=(
tmp1=format(re(tmp_1),6);// 15.02.05
tmp2=format(re(tmp_2),6);
tmp=#.name+"="+"c("+tmp1+","+tmp2+");";
- tmp=tmp+"Assignadd('"+#.name+"',"+#.name+")";
+ tmp=tmp+"Assignadd('"+#.name+"',"+#.name+")";
Plist=append(Plist,tmp);
,
println("Remove the abnormal poiint "+#.name); //181106
@@ -2850,26 +2978,26 @@ WritetoRS(filename,shchoice):=(
println(SCEOUTPUT,"");
);
if(iswindows(),
- println(SCEOUTPUT,"options(encoding='UTF-8')"); //180513
+ println(SCEOUTPUT,"options"+PaO()+"encoding='UTF-8')"); //190111
);
tmp1=replace(Dirwork,"\","/");
if((iswindows())&(indexof(tmp1,"Users")>0),
tmp=Indexall(tmp1,"/");
tmp2=substring(tmp1,tmp_3-1,length(tmp1));
tmp1=substring(tmp1,0,tmp_3-1);
- println(SCEOUTPUT,"Drv=shell('echo %HOMEDRIVE%',intern=TRUE)");
- println(SCEOUTPUT,"Drv=Drv[length(Drv)]");
- println(SCEOUTPUT,"Hpath=shell('echo %HOMEPATH%',intern=TRUE)");
- println(SCEOUTPUT,"Hpath=Hpath[length(Hpath)]");
+ println(SCEOUTPUT,"Drv=shell"+PaO()+"'echo %HOMEDRIVE%',intern=TRUE)"); //190111
+ println(SCEOUTPUT,"Drv=Drv[length"+PaO()+"Drv)]");
+ println(SCEOUTPUT,"Hpath=shell"+PaO()+"'echo %HOMEPATH%',intern=TRUE)");
+ println(SCEOUTPUT,"Hpath=Hpath[length"+PaO()+"Hpath)]");
println(SCEOUTPUT,"Rest="+Dqq(tmp2));
- println(SCEOUTPUT,"Path=paste(Drv,Hpath,Rest,sep='')");
- println(SCEOUTPUT,"Path=gsub('\\','/',Path,fixed=TRUE)"); //180610
- println(SCEOUTPUT,"setwd(Path)");
+ println(SCEOUTPUT,"Path=paste"+PaO()+"Drv,Hpath,Rest,sep='')");
+ println(SCEOUTPUT,"Path=gsub"+PaO()+"'\\','/',Path,fixed=TRUE)"); //180610
+ println(SCEOUTPUT,"setwd"+PaO()+"Path)");
,
- println(SCEOUTPUT,"setwd('"+tmp1+"')");
+ println(SCEOUTPUT,"setwd"+PaO()+"'"+tmp1+"')");
);//180409to
tmp=replace(Libname,"\","/"); //17.09.24from
- println(SCEOUTPUT,"source('"+tmp+".r')"); //181213
+ println(SCEOUTPUT,"source"+PaO()+"'"+tmp+".r')"); //181213
if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0),
if(GPACK=="tpic",GPACK="pict2e");
);
@@ -2879,20 +3007,20 @@ WritetoRS(filename,shchoice):=(
);
if(GPACK=="tikz", //181213from
tmp=replace(tmp+"_reptikz","\","/");
- println(SCEOUTPUT,"source('"+tmp+".r')");
+ println(SCEOUTPUT,"source"+PaO()+"'"+tmp+".r')");
); //181213to
- println(SCEOUTPUT,"Ketinit()");
- println(SCEOUTPUT,"cat(ThisVersion,'\n')");
+ println(SCEOUTPUT,"Ketinit"+PPa(""));
+ println(SCEOUTPUT,"cat"+PaO()+"ThisVersion,'\n')");
println(SCEOUTPUT,"Fnametex='"+Fnametex+"'");
println(SCEOUTPUT,"FnameR='"+FnameR+"'");
println(SCEOUTPUT,"Fnameout='"+Fnameout+"'");
println(SCEOUTPUT,"arccos=acos; arcsin=asin; arctan=atan");
- println(SCEOUTPUT,"Acos<- function(x){acos(max(-1,min(1,x)))}");
- println(SCEOUTPUT,"Asin<- function(x){asin(max(-1,min(1,x)))}");
+ println(SCEOUTPUT,"Acos<- function"+PPa("x")+"{acos"+PaO()+"max"+PaO()+"-1,min"+PaO()+"1,x)))}");
+ println(SCEOUTPUT,"Asin<- function"+PPa("x")+"{asin"+PaO()+"max"+PaO()+"-1,min"+PaO()+"1,x)))}");
println(SCEOUTPUT,"Atan=atan");
- println(SCEOUTPUT,"Sqr<- function(x){if(x>=0){sqrt(x)}else{0}}");
+ println(SCEOUTPUT,"Sqr<- function"+PPa("x")+"{if"+PaO()+"x>=0){sqrt"+PaO()+"x)}else{0}}");
println(SCEOUTPUT,"Factorial=factorial");
- println(SCEOUTPUT,"Norm<- function(x){norm(matrix(x,nrow=1),"+Dqq("2")+")}");
+ println(SCEOUTPUT,"Norm<- function"+PPa("x")+"{norm"+PaO()+"matrix"+PaO()+"x,nrow=1),"+Dqq("2")+")}");
println(SCEOUTPUT,"");
forall(COM0thlist,
if(indexof(#,"Texcom")==0, //17.09.22
@@ -2902,7 +3030,7 @@ WritetoRS(filename,shchoice):=(
);
);
println(SCEOUTPUT,
- "Setwindow(c("+XMIN+","+XMAX+"), c("+YMIN+","+YMAX+"))");
+ "Setwindow(c"+PaO()+XMIN+","+XMAX+"), c"+PaO()+YMIN+","+YMAX+"))");
forall(Plist,
println(SCEOUTPUT,#);
);
@@ -2914,7 +3042,7 @@ WritetoRS(filename,shchoice):=(
if(islist(tmp1),
tmp2="[";
forall(tmp1,
- tmp2=tmp2+textformat(#,6)+",";
+ tmp2=tmp2+Textformat(#,6)+",";
);
tmp1=substring(tmp2,0,length(tmp2)-1)+"]";
,
@@ -2924,27 +3052,27 @@ WritetoRS(filename,shchoice):=(
tmp1=RSform(tmp1);
print(SCEOUTPUT,tmp+"="+tmp1+";"); //17.09.22
// tmp=substring(tmp,0,length(tmp)-1);
- println(SCEOUTPUT,"Assignadd('"+tmp+"',"+tmp+")");
+ println(SCEOUTPUT,"Assignadd"+PaO()+"'"+tmp+"',"+tmp+")");
);
forall(FUNLIST,
println(SCEOUTPUT,#);
);
- forall(GLIST,
+ forall(GLIST, //no ketjs on
println(SCEOUTPUT,RSform(#));
- );
+ ); //no ketjs off
tmp=text(Pnamelist);
- tmp=replace(tmp,"[","list(");
+ tmp=replace(tmp,"[","list"+PaO());
Pnamelist=replace(tmp,"]",")");
println(SCEOUTPUT,"PtL="+Pnamelist);
tmp=select(GCLIST,#_2==-1);
GrL=apply(tmp,#_1);
tmp=text(GrL);
- tmp=replace(tmp,"[","list(");
+ tmp=replace(tmp,"[","list"+PaO());
tmp=replace(tmp,"]",")");
println(SCEOUTPUT,"GrL="+tmp);
tmp1="";
if(length(tmp1)>0,
- tmp1="WriteOutData(Fnameout"+tmp1+");";
+ tmp1="WriteOutData"+PaO()+"Fnameout"+tmp1+");";
println(SCEOUTPUT,tmp1);
);
forall(COM1stlist,
@@ -2955,13 +3083,13 @@ WritetoRS(filename,shchoice):=(
);
);
println(SCEOUTPUT,"");
- println(SCEOUTPUT,"# Windisp(GrL)");
+ println(SCEOUTPUT,"# Windisp"+PPa("GrL"));
println(SCEOUTPUT,"");
- println(SCEOUTPUT,"if(1==1){");
+ println(SCEOUTPUT,"if"+PaO()+"1==1){");
println(SCEOUTPUT,"");
tmp1=replace(Dirwork,"\","/"); //180408to
if((iswindows())&(indexof(tmp1,"Users")>0),
- println(SCEOUTPUT,"Path=paste(Path,"+Dqq("/"+Fnametex)+",sep='')");
+ println(SCEOUTPUT,"Path=paste"+PaO()+"Path,"+Dqq("/"+Fnametex)+",sep='')");
tmp="Openfile(Path,'"+ULEN+"'";
,
tmp="Openfile('"+tmp1+"/"+Fnametex+"','"+ULEN+"'";
@@ -2999,18 +3127,18 @@ WritetoRS(filename,shchoice):=(
); //180721to
);
if(length(GrL)>0,
- println(SCEOUTPUT," Drwline(GrL)");
+ println(SCEOUTPUT," Drwline"+PPa("GrL"));
);
- // println(SCEOUTPUT,"Closefile('"+ADDAXES+"')"); //181224(2line)
- println(SCEOUTPUT,"Closefile("+Dqq("0")+")");
+ // println(SCEOUTPUT,"Closefile"+PaO()+"'"+ADDAXES+"')"); //181224(2line)
+ println(SCEOUTPUT,"Closefile"+PaO()+""+Dqq("0")+")");
println(SCEOUTPUT,"");
println(SCEOUTPUT,"}");
if(shchoice=="sh",
println(SCEOUTPUT,"");
- println(SCEOUTPUT,"quit()");
+ println(SCEOUTPUT,"quit"+PPa(""));
,
println(SCEOUTPUT,"");
- println(SCEOUTPUT,"#quit()");
+ println(SCEOUTPUT,"#quit"+PPa(""));
);
closefile(SCEOUTPUT);
if(iswindows(), //180513from
@@ -3020,14 +3148,14 @@ WritetoRS(filename,shchoice):=(
tmp=Indexall(tmp1,"/");
tmp2=substring(tmp1,tmp_3-1,length(tmp1));
tmp1=substring(tmp1,0,tmp_3-1);
- println(SCEOUTPUT,"Drv=shell('echo %HOMEDRIVE%',intern=TRUE)");
- println(SCEOUTPUT,"Drv=Drv[length(Drv)]");
- println(SCEOUTPUT,"Hpath=shell('echo %HOMEPATH%',intern=TRUE)");
- println(SCEOUTPUT,"Hpath=Hpath[length(Hpath)]");
+ println(SCEOUTPUT,"Drv=shell"+PaO()+"'echo %HOMEDRIVE%',intern=TRUE)");
+ println(SCEOUTPUT,"Drv=Drv[length"+PaO()+"Drv)]");
+ println(SCEOUTPUT,"Hpath=shell"+PaO()+"'echo %HOMEPATH%',intern=TRUE)");
+ println(SCEOUTPUT,"Hpath=Hpath[length"+PaO()+"Hpath)]");
println(SCEOUTPUT,"Rest="+Dqq(tmp2));
- println(SCEOUTPUT,"Path=paste(Drv,Hpath,Rest,sep='')");
- println(SCEOUTPUT,"setwd(Path)");
- println(SCEOUTPUT,"source('"+filename+"',encoding='UTF-8')");
+ println(SCEOUTPUT,"Path=paste"+PaO()+"Drv,Hpath,Rest,sep='')");
+ println(SCEOUTPUT,"setwd"+PaO()+"Path)");
+ println(SCEOUTPUT,"source"+PaO()+"'"+filename+"',encoding='UTF-8')");
);
closefile(SCEOUTPUT);
); //180513to
@@ -3071,21 +3199,21 @@ Extractdata(number,name,options):=(
if(Noflg<3,
println("extract outdata "+name);
tmp1=parse(name);
- tmp3=[ //17.09.18
- "Tmpout=ReadOutData("+Dq+File+Dq+")"
+ tmp3=[ //17.09.18 //no ketjs on
+ "Tmpout=ReadOutData("+Dq+File+Dq+")"
];
- GLIST=concat(GLIST,tmp3);
+ GLIST=concat(GLIST,tmp3); //no ketjs off
);
if(Noflg<2,
if(isstring(Ltype),
- if((Noflg==0)&(color!=KCOLOR), //180904
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("{");Com2nd("Setcolor("+color+")");//180722
- );
- Ltype=GetLinestyle(text(Noflg)+Ltype,name);
- if((Noflg==0)&(color!=KCOLOR), //180904
+ ); //no ketjs off
+ Ltype=GetLinestyle(text(Noflg)+Ltype,name);
+ if((Noflg==0)&(color!=KCOLOR), //180904 //no ketjs on
Texcom("}");//180722
- );
- ,
+ ); //no ketjs off
+ ,
if(Noflg==1,Ltype=0);
);
GCLIST=append(GCLIST,[name,Ltype,opcindy]);
@@ -3175,11 +3303,11 @@ ReadOutData(pathorg,filenameorg,optionsorg):=(
if(length(ptL)>0,
if(length(ptL)==1,
ptL=ptL_1;
- tmp=apply(ptL,textformat(#,6));
+ tmp=apply(ptL,Textformat(#,6));
,
tmp="[";
forall(ptL,tmp1,
- tmp=tmp+apply(tmp1,textformat(#,6))+",";
+ tmp=tmp+apply(tmp1,Textformat(#,6))+",";
);
tmp=substring(tmp,0,length(tmp)-1)+"]";
);
@@ -3189,7 +3317,7 @@ ReadOutData(pathorg,filenameorg,optionsorg):=(
parse(varname+"="+tmp);
outdt=append(outdt,ptL);
ptL=[];
- varname=cmd;
+ varname=cmd;
varL=append(varL,varname);
);
);
@@ -3197,11 +3325,11 @@ ReadOutData(pathorg,filenameorg,optionsorg):=(
if(length(ptL)>0,
if(length(ptL)==1,
ptL=ptL_1;
- tmp=apply(ptL,textformat(#,6));
+ tmp=apply(ptL,Textformat(#,6));
,
tmp="[";
forall(ptL,tmp1,
- tmp=tmp+apply(tmp1,textformat(#,6))+",";
+ tmp=tmp+apply(tmp1,Textformat(#,6))+",";
);
tmp=substring(tmp,0,length(tmp)-1)+"]";
);
@@ -3344,7 +3472,7 @@ Makeshell(texmainfile,flow):=(
);
);
);
- if(flg==0, // 17.10.13(Norbert)
+ if(flg==0, // 17.10.13[Norbert]
tex=PathT;
path="";
);
@@ -3511,7 +3639,7 @@ Makebat(texmainfile,flow):=(
);
);
);
- if(flg==0, // 17.10.13(Norbert)
+ if(flg==0, // 17.10.13[Norbert]
tex=PathT;
path="";
);
@@ -3597,7 +3725,7 @@ Usegraphics(gpack):=( //180817
//help:Usegraphics("pict2e");
if(!contains(ADDPACK,gpack),
if(gpack =="tikz", //181213from
- Addpackage(["pgf","tikz"]);
+ Addpackage(["pgf","tikz"]); //190101
,
Addpackage([gpack]);
); //181213to
@@ -3615,11 +3743,15 @@ Viewtex():=(
SCEOUTPUT=openfile(texfile+".tex");
tmp="\documentclass{article}"; // 16.06.09from
if(indexof(PathT,"platex")>0,
- tmp=replace(tmp,"article","jarticle");
- if(indexof(PathT,"uplatex")>0, //17.08.13from
- tmp=replace(tmp,"jarticle","ujarticle");
- );//17.08.13until
- ); // 16.06.09until
+ if(GPACK=="tikz",
+ tmp="\documentclass[dvipdfmx]{article}"; // 190101
+ ,
+ tmp=replace(tmp,"article","jarticle");
+ if(indexof(PathT,"uplatex")>0, //17.08.13from
+ tmp=replace(tmp,"jarticle","ujarticle");
+ );//17.08.13to
+ );
+ ); // 16.06.09to
println(SCEOUTPUT,tmp);
if((indexof(PathT,"pdflatex")>0)%(indexof(PathT,"lualatex")>0), //181213from
if(GPACK=="tpic", GPACK="pict2e");
@@ -3636,7 +3768,7 @@ Viewtex():=(
);
);
if(GPACK=="tikz",
- println(SCEOUTPUT,"\usepackage[pgf,tikz}");//16.11.24
+// println(SCEOUTPUT,"\usepackage{pgf,tikz}");//190101
println(SCEOUTPUT,"\usepackage{ketpic,ketlayer}");
if(indexof(PathT,"lualatex")>0,
println(SCEOUTPUT,"\usepackage{luatexja}");
@@ -3930,7 +4062,7 @@ Makehelplist(libname):=(
flg=0;
forall(1..3,
if(flg==0,
- if(substring(cmdall_#,0,7)=="start()",
+ if(substring(cmdall_#,0,7)=="start"+PPa(""),
cmdall=cmdall_((#+1)..length(cmdall));
flg=1;
);
@@ -3940,7 +4072,7 @@ Makehelplist(libname):=(
tmp=length(cmdall);
forall(0..2,
if(flg==0,
- if(substring(cmdall_(tmp-#),0,5)=="end()",
+ if(substring(cmdall_(tmp-#),0,5)=="end"+PPa(""),
cmdall=cmdall_(1..(tmp-#-1));
flg=1;
);
@@ -4467,11 +4599,11 @@ Maketitle(name):=(
println(SCEOUTPUT,"title::"+name+"//");
println(SCEOUTPUT,"");
println(SCEOUTPUT,"%%%%%%%%%%%%%%%%//");
- println(SCEOUTPUT,"main::(title)//");
+ println(SCEOUTPUT,"main::"+PaO()+"title)//");
println(SCEOUTPUT,"\slidepage[m]//");
println(SCEOUTPUT,"");
println(SCEOUTPUT,"%%%%%%%%%%%%%%%%//");
- println(SCEOUTPUT,"new::(title)//");
+ println(SCEOUTPUT,"new::"+PaO()+"title)//");
println(SCEOUTPUT,"%repeat=1,para//");
println(SCEOUTPUT,"\slidepage//");
println(SCEOUTPUT,"");
@@ -4504,7 +4636,7 @@ Repeatsameslide(repeatflg,sestr,addedL):=(
if(sestr=="",
RepeatList_nn=append(RepeatList_nn,ss);
);
- );
+ );
if(sestr=="",
seL=[1];
,
@@ -4513,7 +4645,7 @@ Repeatsameslide(repeatflg,sestr,addedL):=(
tmp1=replace(tmp1,"-,","1..");
tmp1="["+tmp1+"]"; //17.01.03
seL=flatten(parse(tmp1)); //17.01.03
- );
+ );
if(contains(seL,1),
if(substring(ss,0,1)!="%", //16.01.04
println(SCEOUTPUT,ss);
@@ -4548,7 +4680,7 @@ Repeatsameslide(repeatflg,sestr,addedL):=(
if(substring(str,0,1)!="%",
if(NonThinFlg==0,
if(!contains(["\begi","\end{"],substring(str,0,5)),//17.01.15
- if(MiniFlg==0, //180526from
+ if(MiniFlg==0, //180526from
println(SCEOUTPUT,"{\color[cmyk]{\thin,\thin,\thin,\thin}%");//180701
println(SCEOUTPUT,str);
println(SCEOUTPUT,"}%");
@@ -4598,7 +4730,7 @@ Repeatsameslide(repeatflg,sestr,addedL):=(
tmp=seL_nn;
if(NonThinFlg==0,
if(!contains(["\begi","\end{"],substring(str,0,5)),//180526from
- if(MiniFlg==0,
+ if(MiniFlg==0,
tmp1="{\color[cmyk]{\thin,\thin,\thin,\thin}%";//180701
tmp1=[tmp1,str,"}%"];
,
@@ -4671,9 +4803,9 @@ Presentation(texfile,txtfile):=(
// tmp=load(tmp1); //181125from
tmp=readfile2str(Dirwork,tmp1);
tmp=replace(tmp,"////","||||");
- tmp=replace(tmp,"/LF/::","::");
- tmp=replace(tmp,"///LF/","/LF/");
- slideL=tokenize(tmp,"/LF/"); //181125to
+ tmp=replace(tmp,"/L"+"F/::","::");
+ tmp=replace(tmp,"///L"+"F/","/L"+"F/");
+ slideL=tokenize(tmp,"/L"+"F/"); //181125to
slideorgL=slideL; // 16.07.11
slideL=apply(slideL,Removespace(#));
tmp=select(1..length(slideL),length(slideL_#)>0); // 16.07.11from
@@ -4891,7 +5023,7 @@ Presentation(texfile,txtfile):=(
tmp1="";
tmp2="";
tmp3="";
- sld=removespace(slideL_ns); // 16.06.28
+ sld=Removespace(slideL_ns); // 16.06.28
sestr="";
if((substring(sld,0,1)=="%") & (substring(sld,0,2)!="%%"), // 17.06.23
Repeatsameslide(repeatflg,"",[slideL_ns]);
@@ -5034,7 +5166,7 @@ Presentation(texfile,txtfile):=(
+text(2.5*LinkSize)+"mm}{\scalebox{"+text(LinkSize)
+"}{\scriptsize $\mathstrut \!\rhd\!\!|$}}}}}");
);
- tmp="{"+text(LinkPosV)+"}{\hyperlink{para"; //180529(2lines)
+ tmp="{"+text(LinkPosV)+"}{\hyperlink{para"; //180529[2lines]
tmp=tmp+text(paractr+1)+"pg"+text(1);
tmp3=append(tmp3,
text(LinkPosH)+"}"+tmp+"}{\fbox{\Ctab{" // 17.01.19
@@ -5044,7 +5176,7 @@ Presentation(texfile,txtfile):=(
tmp3=apply(tmp3,tmp,"\putnotew{"+tmp);
tmp4=concat(tmp4,tmp3);// 17.01.12to
tmp="\putnotee{"+text(LinkPosH+1)+"}{"+text(LinkPosV)+"}";//180524
- tmp=tmp+"{\scriptsize\color{blue} "+text(#)+"/"+text(nrep)+"}"; //180524(blue)
+ tmp=tmp+"{\scriptsize\color{blue} "+text(#)+"/"+text(nrep)+"}"; //180524[blue]
tmp4=append(tmp4,tmp);
tmp4=concat(tmp4,["\end{layer}",""]);//16.12.31until
Repeatsameslide(repeatflg,text([#]),tmp4);
@@ -5056,7 +5188,7 @@ Presentation(texfile,txtfile):=(
flg=1;
); //17.06.23to
if(flg==0,
- if(indexof(sld,"\begin{verbatim}")==1, // 16.06.28from
+ if(indexof(sld,"\begin{verbatim}")==1, // 16.06.28from
Repeatsameslide(repeatflg,sestr,[slideL_ns]);
verbflg=1;
flg=1;
@@ -5245,7 +5377,7 @@ Presentation(texfile,txtfile):=(
);
if(flg==0&tmp1=="end"&(length(flgL)>0), //180526
tmp=flgL_(length(flgL));
- if(tmp=="i",
+ if(tmp=="i",
Repeatsameslide(repeatflg,sestr,["\end{itemize}"]);
);
if(tmp=="e",
@@ -5329,7 +5461,7 @@ Mkslides():=(
Dirwork=replace(Dirwork,"/",pathsep());
parent=replace(Dirwork+Batparent,"/",pathsep());// 16.05.29
);
- tmp=replace(Dirwork,pathsep()+"fig","");//180604(2lines)
+ tmp=replace(Dirwork,pathsep()+"fig","");//180604[2lines]
Changework(tmp);
Setdirectory(Dirwork);
if(!iswindows(), //180604from
@@ -5411,32 +5543,32 @@ Mkslidesummary(inputfile,outputfile,options):=(
fout=outputfile;
if(indexof(fout,".")==0,fout=fout+".tex");
cmdL=[
- "Dt=readLines('"+fin+"',encoding='UTF-8')",[],
- "num=grep('hypertarget',Dt,fixed=TRUE)",[], //180412
- "Dt=Dt[setdiff(1:length(Dt),num)]",[],
- "Smain=c();Snew=c();Ssame=c()",[],
- "for(J in 1:length(Dt)){",[],
- " Tmp=length(grep('mainslide{',Dt[J],fixed=TRUE))",[], //180412
- " if(Tmp>0){Smain=c(Smain,1)}else{Smain=c(Smain,0)}",[],
- " Tmp=length(grep('newslide{',Dt[J],fixed=TRUE))",[], //180412
- " if(Tmp>0){Snew=c(Snew,1)}else{Snew=c(Snew,0)}",[],
- " Tmp=length(grep('sameslide',Dt[J],fixed=TRUE))",[], //180412
- " if(Tmp>0){Ssame=c(Ssame,1)}else{Ssame=c(Ssame,0)}",[],
+ "Dt=readLines"+PaO()+"'"+fin+"',encoding='UTF-8')",[],
+ "num=grep"+PaO()+"'hypertarget',Dt,fixed=TRUE)",[], //180412
+ "Dt=Dt[setdiff"+PaO()+"1:length"+PaO()+"Dt),num)]",[],
+ "Smain=c"+PPa("")+";Snew=c"+PPa("")+";Ssame=c"+PPa(""),[],
+ "for"+PaO()+"J in 1:length"+PaO()+"Dt)){",[],
+ " Tmp=length"+PaO()+"grep"+PaO()+"'mainslide{',Dt[J],fixed=TRUE))",[], //180412
+ " if"+PaO()+"Tmp>0){Smain=c"+PaO()+"Smain,1)}else{Smain=c"+PaO()+"Smain,0)}",[],
+ " Tmp=length"+PaO()+"grep"+PaO()+"'newslide{',Dt[J],fixed=TRUE))",[], //180412
+ " if"+PaO()+"Tmp>0){Snew=c"+PaO()+"Snew,1)}else{Snew=c"+PaO()+"Snew,0)}",[],
+ " Tmp=length"+PaO()+"grep"+PaO()+"'sameslide',Dt[J],fixed=TRUE))",[], //180412
+ " if"+PaO()+"Tmp>0){Ssame=c"+PaO()+"Ssame,1)}else{Ssame=c"+PaO()+"Ssame,0)}",[],
"}",[],
- "Nnew=c();Nsame=c()",[],
- "for(J in 1:length(Dt)){",[],
- " if((Snew[J]==1)|(Smain[J]==1)){Nnew=c(Nnew,J)}",[],
- " if(Ssame[J]==1){Nsame=c(Nsame,J)}",[],
+ "Nnew=c"+PPa("")+";Nsame=c"+PPa(""),[],
+ "for"+PaO()+"J in 1:length"+PaO()+"Dt)){",[],
+ " if"+PaO(2)+"Snew[J]==1)|"+PaO()+"Smain[J]==1)){Nnew=c"+PaO()+"Nnew,J)}",[],
+ " if"+PaO()+"Ssame[J]==1){Nsame=c"+PaO()+"Nsame,J)}",[],
"}",[],
"Out=Dt[1:Nnew[1]]",[],
- "for(J in Looprange(2,length(Nnew))){",[],
- " Tmp=max(c(1,Nsame[Nsame<Nnew[J]]))",[],
- " Tmp=max(c(Tmp,Nnew[J-1]))+1",[],
- " Out=c(Out,Dt[Tmp:Nnew[J]])",[],
+ "for"+PaO()+"J in Looprange"+PaO()+"2,length"+PaO()+"Nnew))){",[],
+ " Tmp=max"+PaO()+"c"+PaO()+"1,Nsame[Nsame<Nnew[J]]))",[],
+ " Tmp=max"+PaO()+"c"+PaO()+"Tmp,Nnew[J-1]))+1",[],
+ " Out=c"+PaO()+"Out,Dt[Tmp:Nnew[J]])",[],
"}",[],
- "Tmp=max(c(Nsame[-1],Nnew[-1]))+1",[],
- "Out=c(Out,Dt[Tmp:length(Dt)])",[],
- "writeLines(Out,'"+fout+"',sep='\n')",[] //180412(2lines removed)
+ "Tmp=max"+PaO()+"c"+PaO()+"Nsame[-1],Nnew[-1]))+1",[],
+ "Out=c"+PaO()+"Out,Dt[Tmp:length"+PaO()+"Dt)])",[],
+ "writeLines"+PaO()+"Out,'"+fout+"',sep='\n')",[] //180412[2lines removed]
];
CalcbyR("",cmdL,append(options,"Cat=n"));//180412
wait(1000);
@@ -5482,8 +5614,8 @@ Example(exorg,suborg):=(
////%Example end////
////%BBdata start////
-BBdata():=Bbdata(BBTarget,0);
-BBdata(fname):=Bbdata(fname,0); // 16.04.09
+BBdata():=BBdata(BBTarget,0);
+BBdata(fname):=BBdata(fname,0); // 16.04.09
BBdata(fname,optionorg):=(
//help:BBdata(filename);
//help:BBdata(options=0(automatic),1(make),"w=","h=");
@@ -5506,7 +5638,7 @@ BBdata(fname,optionorg):=(
if(path=="",path=Dirwork);//16.10.05
if(indexof(file,".")==0,file=file+".pdf");
if(islist(optionorg),options=optionorg,options=[optionorg]);
- tmp=divoptions(options);
+ tmp=Divoptions(options);
eqL=tmp_5;
reL=tmp_6;
stL=tmp_7;
@@ -5612,13 +5744,13 @@ BBdata(fname,optionorg):=(
tmp=tmp_2; //
tmp1=indexof(tmp,":");
tmp=substring(tmp,tmp1,length(tmp));
- tmp=removespace(tmp);
+ tmp=Removespace(tmp);
tmp=tokenize(tmp," ");
tmp1="";
forall(tmp,
tmp1=tmp1+Sprintf(#,2)+" ";
);
- tmp1=removespace(tmp1)+addop;
+ tmp1=Removespace(tmp1)+addop;
tmp2="\includegraphics[bb="+tmp1+"]{"+file+"}";
println(tmp2);
);
@@ -5628,5 +5760,528 @@ BBdata(fname,optionorg):=(
);
////%BBdata end////
+////%Findfun start////
+Findfun(name,lineorg):=(
+ regional(line,sep,pL,jj,kk,flg,rmv,out,tmp,tmp1,tmp2);
+ line=Removespace(lineorg);
+ rmv=[name,"regional","forall","if","text","curkernel","append","concat"];
+ rmv=concat(rmv,["append","apply","allelements","indexof"]);
+ rmv=concat(rmv,["substring","select","isstring","length"]);
+ rmv=concat(rmv,["round","unicode","openfile","closefile","println","replace"]);
+ rmv=concat(rmv,["setdirectory","parse","tokenize","import","load","ispoint"]);
+ rmv=concat(rmv,["isreal","layer","autoclearlayer","drawpoly","allcircles"]);
+ rmv=concat(rmv,["floor","flatten","prepend","islist","print","mod","abs","sum"]);
+ rmv=concat(rmv,["cos","sin","tan","arccos","arcsin","arctan","sqrt","reverse","re"]);
+ rmv=concat(rmv,["sort","contains","max","min","allpoints","isselected","common"]);
+ rmv=concat(rmv,["inspect","iscircle","alllines","repeat","remove","format"]);
+ rmv=concat(rmv,["ceil","while","dist","det","exp","err","arctan2","fillpoly"]);
+ rmv=concat(rmv,["drawtext","mouse","allsegments","createpoint","create"]);
+ rmv=concat(rmv,["gsave","connect","draw","grestore","wait"]);
+
+// rmv=concat(rmv,["d","list","c","funN","funP","function","for","return"]); // in string (for R)
+// rmv=concat(rmv,["gsub","cat"]); // in string (for R)
+// rmv=concat(rmv,["options"]); // written for Windows
+// rmv=concat(rmv,["isexists"]); // java functions
+
+ sep=[""," ",",","=","(","+","-","*","/","^","_","[",".","!","&","%",Dq,";",">","<",unicode("0009")];
+ out=[];
+ if(substring(line,0,2)!="//",
+ pL=Indexall(line,"(");
+ forall(pL,jj,
+ flg=0;
+ if(contains(pL,jj-1), flg=1);
+ forall(reverse(1..(jj-1)),
+ if(flg==0,
+ if(#==1,
+ tmp=substring(line,0,1);
+ if(contains(sep,tmp),
+ tmp=substring(line,1,jj-1);
+ ,
+ tmp=substring(line,0,jj-1);
+ );
+ flg=1;
+ );
+ );
+ if(flg==0,
+ tmp=substring(line,#-1,#);
+ if(contains(sep,tmp),
+ tmp=substring(line,#,jj-1);
+ if(indexof(substring(line,0,#-1),"//")==0,
+ flg=1;
+ );
+ );
+ );
+ );
+ if((flg==1)&(length(tmp)>0),
+ out=append(out,tmp);
+ );
+ );
+ );
+ out=remove(out,rmv);
+ tmp=out;
+ out=[];
+ forall(tmp,
+ if(!contains(out,#),out=append(out,#));
+ );
+ out;
+);
+////%Findfun end////
+
+////%Extractfun start////
+Extractfun(strL):=(
+ regional(nL,str,str2,start,sep,out,tmp,tmp1,tmp2);
+ out=[];
+ forall(strL,str,
+ nL=Indexall(str,Dq);
+ str2="";
+ start=0;
+ forall(1..(length(nL)/2),
+ tmp1=nL_(2*#-1);
+ str2=str2+substring(str,start,tmp1-1);
+ start=nL_(2*#);
+ );
+ str2=str2+substring(str,start,length(str));
+ fL=Findfun("csdraw",str2);
+ out=remove(out,fL);
+ out=concat(out,fL);
+ );
+);
+////%Extractfun end////
+
+//DL1=Readcsv(Dirhead+pathsep()+"ketcindyjs","basic1list.txt");
+//DL2=Readcsv(Dirhead+pathsep()+"ketcindyjs","basic2list.txt");
+//DL=concat(DL1,DL2);
+//Out=[];
+
+////%Extractall start////
+Extractall(name):=(
+ regional(fL,jj,tmp,tmp1,tmp2,tmp3);
+ fL=apply(Out,#_1);
+ tmp1=select(DL,#_1==name);
+ if(length(tmp1)>0,
+ tmp1=tmp1_1;
+ if(!contains(fL,tmp1),
+ Out=append(Out,tmp1);
+ fL=append(fL,tmp1_1);
+ if(length(tmp1)>=5,
+ forall(5..(length(tmp1)),jj,
+ tmp=tmp1_jj;
+ if(!contains(fL,tmp),
+ Extractall(tmp);
+ );
+ );
+ );
+ );
+ );
+ tmp1=Out;
+ Out=[];
+ forall(1..(length(tmp1)),
+ if(!contains(Out,tmp1_#),
+ Out=append(Out,tmp1_#);
+ );
+ );
+ Out;
+);
+////%Extractall end////
+
+////%Copyketcindyjs start//// 190128
+Copyketcindyjs():=(
+ regional(tmp,tmp1,tmp2,drive,fname);
+ if(iswindows(),
+ drive="C:";
+ fname=Dirhead;
+ tmp=indexof(fname,":");
+ if(tmp>0,
+ drive=substring(Dirwork,0,tmp);
+ fname=substring(fname,tmp,length(fname));
+ );
+ kc():=(
+ println("kc : "+kc(Dirwork+Batparent,Dirlib,Fnametex)); // 16.06.04
+ );
+ SCEOUTPUT = openfile(Batparent);
+ println(SCEOUTPUT,drive);
+ println(SCEOUTPUT,"cd "+Dqq(fname));
+ println(SCEOUTPUT,"set xcp="+Dqq("\Windows\System32\xcopy"));
+ tmp1=Dqq("%xcp%")+" /Y /Q /S /E /R "+Dqq("ketcindyjs\");
+ tmp2=" "+Dqq(Dircdy+"ketcindyjs\");
+ println(SCEOUTPUT,tmp1+"Cindy.js.map"+tmp2);
+ println(SCEOUTPUT,tmp1+"webfont.js"+tmp2);
+ println(SCEOUTPUT,tmp1+"katex-plugin.js"+tmp2);
+ println(SCEOUTPUT,tmp1+"Cindy.js"+tmp2);
+ println(SCEOUTPUT,tmp1+"CindyJS.css"+tmp2);
+ tmp1=Dqq("%xcp%")+" /Y /Q /S /E /R "+Dqq("ketcindyjs\katex\");
+ tmp2=" "+Dqq(Dircdy+"ketcindyjs\katex\");
+ println(SCEOUTPUT,tmp1+"katex.min.css"+tmp2);
+ println(SCEOUTPUT,tmp1+"katex.min.js"+tmp2);
+ tmp1=Dqq("%xcp%")+" /Y /Q /S /E /R "+Dqq("ketcindyjs\katex\fonts\");
+ tmp2=" "+Dqq(Dircdy+"ketcindyjs\katex\fonts\");
+ println(SCEOUTPUT,tmp1+"KaTeX_Main-Regular.ttf"+tmp2);
+ println(SCEOUTPUT,tmp1+"KaTeX_Main-Regular.woff"+tmp2);
+ println(SCEOUTPUT,tmp1+"KaTeX_Main-Regular.woff2"+tmp2);
+ println(SCEOUTPUT,tmp1+"KaTeX_Math-Italic.ttf"+tmp2);
+ println(SCEOUTPUT,tmp1+"KaTeX_Math-Italic.woff"+tmp2);
+ println(SCEOUTPUT,tmp1+"KaTeX_Math-Italic.woff2"+tmp2);
+ println(SCEOUTPUT,"exit 0");
+ closefile(SCEOUTPUT);
+ ,
+ kc():=(
+ println("kc : "+kc(Dirwork+Shellparent,Mackc+Dirlib,Fnametex));
+ );
+ SCEOUTPUT = openfile(Shellparent);
+ println(SCEOUTPUT,"#!/bin/sh");
+ println(SCEOUTPUT,"cd "+Dqq(Dirhead));
+ println(SCEOUTPUT,"cp -r -p ketcindyjs "+Dircdy+"/");
+ println(SCEOUTPUT,"exit 0");
+ closefile(SCEOUTPUT);
+ );
+ kc();
+);
+////%Coptketcindyjs end////
+
+////%Ketjsoption start//// 190201
+Ketjsoption():=Setketcindyjs();
+Ketjsoption(list):=Setketcindyjs(list);
+////%Ketjsoption end////
+
+////%Setketcindyjs start//// 190201
+Setketcindyjs():=(
+ KETJSOP;
+);
+Setketcindyjs(list):=(
+//help:Setketcindyjs();
+//help:Setketcindyjs(["Local=(n)","Scale=(1)","Nolabel=[]"]);
+ regional(eqL,color,tmp);
+ tmp=Divoptions(list);
+ eqL=tmp_5;
+ tmp=tmp_(length(tmp));
+ tmp=substring(tmp,1,length(tmp));
+ tmp=replace(tmp,"->","=");
+ parse(tmp);
+ tmp=round(255*color);
+ if(color!=[0,0,0],eqL=append(eqL,"Color="+text(tmp)));
+ KETJSOP=eqL;
+ KETJSOP;
+);
+////%Setketcindyjs end////
+
+////%Mkketcindyjs start//// 190115
+Mkketcindyjs():=Mkketcindyjs(KETJSOP); //190129
+Mkketcindyjs(options):=( //17.11.18
+//help:Mkketcindyjs();
+//help:Mkketcindyjs(options=["Local=(n)","Scale=(1)","Nolabel=[]","Color=","Grid="]);
+//help:Mkketcindyjs(optionsadd=["Web=(y)","Path=Dircdy"]);
+ regional(webflg,localflg,htm,htmorg,from,upto,flg,fL,fun,jj,tmp,tmp1,tmp2,tmp3,
+ lib1,lib2,jc,nn,name,partL,toppart,lastpart,path,ketflg,flg,cmdL,scale,nolabel,
+ color,grid,out,igL,DL,Out);
+ webflg="Y"; //190128 texflg removed
+ localflg="N"; //190128
+ scale=1; //190129
+ nolabel=["SW","NE"]; //190129
+ color="";
+ grid="";
+ path=Dircdy;
+ forall(options,
+ tmp=Strsplit(#,"=");
+ tmp1=Toupper(substring(tmp_1,0,1));
+ tmp2=tmp_2;
+ if(tmp1=="W",
+ webflg=Toupper(substring(tmp2,0,1));
+ );
+ if(tmp1=="L",
+ localflg=Toupper(substring(tmp2,0,1));
+ );
+ if(tmp1=="S",
+ scale=parse(tmp2);
+ );
+ if(tmp1=="N",
+ tmp=tmp2;
+ if(indexof(tmp2,"[")>0,
+ tmp=substring(tmp2,1,length(tmp2)-1);
+ );
+ tmp=tokenize(tmp,",");
+ nolabel=concat(nolabe,tmp);
+ );
+ if(tmp1=="C",
+ color=tmp2;
+ if(substring(color,0,1)=="[", //190130from
+ color=substring(color,1,length(color)-1);
+ ); //190130to
+ );
+ if(tmp1=="G",
+ grid=tmp2;
+ );
+ if(tmp1=="P",
+ if(!tmp2="Dircdy",
+ path=tmp2;
+ );
+ );
+ );
+ if((webflg=="N")&(localflg=="Y"),
+ if(!isexists(Dircdy,"ketcindyjs"),
+ Copyketcindyjs();
+ println("ketcindyjs has been copied");
+ );
+ );
+ if(!isexists(Dircdy,Fhead+".html"),
+ drawtext(mouse().xy-[0,1],"'Write/Rewrite to CindyJS' at first",size->24,color->[1,0,0]);
+ wait(3000);
+ ,
+ htmorg=Readlines(Dircdy,Fhead+".html");
+ tmp=select(1..(length(htmorg)),indexof(htmorg_#,"id="+Dqq("csdraw"))>0);
+ from=tmp_1+1;
+ flg=0;
+ forall(from..(length(htmorg)),
+ if(flg==0,
+ if(indexof(htmorg_#,"</script>")>0,
+ upto=#-1;
+ flg=1;
+ );
+ );
+ );
+ fL=Extractfun(htmorg_(from..upto));
+ DL=Readcsv(Dirhead+pathsep()+"ketcindyjs","basic1list.txt");
+ tmp=Readcsv(Dirhead+pathsep()+"ketcindyjs","basic2list.txt");
+ DL=concat(DL,tmp); //DL and Out arenecessary for Extractall
+ Out=[];
+ forall(fL,fun,
+ Extractall(fun);
+ );
+ tmp=Readlines(Dirhead+pathsep()+"ketcindyjs","ignoredfun.txt");
+ tmp=apply(tmp,Removespace(#)); //190131
+ igL=select(tmp,(length(#)>0)&(substring(#,0,2)!="//")); //190131
+ tmp1=select(Out,contains(igL,#_1));
+ Out=remove(Out,tmp1); USEDFUN=apply(Out,#_1); //190130
+ tmp1=select(1..(length(htmorg)),indexof(htmorg_#,"script id=")>0);
+ partL=[];
+ forall(tmp1,nn,
+ from=nn;
+ tmp2=htmorg_from;
+ tmp=Indexall(tmp2,Dq);
+ name=substring(tmp2,tmp_1,tmp_2-1);
+ tmp=select((from+1)..(length(htmorg)),indexof(htmorg_#,"</script>")>0);
+ upto=tmp_1;
+ partL=append(partL,[name,from,upto]);
+ );
+ tmp=apply(partL,#_2);
+ tmp=min(tmp)-1;
+ toppart=[1,tmp];
+ tmp=apply(partL,#_3);
+ tmp=max(tmp)+1;
+ lastpart=[tmp,length(htmorg)];
+ if(webflg=="Y",
+ tmp1=Fhead+"json.html";
+ ,
+ tmp1=Fhead+"jsoff.html";
+ );
+ setdirectory(path);
+ SCEOUTPUT = openfile(tmp1);
+ tmp1=htmorg_((toppart_1)..(toppart_2));
+ if(webflg=="N",
+ if(localflg=="N", //190128
+ tmp3=replace(Dirhead+"/ketcindyjs/",pathsep(),"/");
+ tmp= " <link rel="+Dqq("stylesheet")+" href=";
+ tmp=tmp+Dq+"file:///"+tmp3+"CindyJS.css"+Dq+">";
+ tmp1_(length(tmp1)-2)=tmp;
+ tmp= " <script type="+Dqq("text/javascript")+" src=";
+ tmp=tmp+Dq+"file:///"+tmp3+"Cindy.js"+Dq+"></script>";
+ tmp1_(length(tmp1)-1)=tmp;
+ tmp=" <script type="+Dqq("text/javascript")+" src="; //190117from
+ tmp1_(length(tmp1))=""; //190120
+ ,
+ tmp1_(length(tmp1)-2)= //190128from
+ " <link rel="+Dqq("stylesheet")+" href="+Dqq("ketcindyjs/CindyJS.css")+">"; //190203
+ tmp1_(length(tmp1)-1)=
+ " <script type="+Dqq("text/javascript")+" src="+Dqq("ketcindyjs/Cindy.js")+"></script>"; //190203
+ tmp1_(length(tmp1))=""; //190128to
+ );
+ ,
+ tmp1_(length(tmp1))=""; //190117to
+ );
+ forall(tmp1,
+ println(SCEOUTPUT,#);
+ );
+ tmp="<script id="+Dqq("csinit")+" type=";
+ tmp=tmp+Dqq("text/x-cindyscript")+">";
+ println(SCEOUTPUT,tmp);
+ tmp=Readlines(Dirhead+pathsep()+"ketcindyjs","commonused.txt");
+ forall(tmp,
+ println(SCEOUTPUT,#);
+ );
+ lib1=Readlines(Dirhead+"/ketlib","ketcindylibbasic1r.cs");
+ lib2=Readlines(Dirhead+"/ketlib","ketcindylibbasic2r.cs");
+ forall(Out,fun,
+ libf=fun_2;from=fun_3;upto=fun_4;
+ if(indexof(libf,"basic1")>0,
+ tmp1=lib1_(from..upto);
+ ,
+ tmp1=lib2_(from..upto);
+ );
+ ketflg="off"; //190122from
+ forall(tmp1,
+ if(indexof(#,"no ketjs")>0,
+ if(indexof(#,"no ketjs on")>0,
+ ketflg="on";
+ );
+ if(indexof(#,"no ketjs off")>0,
+ ketflg="off";
+ );
+ ,
+ if(ketflg=="off",
+ tmp=Removespace(#);
+ if(substring(tmp,0,2)!="//",
+ println(SCEOUTPUT,#);
+ );
+ ); //190122to
+ );
+ );
+ );
+ tmp=select(partL,#_1=="csinit");
+ if(length(tmp)>0,
+ tmp=tmp_1;
+ from=tmp_2;
+ upto=tmp_3;
+ tmp1=htmorg_((from+1)..(upto-1)); //190119
+ forall(tmp1,
+ if((indexof(#,"import(")==0)&(indexof(#,"use(")==0),
+ println(SCEOUTPUT,#);
+ );
+ );
+ );
+ println(SCEOUTPUT,"</script>");
+ tmp=select(partL,#_1=="csdraw");
+ tmp=tmp_1;
+ from=tmp_2;
+ upto=tmp_3;
+ tmp1=htmorg_(from..upto);
+ ketflg="off"; //190202from
+ forall(tmp1,
+ if(indexof(#,"no ketjs")>0,
+ if(indexof(#,"no ketjs on")>0,
+ ketflg="on";
+ );
+ if(indexof(#,"no ketjs off")>0,
+ ketflg="off";
+ );
+ ,
+ if(ketflg=="off",
+ tmp=Removespace(#);
+ if(substring(tmp,0,2)!="//",
+ println(SCEOUTPUT,#);
+ );
+ );
+ );
+ );
+ tmp1=htmorg_((lastpart_1)..(lastpart_2));
+ tmp=select(1..(length(tmp1)),indexof(tmp1_#,Dqq("cs*"))>0);
+ tmp=tmp_1;
+ forall(1..tmp, //190117from
+ println(SCEOUTPUT,tmp1_#);
+ );
+ from=tmp+1; //190117to
+ tmp=" use: ["+Dqq("katex")+"],";
+ println(SCEOUTPUT,tmp);
+ out=[]; //190129
+ forall(from..(length(tmp1)),jj,
+ flg=0; //190126from
+ tmp2=["Figure","Parent","ParaF","Anime","Flip","Title","Slide","Digest",
+ "KeTJS","KeTJSoff","Objview"];
+ if(indexof(tmp1_jj,"type: "+Dqq("Button"))>0,
+ nn=indexof(tmp1_jj,"text: ");
+ tmp=substring(tmp1_jj,nn-1,length(tmp1_jj));
+ nn=Indexall(tmp,Dq);
+ tmp=substring(tmp,nn_1,nn_2-1);
+ if(!contains(tmp2,tmp),
+ out=append(out,tmp1_jj); //190129
+ );
+ flg=1;
+ );
+ if(flg==0,
+ tmp=indexof(tmp1_jj,"type: "+Dq+"Free")+indexof(tmp1_jj,"type: "+Dq+"Point");
+ if(tmp>0,
+ tmp2=tmp1_jj;
+ tmp=Indexall(tmp2,Dq); //190129from
+ tmp=substring(tmp2,tmp_1,tmp_2-1);
+ if(contains(nolabel,tmp),
+ if(indexof(tmp2,"labeled: true")>0,
+ tmp2=replace(tmp2,"labeled: true","labeled: false");
+ );
+ );
+ if(indexof(tmp2,"size:")==0,
+ tmp2=replace(tmp2,"}",", size: 3.0}");
+ out=append(out,tmp2); //190129
+ ,
+ out=append(out,tmp2); //190129
+ ); //190129to
+ flg=1;
+ );
+ );
+ if(flg==0,
+ out=append(out,tmp1_jj); //190129
+ ); //190126to
+ );
+ tmp=select(1..(length(out)),indexof(out_#," ],")>0); //190129from
+ tmp=tmp_1;
+ tmp1=out_(tmp-1);
+ if(substring(tmp1,length(tmp1)-1,length(tmp1))==",", //190201from
+ out_(tmp-1)=substring(tmp1,0,length(tmp1)-1);
+ ); //190201to
+ tmp=select(1..(length(out)),indexof(out_#,"width:")>0);
+ jj=tmp_1;
+ tmp1=out_jj;
+ flg=0;
+ forall(1..(length(tmp1)-1),
+ if(flg==0,
+ tmp=substring(tmp1,#-1,#);
+ if(tmp==":",
+ tmp2=substring(tmp1,#+1,length(tmp1)-1);
+ flg=1;
+ );
+ );
+ );
+ tmp=round(scale*parse(tmp2));
+ out_jj=" width: "+text(tmp)+",";
+ tmp=select(1..(length(out)),indexof(out_#,"height:")>0);
+ jj=tmp_1;
+ tmp1=out_jj;
+ flg=0;
+ forall(1..(length(tmp1)-1),
+ if(flg==0,
+ tmp=substring(tmp1,#-1,#);
+ if(tmp==":",
+ tmp2=substring(tmp1,#+1,length(tmp1)-1);
+ flg=1;
+ );
+ );
+ );
+ tmp=round(scale*parse(tmp2));
+ out_jj=" height: "+text(tmp)+",";
+ if(length(color)>0,
+ tmp=select(1..(length(out)),indexof(out_#,"background: ")>0);
+ jj=tmp_1;
+ tmp=indexof(out_jj,")"); //190130from
+ tmp=substring(out_jj,tmp-1,length(out_jj));
+ out_jj=" background: "+Dq+"rgb("+color+tmp; //190130to
+ );
+ if(length(grid)>0,
+ tmp=select(1..(length(out)),indexof(out_#,"grid:")>0);
+ jj=tmp_1;
+ tmp1=" grid: "+grid;
+ if(indexof(out_jj,",")>0,
+ tmp1=tmp1+",";
+ );
+ out_jj=tmp1;
+ );
+ forall(out,
+ println(SCEOUTPUT,#);
+ ); //190129to
+ closefile(SCEOUTPUT);
+ setdirectory(Dirwork);
+ if(webflg=="Y",tmp="json",tmp="jsoff");
+ drawtext(mouse().xy-[0,1],tmp+"in "+path,size->20,color->[1,0,0]);
+ wait(1000);
+ );
+);
+////%Mkketcindyjs end////
+
//help:end();
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutlogr.txt b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutlogr.txt
index 5760eda39a2..5a61f9a92e3 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutlogr.txt
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutlogr.txt
@@ -1,3 +1,19 @@
+// 20190127
+ Gccexists changed (in case that PathC is full path in Mac/Windws)
+// 20190126
+// Boxplot changed ( Pointdata[size] )
+// 20190125
+// Readcsv changed/debugged ( option "Head=" added. For 1 line data )
+// HIstplot, Boxplot changed (wait=5)
+// 20190124
+// Gccexists added
+// Sfcutparadata debugged (optionh)
+// 20190123
+// Sfbdparadata,... debugged (in case of emply options,optionsh )
+// kcC chnage ( positon "-lm" changed for Mac/Linux )
+// 20181219
+// Rfun debugged ( Out=y )
+// CalcbyR debugged ( argment list changed to string)
// 20181218
// Help (Sfbdparadata ,,,, )
// 20181217
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutr.cs b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutr.cs
index 946743bed6f..354cedc324e 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutr.cs
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketcindyliboutr.cs
@@ -14,7 +14,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>
//
-println("ketcindylibout(20181218 loaded");
+println("ketcindylibout(20190127 loaded");
//help:start();
@@ -783,6 +783,7 @@ CalcbyR(name,path,cmd,optionorg):=(
strL=tmp_7;
dig=5;
tmp=cmd_(length(cmd)-1); //181130from
+ if(!isstring(tmp),tmp=text(tmp)); //190109
if(indexof(tmp,"=")+indexof(tmp,"::")>0,
cat="Y";
,
@@ -1132,7 +1133,8 @@ Rfun(name,fun,argL,optionorg):=(
cmdL=concat(cmdL,[
nm+"="+fun,argL,
]);
- options=concat(options,["Wait=2"]);
+// options=concat(options,["Wait=2"]);
+ options=concat(options,["Wait=2","Cat=y"]); //190109
CalcbyR(nm,cmdL,options);
if(ErrFlag==0,
if(disp==1, // 15.11.24
@@ -1179,10 +1181,6 @@ Readcsv(pathorg,file,optionorg):=(
options=remove(options,[#]);
);
);
-// if(tmp=="W", // removed:17.02.19
-// waiting=parse(tmp2);
-// options=remove(options,[#]);
-// );
if(tmp=="S",
sep=tmp2;
options=remove(options,[#]);
@@ -1285,19 +1283,35 @@ Readcsv(pathorg,file,optionorg):=(
);
);
);
-// New readcsv (181125)
+// New readcsv [181125]
Readcsv(file):=Readcsv(Dirwork,file);
-Readcsv(path,file):=(
+Readcsv(path,file):=Readcsv(path,file,[]);
+Readcsv(path,file,options):=(
//help:Readcsv("ex.csv");
//help:Readcsv(directory,"ex.csv");
-//help:Readcsv(options=["Head=yes","Sep=-999","Flat=no","Use=R"]);
- regional(dt);
+//help:Readcsv(options=["Head=no"]);
+ regional(dt,eqL,head,from,end,tmp);
+ tmp=Divoptions(options);
+ eqL=tmp_5;
+ head="n"; from=1; //190125from
+ forall(eqL,
+ tmp=Strsplit(#,"=");
+ if(Toupper(substring(tmp_1,0,1))=="H",
+ head=substring(tmp_2,0,1);
+ );
+ );
+ if(Toupper(head)=="Y",
+ from=2;
+ ); //190125to
dt=readfile2str(path,file);
dt=tokenize(dt,"/LF/");
+ end=length(dt);
if(dt_(length(dt))=="",
- dt=dt_(1..(length(dt)-1));
+ end=end-1;
+ dt=dt_(from..end); //190125
);
dt=apply(dt,tokenize(#,","));
+ if(length(dt)==1, dt=dt_1); //190125
dt;
);
////%Readcsv end////
@@ -1567,7 +1581,7 @@ Boxplot(nm,dataorg,ypos,dy,optionorg):=(
tmp=divoptions(options);
eqL=tmp_5;
strL=tmp_7;
- waiting=3;
+ waiting=10;
wrflg=0;
forall(eqL,
tmp=indexof(#,"=");
@@ -1707,7 +1721,7 @@ Boxplot(nm,dataorg,ypos,dy,optionorg):=(
out=bp_(6..length(bp));
if(length(out)>0,
out=apply(out,[#,ypos]);
- Pointdata(name+text(1),out,concat(options,[0,"Size=4"]));
+ Pointdata(name+text(1),out,concat(options,[0,"Size=2","Inside=white"])); //190125
);
pstr=substring(pstr,0,length(pstr)-1)+"]";
println("generate totally "+name);
@@ -1732,7 +1746,7 @@ Histplot(nm,dataorg,optionorg):=(
breaks = "breaks="+Dq+"Sturges"+Dq;
density=0;
relative=0;
- waiting=3;
+ waiting=10; //190125
forall(eqL,
tmp=Strsplit(#,"=");
tmp1=Toupper(substring(tmp_1,0,1));
@@ -4756,140 +4770,6 @@ Frifun(name,fun,argL,optionorg):=(
parse(nm);
);
-Mkketcindyjs():=Mkketcindyjs("ketcindylib");
-Mkketcindyjs(Arg):=(
- if(isstring(Arg),
- Mkketcindyjs(Arg,[])
- ,
- Mkketcindyjs("ketcindylib",Arg)
- );
-);
-Mkketcindyjs(libname,options):=( //17.11.18
-//help:Mkketcindyjs();
-//help:Mkketcindyjs(options=["Tex=y","Net=y"]);
- regional(texflg,netflg,tmp,tmp1,tmp2,dirfile,dirwork,dirketjs);
- dirwork=replace(Dirwork,"\","/");
- tmp=replace(Dircdy,"\","/");
- if(substring(tmp,length(tmp)-1,length(tmp))=="/",//180411from
- dirfile=substring(tmp,0,length(tmp)-1);
- ,
- dirfile=tmp;
- );//180411to
- tmp=replace(Dirlib,"\","/");
- dirketjs=replace(tmp,"ketlib","ketcindyjs");//180411to
- texflg="Y";
- netflg="Y";
- forall(options,
- tmp1=Toupper(#);
- if(indexof(tmp1,"TEX")>0,
- tmp=indexof(tmp1,"=");
- texflg=Toupper(substring(tmp1,tmp,tmp+1));
- );
- if(indexof(tmp1,"NET")>0,
- tmp=indexof(tmp1,"=");
- netflg=Toupper(substring(tmp1,tmp,tmp+1));
- );
- );
- if(isexists(dirfile,Fhead+".html"),//180411to
- SCEOUTPUT = openfile(Fhead+".r");
- println(SCEOUTPUT,"Looprange<- function(a,b){");
- println(SCEOUTPUT," if (a<=b) return(a:b)");
- println(SCEOUTPUT," return(c())");
- println(SCEOUTPUT,"}");
- println(SCEOUTPUT,"setwd('"+dirketjs+"')");
- println(SCEOUTPUT,"Dtket=readLines('"+libname+".txt')");
- println(SCEOUTPUT,"setwd('"+dirfile+"')");//180411
- println(SCEOUTPUT,"Dtjs=readLines('"+Fhead+".html')");
- println(SCEOUTPUT,"Qt=rawToChar(as.raw(34))");
- println(SCEOUTPUT,
- "Dtinit=c(paste('<script id=',Qt,'csinit',Qt,' type=',Qt,'text/x-cindyscript',Qt,'>',sep=''))");
- println(SCEOUTPUT,"Dtinit=c(Dtinit,Dtket,'</script>')");
- println(SCEOUTPUT,"Dthead=c()");
- println(SCEOUTPUT,"for(I in Looprange(1,length(Dtjs))){");
- println(SCEOUTPUT," if(length(grep('<script id=',Dtjs[I],fixed=TRUE))==0){");
- println(SCEOUTPUT," Tmp=Dtjs[I]");
- if(netflg=="N",
- println(SCEOUTPUT,
- " if(length(grep('link rel=',Tmp,fixed=TRUE))>0){");
- println(SCEOUTPUT,
- " Tmp1='file:///"+dirketjs+"/CindyJS.css'");//180411
- println(SCEOUTPUT,
- " Tmp=paste(' <link rel=',Qt,'stylesheet',Qt,' href=',Qt,Tmp1,Qt,'>',sep='')");
- println(SCEOUTPUT,
- " }");
- println(SCEOUTPUT,
- " Tmp1=length(grep('script type=',Tmp,fixed=TRUE))");
- println(SCEOUTPUT,
- " Tmp1=Tmp1*length(grep('Cindy.js',Tmp,fixed=TRUE))");
- println(SCEOUTPUT,
- " if(Tmp1>0){");
- println(SCEOUTPUT,
- " Tmp1='file:///"+dirketjs+"/Cindy.js'");//180411
- println(SCEOUTPUT,
- " Tmp=paste(' <script type=',Qt,'text/javascript',Qt,' src=',Qt,Tmp1,Qt,'>',sep='')");
- println(SCEOUTPUT,
- " Tmp=paste(Tmp,'</script>',sep='')");
- println(SCEOUTPUT,
- " }");
- );
- println(SCEOUTPUT,
- " Dthead=c(Dthead,Tmp)");
- println(SCEOUTPUT,
- " }else{");
- println(SCEOUTPUT,
- " Is=I; break");
- println(SCEOUTPUT,
- " }");
- println(SCEOUTPUT,
- "}");
- println(SCEOUTPUT,"Dt=c()");
- println(SCEOUTPUT,"for(I in Looprange(Is,length(Dtjs))){");
- println(SCEOUTPUT," Dt=c(Dt,Dtjs[I])");
- println(SCEOUTPUT," if(length(grep('</script>',Dtjs[I],fixed=TRUE))>0){");
- println(SCEOUTPUT," if(length(grep('draw',Dt[1],fixed=TRUE))>0){Dtdraw=Dt}");
- println(SCEOUTPUT," if(length(grep('keytyped',Dt[1],fixed=TRUE))>0){Dtkey=Dt}");
- println(SCEOUTPUT," Dt=c()");
- println(SCEOUTPUT," if(length(grep('<script id=',Dtjs[I+1],fixed=TRUE))==0){");
- println(SCEOUTPUT," Ie=I+1;break");
- println(SCEOUTPUT," }");
- println(SCEOUTPUT," }");
- println(SCEOUTPUT,"}");
- println(SCEOUTPUT,"Dt=c(Dthead,Dtdraw,Dtkey,Dtinit)");
- println(SCEOUTPUT,"for(I in Looprange(Ie,length(Dtjs))){");
- println(SCEOUTPUT,
- " if(length(grep('Button',Dtjs[I],fixed=TRUE))>0){");
- println(SCEOUTPUT,
- " if(length(grep(paste(Qt,'Figure',sep=''),Dtjs[I],fixed=TRUE))>0){next}");
- println(SCEOUTPUT,
- " if(length(grep(paste(Qt,'Exekc',sep=''),Dtjs[I],fixed=TRUE))>0){next}");
- println(SCEOUTPUT,
- " if(length(grep(paste(Qt,'Parent',sep=''),Dtjs[I],fixed=TRUE))>0){next}");
- println(SCEOUTPUT,
- " if(length(grep(paste(Qt,'KeTJS',sep=''),Dtjs[I],fixed=TRUE))>0){next}");
- println(SCEOUTPUT,
- " }");
- println(SCEOUTPUT," Dt=c(Dt,Dtjs[I])");
- if(texflg=="Y",
- println(SCEOUTPUT,
- " if(length(grep(paste(Qt,'cs*',Qt,sep=''),Dtjs[I],fixed=TRUE))>0){");
- println(SCEOUTPUT,
- " Dt=c(Dt,paste(' use: [',Qt,'katex',Qt,'],',sep=''))");
- println(SCEOUTPUT,
- " }");
- );
- println(SCEOUTPUT,"}");
- println(SCEOUTPUT,"setwd('"+dirfile+"')");//180411
- println(SCEOUTPUT,"writeLines(Dt,'"+Fhead+"ketcindy.html',sep='\n')");
- println(SCEOUTPUT,"quit()");
- closefile(SCEOUTPUT);
- kcR(PathR,Fhead+".r",["m"]);
- println(Fhead+"ketcindy.html generated successfully");
- ,
- drawtext(mouse().xy-[0,1],"use 'write to CindyJS' before that",size->24,color->[1,0,0]);
- wait(3000);
- );
-);
-
///////////////// C function //////////////////
Cformold(strorg):=(
@@ -5200,7 +5080,7 @@ kcC(cname):=(
); //181125to
println(SCEOUTPUT,"#!/bin/sh");
println(SCEOUTPUT,"cd "+Dq+Dirwork+Dq);
- tmp=PathC+" -lm "+cname+".c -o main.out"; //180612
+ tmp=PathC+" "+cname+".c -o main.out -lm"; //190123
println(SCEOUTPUT,tmp);
println(SCEOUTPUT,"./main.out");
println(SCEOUTPUT,"echo ////>"+rfile);
@@ -5632,6 +5512,22 @@ CalcbyC(name,path,cmd,optionorg):=(
);
////%CalcbyC end////
+////%Gccexists start////
+Gccexists():=( //190124
+ regional(out);
+ if(iswindows(),
+ out=isexists("",PathC);
+ ,
+ if(indexof(PathC,"/")==0, //190127from
+ out=isexists("/usr/bin",PathC);
+ ,
+ out=isexists("",PathC);
+ );
+ ); //190127to
+ out;
+);
+////%Gccexists end////
+
////%ExeccmdC start////
ExeccmdC(nm):=ExeccmdC(nm,[],["do"]); //180531
ExeccmdC(nm,options):=ExeccmdC(nm,options,["do"]);
@@ -5794,8 +5690,12 @@ SfbdparadataC(nm,fdorg,optionorg,optionshorg):=(
name2h="sfbdh2d"+nm;
name3h="sfbdh3d"+nm;
fname=Fhead+"sfbd"+nm+".txt";
- options=optionorg;
- optionsh=select(optionshorg,length(#)>0); //181107
+ options=select(optionorg,length(#)>0); //190123from
+ tmp=Divoptions(options);
+ if(length(tmp_7)==0,options=append(options,"dr"));
+ optionsh=select(optionshorg,length(#)>0);
+ tmp=Divoptions(optionsh);
+ if(length(tmp_7)==0,optionsh=append(optionsh,"do")); //190123to
tmp=Divoptions(options);
eqL=tmp_5;
reL=tmp_6;
@@ -5918,8 +5818,12 @@ CrvsfparadataC(nm,Fk,sfbdorg,fdorg,optionorg,optionshorg):=(
name2h="crvsfh2d"+nm;
name3h="crvsfh3d"+nm;
fname=Fhead+"crvsf"+nm+".txt";
- options=optionorg;
- optionsh=select(optionshorg,length(#)>0); //181107
+ options=select(optionorg,length(#)>0); //190123from
+ tmp=Divoptions(options);
+ if(length(tmp_7)==0,options=append(options,"dr"));
+ optionsh=select(optionshorg,length(#)>0);
+ tmp=Divoptions(optionsh);
+ if(length(tmp_7)==0,optionsh=append(optionsh,"do")); //190123to
tmp=Divoptions(options);
eqL=tmp_5;
reL=tmp_6;
@@ -6280,8 +6184,12 @@ WireparadataC(nm,sfbd,fdorg,wr1,wr2,optionorg,optionshorg):=(
name3h="wireh3d"+nm;
fname=Fhead+"wire"+nm+".txt";
fnameh=replace(fname,".txt","h.txt");
- options=optionorg;
- optionsh=select(optionshorg,length(#)>0); //181107
+ options=select(optionorg,length(#)>0); //190123from
+ tmp=Divoptions(options);
+ if(length(tmp_7)==0,options=append(options,"dr"));
+ optionsh=select(optionshorg,length(#)>0);
+ tmp=Divoptions(optionsh);
+ if(length(tmp_7)==0,optionsh=append(optionsh,"do")); //190123to
tmp=Divoptions(options);
eqL=tmp_5;
reL=tmp_6;
@@ -6579,7 +6487,7 @@ SfcutparadataC(nm,cutfunL,sfbd,fd):=(//180505
SfcutparadataC(nm,cutfunL,sfbd,fd,[],["do"]);
);
SfcutparadataC(nm,cutfunL,sfbd,fd,options):=
- SfcutparadataC(nm,cutfunL,sfbd,fd,options,["nodisp"]);
+ SfcutparadataC(nm,cutfunL,sfbd,fd,options,[]);
SfcutparadataC(nm,cutfunLorg,sfbd,fdorg,optionorg,optionshorg):=(
//help:Sfcutparadata("1","2*x+3*y+z=1","sfbd3d",fd,nohiddenoptions,hiddenoptions);
regional(funnm,cutfunL,fd,options,optionsh,name2,name3,name2h,name3h,
@@ -6632,8 +6540,12 @@ SfcutparadataC(nm,cutfunLorg,sfbd,fdorg,optionorg,optionshorg):=(
options=remove(options,[#]);
);
);
- options=remove(options,reL);
- options=select(options,length(#)>0);
+ options=select(optionorg,length(#)>0); //190123from
+ tmp=Divoptions(options);
+ if(length(tmp_7)==0,options=append(options,"dr"));
+ optionsh=select(optionshorg,length(#)>0);
+ tmp=Divoptions(optionsh);
+ if(length(tmp_7)==0,optionsh=append(optionsh,"do")); //190123to
tmp1=select(options,
(indexof(#,"=")>0)&(Toupper(substring(#,0,1))=="C")); //181114from
if(length(tmp1)>0,
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent.r b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent.r
index b177e4245bb..0d7791d6fb0 100755
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent.r
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent.r
@@ -16,10 +16,16 @@
#########################################
-ThisVersion<- "KeTpic for R v5_2_4(20181128)"
+ThisVersion<- "KeTpic for R v5_2_4(20190127)"
print(ThisVersion)
+# 20190127
+# Mvprod added
+# 20181231
+# Drwpt debugged/changed ( grep removed, N=8 set )
+# 20181230
+# Drwpt changed ( Same, Incolor )
# 20181128
# Objthicksurf debugged
# 20181031
@@ -621,6 +627,29 @@ Dotprod<-function(a,b){ # 18.02.05
return(out)
}
+Mvprod<- function(...){ # 190127
+ varargin<- list(...)
+ mat=varargin[[1]]
+ vec=varargin[[2]]
+ if(length(varargin)>2){
+ nn=varargin[[3]]
+ }else{
+ nn=1
+ }
+ mm=round(length(vec)/nn)
+ mat=matrix(mat,ncol=mm,byrow=TRUE)
+ vec=matrix(vec,nrow=nn,byrow=TRUE)
+ out=c()
+ for(jj in 1:nn){
+ tmp=mat%*%Op(jj,vec)
+ out=c(out,tmp)
+ }
+ if(nn>1){
+ out=matrix(out,nrow=nn,byrow=TRUE)
+ }
+ return(out)
+}
+
Dist<- function(...) # 17.09.17
{
varargin<- list(...)
@@ -2361,29 +2390,45 @@ Drwline<-function(...)
###########################################
-Drwpt<-function(...)
-{ ## Scaling is implemented
+Drwpt<-function(...){
varargin<-list(...)
Nargs<-length(varargin)
if(TenSize>TenSizeInit){
- N<- round(6*sqrt(TenSize/TenSizeInit))
+ N=round(10*sqrt(TenSize/TenSizeInit)) #181231
}
else{
- N<-4
+ if(TenSize==TenSizeInit){ #181231from
+ N=10
+ }else{
+ N=4
+ } #181231to
}
- Tmp<- varargin[[Nargs]]
- if(mode(Tmp)=="numeric"){
- if(length(Tmp)>1){
- Kosa<- 1; All<- Nargs
- }
- else{
- Kosa<- Tmp; All<- Nargs-1
+ All=Nargs #181230from
+ Same="y"
+ Incolor=""
+ Tmp=varargin[[All]]
+ if(is.numeric(Tmp)){
+ if(length(Tmp)==3){Tmp=c(Tmp,1)} #181231
+ if(length(Tmp)==4){
+ if(Tmp[4]<0){ #181231from
+ Same="nn"
+ }else{
+ Incolor=paste(" ",as.character(Tmp[4]),sep="")
+ } #181231to
+ }else{
+ Same="n"
+ Incolor="{"
+ for(J in 4:6){
+ Incolor=paste(Incolor,as.character(Tmp[J]),sep="")
+ if(J<6){
+ Incolor=paste(Incolor,",",sep="")
+ }
+ }
+ Incolor=paste(Incolor,"}",sep="")
}
- }
- else if(mode(Tmp)=="list"){
- Kosa<- 1; All<- Nargs
- }
- CL<-c()
+ All=Nargs-1
+ }#181230to
+ CL<- c()
for (J in 0:N){
Tmp<- TenSize*0.5*1000/2.54/MilliIn
Tmp<- Tmp*c(cos(pi/4+J*2*pi/N),sin(pi/4+J*2*pi/N))
@@ -2405,9 +2450,29 @@ Drwpt<-function(...)
for (J in 0:N){
PL<- c(PL,P+CL[J+1,])
}
- PL<-matrix(PL,nrow=2)
- PL<-t(PL)
- Mojisu<-0
+ PL<- matrix(PL,nrow=2)
+ PL<- t(PL)
+ if(Same=="n"){ #181230from
+ Str1<- paste("{\\special{pn 0}\\color[rgb]",Incolor,"%\n",sep="")
+ cat(Str1,file=Wfile,append=TRUE)
+ Mojisu<-0
+ for (J in 1:Nrow(PL)){
+ Q<- PL[J,]
+ X<- as.character(round(MilliIn*Q[1]))
+ Y<- as.character(-round(MilliIn*Q[2]))
+ Str<- paste("\\special{pa ",X," ",Y,"}",sep="")
+ cat(Str,file=Wfile,append=TRUE)
+ Mojisu<- Mojisu+nchar(Str)
+ if(Mojisu>80){
+ cat("#\n",file=Wfile,append=TRUE)
+ }
+ Mojisu=0
+ }
+ Str1<- paste("\\special{sh}\\special{fp}}%\n",sep="")
+ cat(Str1,file=Wfile,append=TRUE)
+ }
+ cat("\\special{pn 4}",file=Wfile,append=TRUE) #181231
+ Mojisu=0
for (J in 1:Nrow(PL)){
Q<- PL[J,]
X<- as.character(round(MilliIn*Q[1]))
@@ -2420,10 +2485,12 @@ Drwpt<-function(...)
}
Mojisu=0
}
- Str1<- paste("\\special{sh ",as.character(Kosa),"}",sep="")
- Str2<- "\\special{fp}%\n"
- cat(Str1,file=Wfile,append=TRUE)
- cat(Str2,file=Wfile,append=TRUE)
+ if(Same=="y"){
+ Str1<- paste("\\special{sh",Incolor,"}\\special{fp}%\n",sep="")
+ }else{
+ Str1<- paste("\\special{fp}%\n",sep="")
+ }
+ cat(Str1,file=Wfile,append=TRUE) #181230to
}
}
}
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_rep2e.r b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_rep2e.r
index bce6137fea1..8d2a90b274d 100755
--- a/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_rep2e.r
+++ b/Master/texmf-dist/scripts/ketcindy/ketlib/ketpiccurrent_rep2e.r
@@ -16,8 +16,10 @@
#########################################
-ThisVersion<- "2ev5_2_4(180930)"
+ThisVersion<- "2ev5_2_4(181230)"
+# 20181230
+# Drwpt changed ( Inside )
# 20180930
# Drwpt debugged ( the last newline added)
# 20180929
@@ -206,58 +208,41 @@ Drwline<-function(...)
###########################################
-Drwpt<-function(...)
+Drwpt<-function(...) #181230
{
varargin<-list(...)
Nargs<-length(varargin)
All=Nargs
- if (TenSize>TenSizeInit){
- N<- round(6*sqrt(TenSize/TenSizeInit))
- }
- else{
- N<-4
- }
- Tmp<- varargin[[All]]
- Iro=c(0,0,0,1)
- Iroflg=0
- if(is.character(Tmp)){
- Iro=Ratiocmyk(Tmp)
- Iroflg=1
- All=All-1
- }
- Tmp<- varargin[[All]]
- if (mode(Tmp)=="numeric"){
- if (length(Tmp)>1){
- Kosa<- 1; All<- Nargs
- }
- else{
- Kosa<- Tmp; All<- All-1
+ Same="y"
+ Incolor=""
+ Tmp=varargin[[All]]
+ if(is.numeric(Tmp)){
+ if(length(Tmp)==3){Tmp=c(Tmp,1)}
+ if(length(Tmp)==4){
+ if(Tmp[4]<0){
+ Same="nn"
+ }else{
+ if(Tmp[4]!=1){
+ Tmp1=Tmp[4]*(c(1,1,1)-Tmp[1:3])
+ Tmp1=c(1,1,1)-Tmp1
+ Tmp=c(Tmp[1:3],Tmp1)
+ }
+ }
}
- }
- else if (mode(Tmp)=="list"){
- Kosa<- 1; All<- Nargs
- }
- Ra=TenSize*1000/2.54/MilliIn
- if(Iroflg>0){
- Str='{\\color[cmyk]{'
- for(J in 1:4){
- Str=paste(Str,as.character(Kosa*Iro[J]),sep="")
- if(J<4){
- Str=paste(Str,',',sep="")
+ if(length(Tmp)==6){
+ Same="n"
+ Incolor="\\color[rgb]{"
+ for(J in 4:6){
+ Incolor=paste(Incolor,as.character(Tmp[J]),sep="")
+ if(J<6){
+ Incolor=paste(Incolor,",",sep="")
+ }
}
+ Incolor=paste(Incolor,"}",sep="")
}
- Str=paste(Str,'}%',sep="")
- cat(Str,file=Wfile,append=TRUE)
+ All=Nargs-1
}
-
-# CL<-c()
-# for (J in 0:N){
-# Tmp<- TenSize*0.5*1000/2.54/MilliIn
-# Tmp<- Tmp*c(cos(pi/4+J*2*pi/N),sin(pi/4+J*2*pi/N))
-# CL<- append(CL,Tmp)
-# }
-# CL<- matrix(CL,nrow=2)
-# CL<- t(CL)
+ Ra=TenSize*1000/2.54/MilliIn
Mojisu=0
for (II in Looprange(1,All)){
MS<- varargin[[II]]
@@ -271,23 +256,33 @@ Drwpt<-function(...)
P<- Doscaling(P)
X=sprintf('%5.5f',P[1])
Y=sprintf('%5.5f',P[2])
- Str=paste('\\put(',X,',',Y,'){\\circle*{',sprintf('%6.6f',Ra),'}}',sep="")
+ Str=""
+ if(Same=="n"){
+ Str=paste("{\\linethickness{0 in}",Incolor,sep="")
+ }
+ if(Same!="nn"){
+ Str=paste(Str,'\\put(',X,',',Y,'){\\circle*{',sprintf('%6.6f',Ra),'}}',sep="")
+ cat(Str,file=Wfile,append=TRUE)
+ Mojisu=Mojisu+nchar(Str)
+ }
+ if(Same=="n"){
+ cat("}",file=Wfile,append=TRUE)
+ }
+ Str=paste('\\put(',X,',',Y,'){\\circle{',sprintf('%6.6f',Ra),'}}',sep="")
cat(Str,file=Wfile,append=TRUE)
Mojisu=Mojisu+nchar(Str)
if(Mojisu>80){
cat("\n",file=Wfile,append=TRUE)
Mojisu=0
+ Str=""
}
}
}
- Str="%"
- if(Iroflg>0){
- Str='}%'
+ if(Same=="n"){
+ # Str='}%'
}
if(Mojisu>0){
Str=paste('\n',Str,'\n',sep="")
- }else{
- Fmt=paste(Str,'\n',sep="")
}
cat(Str,file=Wfile,append=TRUE)
cat("\n",file=Wfile,append=TRUE) #180930
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlibC/ketlibClog.txt b/Master/texmf-dist/scripts/ketcindy/ketlibC/ketlibClog.txt
index cb026b1a340..d3f9ac4d8d1 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlibC/ketlibClog.txt
+++ b/Master/texmf-dist/scripts/ketcindy/ketlibC/ketlibClog.txt
@@ -1,3 +1,7 @@
+190124
+ readoutdata3 changed (tmp,strtmp)
+190123
+ Use of sprintf
181105
output3h debugged ( ctr=0 added in varh )
readoutdata3 debugged (//,etc )
diff --git a/Master/texmf-dist/scripts/ketcindy/ketlibC/surflib.h b/Master/texmf-dist/scripts/ketcindy/ketlibC/surflib.h
index a72eed58230..f700a071252 100644
--- a/Master/texmf-dist/scripts/ketcindy/ketlibC/surflib.h
+++ b/Master/texmf-dist/scripts/ketcindy/ketlibC/surflib.h
@@ -1356,16 +1356,24 @@ void wireparadata(short ch,double bdyk[][3], double udata[], double vdata[],cons
if(strlen(fnameh)>0){
allflg=0;
}
- char var[20]="wire3d";
- char varh[20]="wireh3d";
- char varnow[20]={'\0'};
- char varhnow[20]={'\0'};
- sprintf(var,"%s%d",var,ch);
- sprintf(varh,"%s%d",varh,ch);
- char dirfname[256] = {'\0'};
- char dirfnameh[256] = {'\0'};
- char varname[256] = {'\0'};
- char varnameh[256] = {'\0'};
+ char var0[]="wire3d";
+ char varh0[]="wireh3d";
+ char var[20];
+ char varh[20];
+ char varnow[40];
+ char varhnow[40];
+ varnow[0]='\0';
+ varhnow[0]='\0';
+ sprintf(var,"%s%d",var0,ch);
+ sprintf(varh,"%s%d",varh0,ch);
+ char dirfname[256];
+ char dirfnameh[256];
+ char varname[256];
+ char varnameh[256];
+ dirfname[0]='\0';
+ dirfnameh[0]='\0';
+ varname[0]='\0';
+ varnameh[0]='\0';
sprintf(varname,"%s%d",var,ch);
sprintf(varnameh,"%s%d",varh,ch);
sprintf(dirfname,"%s%s",Dirname,fname);
@@ -1440,9 +1448,11 @@ void intersectcrvsf(const char *wa, short chfd,double crv[][3],const char *fname
char chc[10];
sprintf(chc,"%d",chfd);
char var[]="intercrvsf";
- char dirfname[256] = {'\0'};
+ char dirfname[256];
+ dirfname[0] = '\0';
sprintf(dirfname,"%s%s",Dirname,fname);
- char varname[256] = {'\0'};
+ char varname[256];
+ varname[0] = '\0';
sprintf(varname,"%s%s",var,chc);
ptL[0][0]=0;
for(i=1;i<length3(crv);i++){
@@ -1471,16 +1481,24 @@ void sfcutparadata(short chfd, short ncut, double fbdy3[][3],const char *fname,c
if(strlen(fnameh)==0){
allflg=1;
}
- char var[20]="sfcut3d";
- char varh[20]="sfcuth3d";
- sprintf(var,"%s%d",var,chfd);
- sprintf(varh,"%s%d",varh,chfd);
- char varnow[20]={'\0'};
- char varhnow[20]={'\0'};
- char dirfname[256] = {'\0'};
- char dirfnameh[256] = {'\0'};
- char varname[256] = {'\0'};
- char varnameh[256] = {'\0'};
+ char var0[]="sfcut3d";
+ char varh0[]="sfcuth3d";
+ char var[20];
+ char varh[20];
+ sprintf(var,"%s%d",var0,chfd);
+ sprintf(varh,"%s%d",varh0,chfd);
+ char varnow[40];
+ char varhnow[40];
+ char dirfname[256];
+ char dirfnameh[256];
+ char varname[256];
+ char varnameh[256];
+ varnow[0]='\0';
+ varhnow[0]='\0';
+ dirfname[0]='\0';
+ dirfnameh[0]='\0';
+ varname[0]='\0';
+ varnameh[0]='\0';
sprintf(varname,"%s%d",var,chfd);
sprintf(varnameh,"%s%d",varh,chfd);
sprintf(dirfname,"%s%s",Dirname,fname);
@@ -1959,10 +1977,16 @@ int skeletondata3(double data[][3], double r00,
void readoutdata3(const char *fname, const char *var, double data[][3]){
double x,y,z;
float xx;
- char dstrorg[256] = {'\0'};
- char dstr[256] = {'\0'};
- char str[10] = {'\0'},tmp[2]={'\0'};
- int linectr=0, start=0, jj,nn,nctr;
+ char dstrorg[256];
+ dstrorg[0]='\0';
+ char dstr[256];
+ dstr[0]='\0';
+ char str[10];
+ str[0]='\0';
+ char strtmp[30];
+ char tmp[10];
+ tmp[0]='\0';
+ int linectr=0, start=0,ii,jj,nn,nctr;
FILE *fp;
fp=fopen(fname,"r");
if(fp==NULL){
@@ -2005,7 +2029,7 @@ void readoutdata3(const char *fname, const char *var, double data[][3]){
str[0]='\0';
nctr=0;
for(jj=2;jj<250;jj++){
- tmp[0]='\0'; sprintf(tmp,"%s%c",tmp,dstr[jj]);
+ tmp[0]='\0'; sprintf(tmp,"%c",dstr[jj]);
if(strncmp(tmp,"/",1)==0){
break;
}
@@ -2028,13 +2052,21 @@ void readoutdata3(const char *fname, const char *var, double data[][3]){
add3(data,x,y,z);
nctr=0;
jj++;
- tmp[0]='\0'; sprintf(tmp,"%s%c",tmp,dstr[jj]);
+ tmp[0]='\0'; sprintf(tmp,"%c",dstr[jj]);
if(strncmp(tmp,",",1)==0){
jj++;
}
continue;
}
- sprintf(str,"%s%s",str,tmp);
+ strtmp[0]='\0';
+ sprintf(strtmp,"%s%s",str,tmp);
+ str[0]='\0';
+ for(ii=0;ii<20;ii++){
+ str[ii]=strtmp[ii];
+ if(strtmp[ii]=='\0'){
+ break;
+ }
+ }
}
}
fclose(fp);
diff --git a/Master/texmf-dist/scripts/ketcindy/template2allbuttons.cdy b/Master/texmf-dist/scripts/ketcindy/template2allbuttons.cdy
new file mode 100644
index 00000000000..5b518f9f9e3
--- /dev/null
+++ b/Master/texmf-dist/scripts/ketcindy/template2allbuttons.cdy
Binary files differ
diff --git a/Master/texmf-dist/scripts/ketcindy/template2slide.cdy b/Master/texmf-dist/scripts/ketcindy/template2slide.cdy
deleted file mode 100644
index 223c67406b6..00000000000
--- a/Master/texmf-dist/scripts/ketcindy/template2slide.cdy
+++ /dev/null
Binary files differ