diff options
author | Norbert Preining <norbert@preining.info> | 2018-02-12 14:52:54 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2018-02-12 14:52:54 +0900 |
commit | 8c3c49fd56de185396400a0e8a636ac03d8239ab (patch) | |
tree | adf96aee3f0bfbdc9df3a9e2dd86332a9dfee9cd /texmf-dist/scripts/ketcindy/ketlib/ketpic2escifiles6/Texsetctr.sci | |
parent | 5a993b26c76714f0810fdc7e3ae7bdc5eb1afd10 (diff) |
update ketcindy
Diffstat (limited to 'texmf-dist/scripts/ketcindy/ketlib/ketpic2escifiles6/Texsetctr.sci')
-rw-r--r-- | texmf-dist/scripts/ketcindy/ketlib/ketpic2escifiles6/Texsetctr.sci | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/texmf-dist/scripts/ketcindy/ketlib/ketpic2escifiles6/Texsetctr.sci b/texmf-dist/scripts/ketcindy/ketlib/ketpic2escifiles6/Texsetctr.sci deleted file mode 100644 index 166af676..00000000 --- a/texmf-dist/scripts/ketcindy/ketlib/ketpic2escifiles6/Texsetctr.sci +++ /dev/null @@ -1,70 +0,0 @@ -// 10.01.21 - -function Texsetctr(Nctr,Opstr) - Ctr=Texctr(Nctr); - Opstr=Opstr+'%'; - OperL='+-*/%'; - Oper=''; - Va=''; - Evflg=0; - Paflg=0; - for I=1:length(Opstr) - Tmp=part(Opstr,I); - if Tmp=='(' - Paflg=1; - if length(Va)>0 - Evflg=1; - Va=Va+Tmp; - end; - continue; - end; - if Tmp==')' - Paflg=0; - if Evflg>0 - Va=Va+Tmp; - end; - continue; - end; - if Paflg>0 - Va=Va+Tmp; - continue; - end; - if length(mtlb_findstr(Tmp,OperL))==0 - Va=Va+Tmp; - else - if Evflg>0 - Tmp1=evstr(Va); - Va='\value{'+Tmp1+'}'; - Evflg=0; - end; - if Oper=='' - if length(Va)>0 - Str='\setcounter{'+Ctr+'}{'+Va+'}'; - Texcom(Str); - end; - Oper=Tmp; - Va=''; - elseif Oper=='+' - Str='\addtocounter{'+Ctr+'}{'+Va+'}'; - Texcom(Str); - Oper=Tmp; - Va=''; - elseif Oper=='-' - Str='\addtocounter{'+Ctr+'}{-'+Va+'}'; - Texcom(Str); - Oper=Tmp; - Va=''; - elseif Oper=='*' - Str='\multiply\value{'+Ctr+'} by '+Va; - Texcom(Str); - Oper=Tmp; - Va=''; - elseif Oper=='/' - Str='\divide\value{'+Ctr+'} by '+Va; - Texcom(Str); - Oper=Tmp; - Va='' - end; - end; - end; -endfunction; |