- fixed LaTeX output of conjugate()
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 6 Jan 2004 20:58:26 +0000 (20:58 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 6 Jan 2004 20:58:26 +0000 (20:58 +0000)
- symbol::info() answers to info_flags::real

ginac/inifcns.cpp
ginac/symbol.cpp

index 33582acb1f3c2672371cdba1742d5dfb19161559..4ffbe2540726e1f75a79f719595cc816a5152344 100644 (file)
@@ -58,7 +58,7 @@ static ex conjugate_eval(const ex & arg)
 
 static void conjugate_print_latex(const ex & arg, const print_context & c)
 {
-       c.s << "\bar{"; arg.print(c); c.s << "}";
+       c.s << "\\bar{"; arg.print(c); c.s << "}";
 }
 
 static ex conjugate_conjugate(const ex & arg)
index 57227fd1d7da9ba561579946056c0a1f04c96226..06016984f58f6fb1feeb4bccb9778e20b8d33761 100644 (file)
@@ -165,14 +165,17 @@ void symbol::do_print_python_repr(const print_python_repr & c, unsigned level) c
 
 bool symbol::info(unsigned inf) const
 {
-       if (inf==info_flags::symbol) return true;
-       if (inf==info_flags::polynomial ||
-           inf==info_flags::integer_polynomial ||
-           inf==info_flags::cinteger_polynomial ||
-           inf==info_flags::rational_polynomial ||
-           inf==info_flags::crational_polynomial ||
-           inf==info_flags::rational_function)
+       if (inf == info_flags::symbol)
                return true;
+       if (inf == info_flags::polynomial ||
+           inf == info_flags::integer_polynomial ||
+           inf == info_flags::cinteger_polynomial ||
+           inf == info_flags::rational_polynomial ||
+           inf == info_flags::crational_polynomial ||
+           inf == info_flags::rational_function)
+               return true;
+       if (inf == info_flags::real)
+               return domain == symbol_options::real;
        else
                return inherited::info(inf);
 }