From 1e85d6122579d2c2d018537b89b8708ed41abfbd Mon Sep 17 00:00:00 2001 From: Jens Vollinga Date: Wed, 20 Apr 2005 17:42:05 +0000 Subject: [PATCH] Synced to HEAD: Better output for slashed expressions (C.Dams' patch). --- ginac/clifford.cpp | 4 ++-- ginac/clifford.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ginac/clifford.cpp b/ginac/clifford.cpp index 04730854..73f91615 100644 --- a/ginac/clifford.cpp +++ b/ginac/clifford.cpp @@ -200,7 +200,7 @@ void clifford::do_print_dflt(const print_dflt & c, unsigned level) const { // dirac_slash() object is printed differently if (is_dirac_slash(seq[0])) { - seq[0].print(c, level); + seq[0].print(c, precedence()); c.s << "\\"; } else this->print_dispatch(c, level); @@ -211,7 +211,7 @@ void clifford::do_print_latex(const print_latex & c, unsigned level) const // dirac_slash() object is printed differently if (is_dirac_slash(seq[0])) { c.s << "{"; - seq[0].print(c, level); + seq[0].print(c, precedence()); c.s << "\\hspace{-1.0ex}/}"; } else { c.s << "\\clifford[" << int(representation_label) << "]"; diff --git a/ginac/clifford.h b/ginac/clifford.h index b22c7487..f6f8b739 100644 --- a/ginac/clifford.h +++ b/ginac/clifford.h @@ -52,6 +52,8 @@ public: clifford(unsigned char rl, const ex & metr, std::auto_ptr vp); // functions overriding virtual functions from base classes +public: + unsigned precedence() const { return 65; } protected: ex eval_ncmul(const exvector & v) const; bool match_same_type(const basic & other) const; -- 2.45.1