The tensind Package for Tensorial Indexes^{∗}

Javier Bezos^{†}

May 1, 1998

This package provides typographically fine tensorial notation, with the following features:

• Dots filling gaps.

• Symbol subtitution to easy typing (if you are using greek letters, for example).

• Corrected position of indexes: horizontally, to compensate the small displacement in letters like f (look carefully at f_{∗}^{∗}) and vertically, to avoid superscripts too raised.

• Aditional minute corrections are also allowed.

1 User Interface

\tensordelimiter{⟨tensor-delim⟩}

Defines ⟨tensor-delim⟩ to be a tensor delimiter. In subsequent examples we will assume

\tensordelimiter{?}

and every instance of ? will actually mean ⟨tensor-delim⟩.

?[⟨format⟩]{⟨nucleous⟩}{⟨special-index⟩}{⟨special-index⟩}... ⟨super-or-sub⟩⟨super-or-sub⟩...?

Creates a tensor. ⟨super-or-sub⟩ is either _{⟨index⟩}{⟨index⟩}... or ^{⟨index⟩}{⟨index⟩}. ⟨nucleous⟩ is the symbol which indexes will be add to.

∗This package is currently at version 1.0.

†Please, send your comments and suggestions to jbezos@mx3.redestb.es, or to my postal address: Apartado 116.035, E-28080 Madrid, Spain. English is not my strong point, so contact me when you find mistakes in the manual. Other packages by the same author: accents, polyglot, spanishb, titlesec.

⟨special-index⟩ is a superscript which is neither covariant nor contravariant (dual, prime...) In one-letter ⟨index⟩, ⟨special-index⟩ or ⟨nucleous⟩, curly braces can be omitted. For example:

     ?R_ij^kl_\alpha^\beta?  R\begin{matrix}kl β \\ ij · ·α · \end{matrix}
     ?R^ij_kl^\alpha_\beta?  R\begin{matrix}ij α \\ ··kl · β \end{matrix}
     ?R**_ij^kl_\alpha^\beta?  R_{ij · ·α ·}^{∗∗kl β}
     ?R**^ij_kl^\alpha_\beta?  R_{··kl · β}^{∗∗ij α}

(Don’t forget the closing ?!) Finally, ⟨format⟩ changes the format in a tensor.

(See \tensorformat below.)
\tensorformat{⟨format⟩}

The following letter may be used in format.

l Gaps to the left of the last index are filled with dots.

r Gaps to the right of the first index are filled.

e If there is no index (empty), gaps are filled.

b Only gaps in subscripts are filled. Sensible settings are: none (no dots), l and lrb. Further options are:

c Brings index lines closer.

o Opens index lines.

s Styled. o in display style and c otherwise. These options are mutually exclusive. If none of them is used, then indexes behave in a similar way to standard ones. This document sets

\tensorformat{lrb}
     ?[]f\prime_ij^kl?  f_{ij}^{′ kl}

     ?[e]f^ij?  f\begin{matrix}ij \\ · & · \end{matrix}

     ?[l]f*_ij^kl?  f_{ij}^{∗··kl}
     ?[c]R^ij_kl?  R _{kl}^{ij}

\indexdot

This macro is the index dot. Defined to \cdot. You can redefine it with

\renewcommand.

\whenindex{⟨index⟩}{⟨new-index⟩}{⟨commands⟩}

Automatically replaces ⟨index⟩ (if not enclosed in braces) by ⟨new-index⟩ and the additional ⟨commands⟩ are executed. For example, if you like to use greek indexes:

\whenindex{a}{\alpha}{}
\whenindex{b}{\beta}{}
\whenindex{g}{\gamma}{}

A \whenindex{'}{\prime}{} is performed by the package. For instance

     ?R'_ijk^abg?  R_{ijk · · ·}^{′ αβγ}

In ⟨commands⟩, two command for space fine-tuning are provided: \sbadjust{⟨index⟩}{⟨comma-space⟩} adds ⟨comma-space⟩ times \, before the current subscript index if the last superscript index was ⟨index⟩. Similarly, \spadjust adds the space before the current superscript index if the last subscript index was ⟨index⟩. For instance, the normal result of ?[]R^ik_lm? is

R\begin{aligned}ij \\ & kl \end{aligned}, but with

\whenindex{k}{k}{\sbadjust{j}{-1}}

is R\begin{matrix}ij \\ kl \end{matrix}. These commands will be ignored if dots are used.

Two further command allowed in \whenindex are: \omitdot omits the dot for the current index, and \finishdots omits as well all subsequent indexes. For example

\whenindex{;}{\,;\,}{\finishdots}

     ?[lr]A*_i^kl;i?  A_{i · ·}^{∗·kl; i}

tensor

The environment called by ?...?.