diff options
Diffstat (limited to 'texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Texnewcmd.sci')
-rwxr-xr-x | texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Texnewcmd.sci | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Texnewcmd.sci b/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Texnewcmd.sci new file mode 100755 index 00000000..b3b9a417 --- /dev/null +++ b/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Texnewcmd.sci @@ -0,0 +1,20 @@ +// 10.01.21 + +function Texnewcmd(varargin) + Nargs=length(varargin); + Str=varargin(1); + S='\newcommand{'+Str+'}'; + if Nargs>1 + Tmp=string(varargin(2)); + S=S+'['+Tmp+']'; + end; + if Nargs>2 + Tmp=varargin(3); + if type(Tmp)==1 + Tmp=string(Tmp); + end; + S=S+'['+Tmp+']'; + end; + S=S+'{'; + Texcom(S); +endfunction
\ No newline at end of file |