LaTeX output of indexed objects
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} }
Hi! On Mon, Mar 04, 2002 at 11:18:41AM +0100, Alexander Heide wrote:
I think instead of the above expression, print_latex() should yield: {A}_{{i} {j} }
Yes. This is fixed now in CVS. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
participants (2)
-
Alexander Heide
-
Christian Bauer