Go to page:

Search:   Help

Edit

# TheTensindPackage

Categories: LaTeX packages
<< | Page list | >>

Tensor Index Notation

The tensind package provides a natural way to produce tensors symbols
with multiple up and down indices such as Rijkl and the like in LaTeX.
In LaTeX, one loads the package in the preamble:
`\usepackage{tensind}`
`\tensordelimiter{?}`
Then in the document one just enters `\$?R^i_{jk}^l?\$` where in this case the `?` designates
the beginning and end of the tensor expression.
In LyX, using the same input inside mathed won't work: LyX reorders the
indices such that lower indices always come first, which messes things up.

Here is a workaround: All indices after the first one need to be preceded by an empty
pair of brackets (entering "\{" in mathed). The resulting LateX code
`\$?R^i{}_{jk}{}^l?\$` is understood by tensind
and it even looks nice in mathed.

To streamline this, you can optionally define a math macro
(I use `\tudu` for tensor, up-down-up) e.g. as follows: place the text
`\newcommand{\tudu}[4]{?{#1}^{#2}{}_{#3}{}^{#4}?}`
into a math box to get a math macro. Then into the still empty formatting box of the macro, paste
`#1^{#2}{}_{#3}{}^{#4}`
to make the display in LyX nice. The same can of course be done for other
index combinations. You now have a tensind up-down-up tensor with graphical input inside mathed. That's it.
LaTeX packages