} else {
if (is_a<print_latex>(c))
- c.s << "_{";
+ c.s << "{";
else
c.s << ".";
bool need_parens = !(is_ex_exactly_of_type(value, numeric) || is_ex_of_type(value, symbol));
dim.print(c, level + delta_indent);
} else {
- if (is_a<print_latex>(c)) {
- if (covariant)
- c.s << "_{";
- else
- c.s << "^{";
- } else {
+ if (is_a<print_latex>(c))
+ c.s << "{";
+ else {
if (covariant)
c.s << ".";
else
while (it != itend) {
bool cur_covariant = (is_ex_of_type(*it, varidx) ? ex_to<varidx>(*it).is_covariant() : true);
- if (first || cur_covariant != covariant) {
+ if (first || cur_covariant != covariant) { // Variance changed
+ // The empty {} prevents indices from ending up on top of each other
if (!first)
- c.s << "}";
+ c.s << "}{}";
covariant = cur_covariant;
if (covariant)
c.s << "_{";