]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns.cpp
Output LaTeX-symbols using \mathrm, instead of \mbox.
[ginac.git] / ginac / inifcns.cpp
index f7821ed69efa01e7ee05fe5850327d980008ed9f..20ea659ff52dee8286ce5ff09877f847a7c4a61e 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's initially known functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2009 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
@@ -20,9 +20,6 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <vector>
-#include <stdexcept>
-
 #include "inifcns.h"
 #include "ex.h"
 #include "constant.h"
@@ -37,6 +34,9 @@
 #include "symmetry.h"
 #include "utils.h"
 
+#include <stdexcept>
+#include <vector>
+
 namespace GiNaC {
 
 //////////
@@ -647,7 +647,7 @@ REGISTER_FUNCTION(Li2, eval_func(Li2_eval).
                        evalf_func(Li2_evalf).
                        derivative_func(Li2_deriv).
                        series_func(Li2_series).
-                       latex_name("\\mbox{Li}_2"));
+                       latex_name("\\mathrm{Li}_2"));
 
 //////////
 // trilogarithm
@@ -661,7 +661,7 @@ static ex Li3_eval(const ex & x)
 }
 
 REGISTER_FUNCTION(Li3, eval_func(Li3_eval).
-                       latex_name("\\mbox{Li}_3"));
+                       latex_name("\\mathrm{Li}_3"));
 
 //////////
 // Derivatives of Riemann's Zeta-function  zetaderiv(0,x)==zeta(x)
@@ -759,7 +759,7 @@ static ex binomial_sym(const ex & x, const numeric & y)
        if (y.is_integer()) {
                if (y.is_nonneg_integer()) {
                        const unsigned N = y.to_int();
-                       if (N == 0) return _ex0;
+                       if (N == 0) return _ex1;
                        if (N == 1) return x;
                        ex t = x.expand();
                        for (unsigned i = 2; i <= N; ++i)