4 Mar
2002
4 Mar
'02
11:18 a.m.
I encountered problems while playing with GiNaC. I want to produce LaTeX output of an indexed object. Consider the following code: #include <iostream> #include <ginac/ginac.h> using namespace std; using namespace GiNaC; int main() { symbol i_sym("i"), j_sym("j"); idx i(i_sym, 4), j(j_sym, 4); symbol A("A"); indexed(A, i, j).print(print_latex(std::cout)); return 0; } This prints out: {A}_{_{i} _{j} } If I try to latex this piece of latex code I get an error message: ! Double subscript. I think instead of the above expression, print_latex() should yield: {A}_{{i} {j} }