\def\filename{leftidx.sty}
\def\fileversion{1.02}
\def\filedate{08 Oct 1999 08:50:00 MEST}
%%           
% Copyright  1999 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.
%
% eMail: h.harders@tu-bs.de
%                   
% Defines the commands \leftidx and \ltrans.
%
% \leftidx{#1}{#2}{#3}:
%
%   #1 = left sub- and superscript part
%   #2 = main part
%   #3 = right sub- and superscript part
%  
%  e.g.
%  
%  \leftidx{_a^b}{c}{_d^e}
%
% output:
%
% b e
%  c
% a d
%  
%  Don't forget the enclosing braces round the indices!!
%  
%%
% \ltrans{#1}
%
%   #1 = main part
%
% Adds the superscript symbol t to the main part
% e.g.
%
% \ltrans{a}
%
% output:
%
%  t
%   a
%
%
\typeout{\filename\space v\fileversion, Harald Harders, \filedate}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%
\ProvidesPackage{leftidx}
\ProcessOptions
%
\newlength{\unten}
\newlength{\gesamt}
%
\newcommand{\dhoehe}[1]{%
\protect\settoheight{\gesamt}{\(\displaystyle#1\)}%
\protect\settodepth{\unten}{\(\displaystyle#1\)}%
\protect\addtolength{\gesamt}{\unten}}
\newcommand{\thoehe}[1]{%
\protect\settoheight{\gesamt}{\(\textstyle #1\)}%
\protect\settodepth{\unten}{\(\textstyle #1\)}%
\protect\addtolength{\gesamt}{\unten}}
\newcommand{\shoehe}[1]{%
\protect\settoheight{\gesamt}{\(\scriptstyle #1\)}%
\protect\settodepth{\unten}{\(\scriptstyle #1\)}%
\protect\addtolength{\gesamt}{\unten}}
\newcommand{\sshoehe}[1]{%
\protect\settoheight{\gesamt}{\(\scriptscriptstyle #1\)}%
\protect\settodepth{\unten}{\(\scriptscriptstyle #1\)}%
\protect\addtolength{\gesamt}{\unten}}
%
%\newcommand{\idxmark}[1]{%
%\protect\mathchoice{\protect\dhoehe{#1}\rule[-\unten]{0mm}{\gesamt}}%
%{\protect\thoehe{#1}\rule[-\unten]{0mm}{\gesamt}}%
%{\protect\shoehe{#1}\rule[-\unten]{0mm}{\gesamt}}%
%{\protect\sshoehe{#1}\rule[-\unten]{0mm}{\gesamt}}}
%
\newcommand{\leftidx}[3]{%
\mathchoice%
{\dhoehe{#2}\rule[-\unten]{0mm}{\gesamt}#1#2#3}%
{\thoehe{#2}\rule[-\unten]{0mm}{\gesamt}#1#2#3}%
{\shoehe{#2}\rule[-\unten]{0mm}{\gesamt}#1#2#3}%
{\sshoehe{#2}\rule[-\unten]{0mm}{\gesamt}#1#2#3}}
%
\newcommand{\ltrans}[1]{\leftidx{^\mathrm{t}}{\!#1}{}}

