Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

As per the manual entry for LaTeXForm...

\ket{A??}{q??}::LaTeXForm("|", A??, "\rangle_{", q??, "}").
ex := \ket{n+1}{a};

gives me

| (n+1,a)

Also,

\GG{n??}::LaTeXForm("\stackrel{n??}{G}");
GGtst := \GG{1};

gives me G with n?? on top, followed by (1) .

Removing the "??" in the definition of \GG just gives a popup generic Tex error saying that }\GG is not defined.

asked in Bug reports by (290 points)

1 Answer

0 votes

These more fancy constructions were introduced in 2.3.0; you need to upgrade if you are running an earlier version.

The second example works (but again, only in 2.3.0 and later) if you do

\GG{n??}::LaTeXForm("\stackrel{",n??,"}{G}").
GGtst := \GG{1};
answered by (56.2k points)

OK, my LaTexForm seems to work in 2.3.1.
The acknowledgement message printed by Cadabra could use a little bit of fixing, since it currently appears as:
Attached property LaTeXForm to \stackreln??G.
I.e., it's missing the braces.

...