I'll take the opportunity to say that I wanted something like the previous image, but with the tensor itself showing and the right positions.
This took a minimal adaptation from the code you have sent me, but I'll share it so that people can have something to easily copy and paste that works out of the box.
CTensorEntries[ctensor_CTensor, T_?xTensorQ] := Module[{assoc},
ToTensorRules[T, ctensor];
frules = Join[
First[TensorValues[T]] /. Last[TensorValues[T]],
Last[TensorValues[T]]
];
assoc =
GroupBy[
DeleteCases[frules, _ -> 0],
Last -> First
];
Grid[
Reverse /@ List @@@ Normal[Column /@ assoc],
Frame -> {False, All},
Spacings -> {2, 1}
]
];
CTensorEntries[ctensor : CTensor[array_, bases_, _],
name_String : "T"] := Module[{vbundles, indices, sym, T, res},
vbundles = VBundleOfBasis /@ bases;
indices = NewIndexIn /@ vbundles;
sym = TensorSymmetry[array] /. {cyc : System`Cycles[cycs_], sign_} :>
Times[sign, Cycles @@ cycs];
If[ListQ[sym], sym = GenSet @@ sym];
Block[{$DefInfoQ = False},
DefTensor[T @@ indices, vbundles, sym, PrintAs -> name]];
res = CTensorEntries[ctensor, T]
]
You can use this by calling CTensorEntries[<tensor>, "<tensor symbol>"]
Best,
José Ferreira