Back to index

texmacs  1.0.7.15
num2scm.m
Go to the documentation of this file.
00001 function tmp=num2scm(n)
00002        tmp='(with "mode" "math" "';
00003        if (isreal(n))
00004               tmp=[tmp, num2str(n), '" )'];
00005        else
00006               if (real(n) ~= 0)
00007                      if (imag(n)>=0)
00008                             op='+';
00009                      else
00010                             op='-';
00011                      end
00012                      tmp=['(with "mode" "math" "', num2str(real(n)),op,num2str(abs(imag(n))),'<cdot><b-i>")'];
00013               else
00014                      tmp=['(with "mode" "math" "', num2str(imag(n)),'<cdot><b-i>")'];
00015               end
00016        end