From: Christian Bauer Date: Fri, 25 Oct 2002 18:42:29 +0000 (+0000) Subject: fixed a problem in the LaTeX-output of negative fractions X-Git-Tag: release_1-0-12~4 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=2466c49d0c63f82a1b3a50a8b9d111d6b827aa41 fixed a problem in the LaTeX-output of negative fractions --- diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index a9f1c67b..a3872b96 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -322,8 +322,10 @@ static void print_real_number(const print_context & c, const cln::cl_R &x) !is_a(c)) { cln::print_real(c.s, ourflags, x); } else { // rational output in LaTeX context + if (x < 0) + c.s << "-"; c.s << "\\frac{"; - cln::print_real(c.s, ourflags, cln::numerator(cln::the(x))); + cln::print_real(c.s, ourflags, cln::abs(cln::numerator(cln::the(x)))); c.s << "}{"; cln::print_real(c.s, ourflags, cln::denominator(cln::the(x))); c.s << '}';