The leftidx package^{∗}

Harald Harders

                   h.harders@tu-bs.de

File Date 2003/09/24, Printed October 22, 2004

Abstract

This package enables left subscripts and superscripts in math mode. These subscripts and superscripts are automatically raised for better fitting to the symbol they belong to.

Contents

1 Introduction 1

2 Usage of the package 2

3 The implementation 2

Copyright

Copyright 2000, 2001, 2003 Harald Harders.

This program can be redistributed and/or modified under the terms of the LaTeX Project Public License Distributed from CTAN archives in directory macros/latex/base/lppl.txt; either version 1 of the License, or any later version.

1 Introduction

In mathematical equations, it is sometimes necessary to use indices (subscript or superscript) that are positioned at the left side of a symbol. In tensor mathematics, for instance, some notations use a transponed sign at the left side of the symbol:

t (A_{ij}) = (A_{ji})

For symbols with a normal character height, this can be reached by simply put the indices without an own symbol:

${_1^2}a_3^4$                                               2 1a_{3}^{4}

Is the symbol larger, this leads to unsatisfactory results:

∗This file has version 1.03 last revised 2003/09/24.

$\{_1^2\}\left(\frac\{1\}\{b\}\right)_3^4$                        2 1 (\frac{1}{b})_{3}^{4}

A better output can be reached by using the package leftidx.sty:

$\leftidx\{_1^2\}\{\left(\frac\{1\}\{b\}\right)\}\{_3^4\}$            _{1}^{2} (\frac{1}{b})_{3}^{4}

2 Usage of the package

Two commands are provided by the package.

\leftidx The \leftidx command has the syntax \leftidx{⟨left indices⟩}{⟨symbol⟩}{⟨right indices⟩}. This command typesets the symbol ⟨symbol⟩ with indices on the left and on the right side. Example:

$\leftidx\{_1^2\}\{\left(\frac\{1\}\{b\}\right)\}\{_3^4\}$            _{1}^{2} (\frac{1}{b})_{3}^{4}

You may omit left or right indices by using empty arguments.

The next example shows the same in the different mathematical styles:

_{1}^{2} (\frac{1}{b})_{3}^{4} _{1}^{2} (\frac{1}{b})_{3}^{4} _{1}^{2}(\frac{1}{b})_{3}^{4}  _{1}^{2}(\frac{1}{b})_{3}^{4}

As you can see from the left indices, the horizontal spacing of the left indices is not perfect. You have to adjust them by yourself.

\ltrans The \ltrans{⟨symbol⟩} command typesets a small upright “t” as transponed sign on the left side of ⟨symbol⟩. Example:

$\ltrans{\underline{\underline{J}}}=
\underline{\underline{J}}^{-1}$

t\underline{\underline{J}} = \underline{\underline{J}}^{−1}

3 The implementation

Heading of the package:

 1 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
 2 \ProvidesPackage{leftidx}[\filedate\space v\fileversion\space Left indices]

\leftidx Command for left indices. The braces around the \vphantom are necessary to really raise the left indices.

 3 \newcommand\leftidx[3]{%
 4 {\vphantom{#2}}#1#2#3%
 5 }

\ltrans Left positioned transponed sign.

 6 \newcommand{\ltrans}[1]{\leftidx{^\mathrm{t}}{\!#1}{}}

Change History

1.03

General: Reimplementation with dtx format with English docu-

mentation . . . . . . . . . . . . . . . . 1 \leftidx: Implementation simply-

fied . . . . . . . . . . . . . . . . . . . . 2

Index

Numbers written in italic refer to the page where the corresponding entry is described; numbers underlined refer to the code line of the definition; numbers in roman refer to the code lines where the entry is used.

Symbols

\! . . . . . . . . . . . . . . . 6

F

\filedate . . . . . . . . . 2

\fileversion . . . . . . . 2

L

\leftidx . . . . . . . 2, \underline{3}, 6

\ltrans . . . . . . . . . 2, \underline{6}

M

\mathrm . . . . . . . . . . . 6

N

                                                   \NeedsTeXFormat . . . . 1

P

                                                   \ProvidesPackage . . . 2

V \vphantom . . . . . . . . . 4