Changeset 26ebc6 in git for Singular/LIB/latex.lib


Ignore:
Timestamp:
Feb 25, 2013, 12:37:51 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
27c79fcbc083eb57ec1345d22a6892cf162f017b
Parents:
0c516e37d47da9dbc827d68d2253f7289dfbfd3c8c2815d19daf34708c2cbc2cf44f8a95b28e3a28
Message:
Merge pull request #303 from YueRen/floatprint

chg: added brackets around floating numbers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/latex.lib

    r0c516e r26ebc6  
    13111311{
    13121312  string t;
    1313   if (s=="      Inf") { return("\\infty",3);}
    1314   if (s=="     -Inf") { return("\\-infty",6);}
    1315   if (s[7]=="-"){t ="-";}
    1316   if (s[8]<>"0"){t = t + s[8];}
    1317   if (s[9]<>"0" or s[8]<>"0"){t = t + s[9];}
     1313  if (s=="(      Inf)") { return("\\infty",3);}
     1314  if (s=="(     -Inf)") { return("\\-infty",6);}
     1315  if (s[8]=="-"){t ="-";}
     1316  if (s[9]<>"0"){t = t + s[9];}
     1317  if (s[10]<>"0" or s[9]<>"0"){t = t + s[10];}
    13181318  if (size(t))
    1319   { if (t=="1") {return(s[1,5]+"*10",21);}
    1320     if (size(t)>1) {return(s[1,5]+"*10^{"+t+"}",21+2*size(t));}
    1321     else {return(s[1,5]+"*10^"+t,23);}
     1319  { if (t=="1") {return(s[1,6]+"\\cdot 10",21);}
     1320    if (size(t)>1) {return(s[1,6]+"\\cdot 10^{"+t+"}",21+2*size(t));}
     1321    else {return(s[1,6]+"\\cdot 10^"+t+")",23);}
    13221322  }
    13231323  else
    13241324  {
    1325     return(s[1,5],12);
     1325    return(s[2,5],12);
    13261326  }
    13271327}
Note: See TracChangeset for help on using the changeset viewer.