1.How to make following equation have sense?

```
{+,-}::Symbol.
ex:=f_{-}+f_{+};
```

2.How to make all commutators

`[a b... , c d...] or \commutaor{a b... }{ c d...]`

become

`a b... c d... - c d... a b...`

+2 votes

Best answer

Yes, it does. I'm so sorry that I have not give more details about problems. In fact, I want make following equation have sense:

`ex:=f_{-\mu\nu}+f_{+\mu\nu}+f_{+}^{\mu\nu};`

So write that with the above as

`ex:= fm_{\mu\nu} + fp_{\mu\nu} + fp^{\mu\nu};`

(and declare your indices with `position=free`

to allow you to have expressions where the index positions do not match up. So in full,

```
fm{#}::LaTeXForm("{f_{-}}").
fp{#}::LaTeXForm("{f_{+}}").
{\mu,\nu}::Indices(position=free);
ex:= fm_{\mu\nu} + fp_{\mu\nu} + fp^{\mu\nu};
```

to give

$$f_{-\mu\nu} + f_{+\mu\nu} + {f_{+}}^{\mu\nu}$$