]> www.ginac.de Git - ginac.git/blobdiff - ginac/constant.cpp
More evaluation rules: abs(x^n) => abs(x)^n (x > 0, n is real).
[ginac.git] / ginac / constant.cpp
index c7ef59d58cdacf3a488938951400d8f19b37d60d..b2308609d774a7cfa769054de76e27610d36fa4b 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's constant types and some special constants. */
 
 /*
- *  GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ constant::constant(const std::string & initname, evalffunctype efun, const std::
   : name(initname), ef(efun), serial(next_serial++), domain(dm)
 {
        if (texname.empty())
-               TeX_name = "\\mbox{" + name + "}";
+               TeX_name = "\\mathrm{" + name + "}";
        else
                TeX_name = texname;
        setflag(status_flags::evaluated | status_flags::expanded);
@@ -70,7 +70,7 @@ constant::constant(const std::string & initname, const numeric & initnumber, con
   : name(initname), ef(0), number(initnumber), serial(next_serial++), domain(dm)
 {
        if (texname.empty())
-               TeX_name = "\\mbox{" + name + "}";
+               TeX_name = "\\mathrm{" + name + "}";
        else
                TeX_name = texname;
        setflag(status_flags::evaluated | status_flags::expanded);
@@ -131,7 +131,7 @@ void constant::do_print_latex(const print_latex & c, unsigned level) const
 void constant::do_print_python_repr(const print_python_repr & c, unsigned level) const
 {
        c.s << class_name() << "('" << name << "'";
-       if (TeX_name != "\\mbox{" + name + "}")
+       if (TeX_name != "\\mathrm{" + name + "}")
                c.s << ",TeX_name='" << TeX_name << "'";
        c.s << ')';
 }