I often have to write expressions like this in math mode:
L_t^pL_x^q
For some reason, I am not always satisfied with typing this and I would like to define some new command with the same output. I was thinking whether it could be possible to define a command with the same output for which the code would look like the following:
\LL_t_x^p^q
I have found this post concerning tensors that looks quite related (see the first answer). The syntax used in the package "tensor" would be quite good, but I don't know how to replicate a command with that syntax.
My questions are the following:
Even though the syntax in the package "tensor" is quite nice, in my deepest dreams I would like to be able to use the exact same one in the command that I wrote above:
\LL_x_t^p^q. So, would there be a way of designing a command that works as above (that is, a command of the form\LL_t_x^p^qwhich has the same output ofL_t^pL_x^q)?If not, how can I design a command with the same syntax of the package "tensor"? That is (if I understand correctly), a generic command with 3 classes of inputs
\arg,\superscriptI,\superscriptII,...,\subscriptI,\subscriptII,...with the following syntax:
\commandname{\arg}{^\superscriptI_\subscriptI_\subscriptII^\superscriptII...}
(in my case, I would like to write a command of the form \LL{_x_t^p^q}, with the same output as L_t^pL_x^q).




\LL_{t,x}^{p,q}be an alternative? – egreg Nov 29 '22 at 16:08\newcommand\LL[4]{L_{#1}^{#3}L_{#2}^{#4}}and invoke it as\LL{t{x}{p{}q}(or\LL txpqif you are lazy) – Hagen von Eitzen Nov 30 '22 at 16:51