diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:52:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:52:10 +0000 |
commit | d3eb995dcf5d1eca7145a9948594114aff0c01f6 (patch) | |
tree | d8c1f3e885ffb5d0bfc3ecaae7244f7e6163866f /Master/texmf-dist/tex/latex/bezos | |
parent | 618290cc8302cc7c90bf5584387630fd78fb56b5 (diff) |
bezos
git-svn-id: svn://tug.org/texlive/trunk@706 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bezos')
-rw-r--r-- | Master/texmf-dist/tex/latex/bezos/accents.sty | 262 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bezos/checkend.sty | 56 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bezos/dotlessi.sty | 60 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bezos/esindex.sty | 123 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bezos/tensind.sty | 284 |
5 files changed, 785 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bezos/accents.sty b/Master/texmf-dist/tex/latex/bezos/accents.sty new file mode 100644 index 00000000000..6abb9da0bd4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bezos/accents.sty @@ -0,0 +1,262 @@ +% +--------------------------------------------------+ +% | Typeset accents.tex to get the documentation. | +% +--------------------------------------------------+ +% +% This file is copyrighted (c) 1998, 1999, 2000 by Javier Bezos. +% All Rights Reserved. +% +% 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. +% +% Release +% ~~~~~~~ +\ProvidesPackage{accents}[2000/08/06 v1.2 Math Accent Tools] + +\let\cc@palette\mathpalette + +\DeclareOption{nonscript} + {\renewcommand\cc@palette[2]{#1\textstyle{#2}}} + +\DeclareOption{single} + {\renewcommand\cc@accent[1]{\mathaccent#1}} + +\newdimen\cc@skew +\newdimen\cc@wd + +\newcount\cc@code +\newcount\cc@group +\newcount\cc@skewchar + +\newif\ifcc@more + +% Code for real accents +% ~~~~~~~~~~~~~~~~~~~~~ + +\def\cc@accent#1#2{% + \begingroup + \cc@code=#1\relax + \let\math@bgroup\@empty + \def\math@egroup##1{\cc@setchar##1}% + \cc@palette\cc@@accent{#2}% + \cc@nuc + \endgroup} + +\def\cc@iaccent#1#2{% + \cc@fetch{#2}% + \mathaccent#1{% + \ifcc@more#2\else + \cc@phant{#2}% + \gdef\cc@nuc{#2}% + \fi + \kern\cc@skew}% + \kern-\cc@skew}% + +\def\cc@@accent#1#2{% + \let\cc@style=#1% + \cc@fetch{#2}% + \mathaccent\cc@code{% + \ifcc@more#2\else + \cc@phant{#2}% + \gdef\cc@nuc{#2}% + \fi + \kern\cc@skew}% + \kern-\cc@skew + \kern\cc@wd}% + +% The accents are redefined: + +\begingroup + +\def\mathaccentV#1{\string"\noexpand\accentclass@}% +\let\protect\@empty +\let\mathaccent\@empty + +\def\cc@set#1{% + \xdef#1{\noexpand\protect\noexpand\cc@accent{#1}}} + +\cc@set\grave %{\protect\cc@accent{"7012\relax}} +\cc@set\acute %{\protect\cc@accent{"7013\relax}} +\cc@set\check %{\protect\cc@accent{"7014\relax}} +\cc@set\breve %{\protect\cc@accent{"7015\relax}} +\cc@set\bar %{\protect\cc@accent{"7016\relax}} +\cc@set\hat %{\protect\cc@accent{"705E\relax}} +\cc@set\dot %{\protect\cc@accent{"705F\relax}} +\cc@set\tilde %{\protect\cc@accent{"707E\relax}} +\cc@set\ddot %{\protect\cc@accent{"707F\relax}} +\cc@set\vec %{\protect\cc@accent{"017E\relax}} +\gdef\ring{\protect\cc@accent{"7017\relax}} + +\@ifundefined{mathring}{}{\cc@set\mathring} + +\endgroup + +% Faked accents +% ~~~~~~~~~~~~~ + +\newcommand\accentset[2]{% + \begingroup + \def\cc@a{#1}% + \let\math@bgroup\@empty + \def\math@egroup##1{\cc@setchar##1}% + \cc@palette\cc@accentset{#2}% + \cc@nuc + \endgroup} + +\def\cc@accentset#1#2{% + \let\cc@style#1% + \cc@fetch{#2}% + \sbox\z@{$\m@th\cc@style\mathgroup\cc@group + \ifcc@more#2\else\cc@phant{#2}% + \gdef\cc@nuc{#2}\fi$}% + \cc@align{% + \hidewidth\kern\cc@skew + $\m@th\scriptscriptstyle\mathgroup\cc@group\cc@a$% + \hidewidth\cr{\box\z@}}% + \kern\cc@wd}% + +\def\cc@iaccentset#1#2{% + \cc@fetch{#2}% + \sbox\z@{$\m@th\cc@style\ifcc@more#2\else\cc@phant{#2}% + \gdef\cc@nuc{#2}\fi$}% + \cc@align{% + \hidewidth\kern\cc@skew + $\m@th\scriptscriptstyle#1$\hidewidth\cr + {\box\z@}}}% + +\def\cc@align#1{% + \vbox{% + \baselineskip\z@skip + \lineskip.25ex + \ialign{##\crcr#1\crcr}}} + +% Shared by real and faked accents +% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +\def\cc@phant#1{% + \v@true\h@true + \finph@nt}% with \box0 from \cc@fetch + +\def\cc@setchar{% + \cc@skewchar\ifnum\mathgroup=\m@ne + \skewchar\textfont\@ne + \else\ifnum\skewchar\textfont\mathgroup=\m@ne + \skewchar\textfont\@ne + \else\skewchar\textfont\mathgroup\fi\fi + \advance\cc@skewchar"7100 } + +\def\cc@fetch#1{% + \cc@group=\the\mathgroup + \let\cc@accent\@gobble + \let\accentset\@gobble + \sbox\z@{$\m@th\mathgroup\cc@group\cc@setchar + \cc@style#1{}\mathchar\cc@skewchar$}% + \sbox\@ne{$\m@th\mathgroup\cc@group\cc@setchar + \cc@style#1\mathchar\cc@skewchar$}% + \cc@morefalse + \def\cc@accent##1{\global\cc@moretrue}% + \def\accentset##1{\global\cc@moretrue}% + \global\cc@skew2\wd\@ne + \global\advance\cc@skew-2\wd\z@ + \sbox\z@{$\m@th\mathgroup\cc@group\cc@style#1$}% + \global\cc@wd-\wd\z@ + \let\cc@accent\cc@iaccent + \let\accentset\cc@iaccentset} + +% Two useful faked accents +% ~~~~~~~~~~~~~~~~~~~~~~~~ + +\def\dddot{\accentset{{\cc@style.\mkern-1.7mu\textstyle.\mkern-1.7mu.}}} +\def\ddddot{\accentset{{\cc@style.\mkern-2.1mu.\mkern-2.1mu.\mkern-2.1mu.}}} + +% Underaccents +% ~~~~~~~~~~~~ + +\newcommand\underaccent[2]{% + \begingroup + \def\cc@a{#2}% Stores the nucleous... + \cc@palette\cc@underaccent{#1}% ...and the accent is passed + #2% + \endgroup}% + +\def\cc@underaccent#1#2{% + \let\cc@style#1% + \expandafter\in@\expandafter\cc@accent\expandafter{#2}% + \ifin@ + \expandafter\cc@uaccent#2\@@% + \else + \cc@uaccentset{#2}% + \fi} + +\def\cc@uaccent#1#2#3\@@{% #1 and #2 gobbles \protect\cc@accent + \cc@under{% + \vbox to.2ex{% + \hbox{% + $\m@th + \cc@style + \mathgroup\cc@group + \cc@shift + \mathchar#3$}% + \vss}}} + +\def\cc@uaccentset#1{% + \cc@under{% + \hbox{% + $\m@th + \cc@style + \mathgroup\cc@group + \cc@shift + \scriptscriptstyle#1$}}} + +\def\cc@under#1{% + \cc@group\the\mathgroup + \sbox\z@{$\m@th\cc@style\mathgroup\cc@group\cc@a$}% + \sbox\tw@{$\scriptspace\z@\m@th\cc@style\mathgroup\cc@group\cc@a_{}$}% + \rlap{% + \oalign{% + \vrule \@depth\dp\z@ \@width\z@ + \kern\wd\tw@ + \crcr + \hidewidth#1\hidewidth}}} + +\def\cc@shift{% + \dimen@=-.000008ex + \multiply\dimen@\ifnum\mathgroup=\m@ne + \fontdimen\@ne\textfont\@ne + \else + \fontdimen\@ne\textfont\cc@group\fi + \kern\dimen@} + +% And \undertilde +% ~~~~~~~~~~~~~~~ + +\newcommand\undertilde{\cc@palette\cc@undertilde} + +\def\cc@undertilde#1#2{% + \cc@group\the\mathgroup + \sbox\z@{$\m@th\mathgroup\cc@group#1#2$}% + \oalign{% + $\m@th\mathgroup\cc@group#1#2$% + \crcr + \hidewidth + \vbox to.5ex{% + \hbox{% + $\hss + #1% + \mathgroup\cc@group + \widetilde{\hbox to\wd\z@{\hss}}% + \hss$}% + \vss}% + \hidewidth}} + +% The following command is used by \DeclareMathAccent +% and it's the only part requiring modification + +\def\set@mathaccent#1#2#3#4{% + \xdef#2{\noexpand\protect\noexpand\cc@accent + {"\mathchar@type#3\hexnumber@#1#4\relax}}} + +\ProcessOptions + +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/bezos/checkend.sty b/Master/texmf-dist/tex/latex/bezos/checkend.sty new file mode 100644 index 00000000000..49f1ec54975 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bezos/checkend.sty @@ -0,0 +1,56 @@ +% +--------------------------------------------------+ +% | Documentation in clear text follows | +% +--------------------------------------------------+ +% +% (c) 2002 Javier Bezos. All Rights Reserved. +% +% This file 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. +% +% Please, send your comments and suggestions to <jbezos@wanadoo.es>. +% +% Usage +% ~~~~~ +% When an environment is left open, LaTeX gives an error at the +% end of the document. However it only informs about the first +% of them, while the rest are shown with meaningless errors: +% +% (\end occurred inside a group at level N) +% +% This package replaces them with more useful messages +% which show which environments (in reverse order) were +% not closed. +% +% That's all. There are no user macros. Just use the package. +% +% Code +% ~~~~ + +\def\fileversion{1.0} +\def\filedate{2002/04/20} + +\ProvidesPackage{checkend}[2002/04/20 v1.0 Environment checking] + +\def\chkend@checkend{% + \def\@tempa{document}% + \ifx\@currenvir\@tempa + \else + \count@\errorcontextlines + \errorcontextlines\z@ + \PackageError{checkend}{% + \@currenvir \@currenvline \space open at + \string\end{document}}% + {The package has detected an open environment at the + end\MessageBreak + of the document}% + \errorcontextlines\count@ + \csname end\@currenvir\endcsname + \endgroup + \chkend@checkend + \fi} + +\AtEndDocument{\chkend@checkend} + +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/bezos/dotlessi.sty b/Master/texmf-dist/tex/latex/bezos/dotlessi.sty new file mode 100644 index 00000000000..f1492bd0c77 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bezos/dotlessi.sty @@ -0,0 +1,60 @@ +% +--------------------------------------------------+ +% | Documentation in clear text follows | +% +--------------------------------------------------+ +% +% (c) 1999 Javier Bezos. All Rights Reserved. +% +% This file 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. +% +% Please, send your comments and suggestions to <jbezos@arrakis.es>. +% +% Usage +% ~~~~~ +% This package defines two commands: \dotlessi and \dotlessj, which give +% you access to dotless i's and j's in math mode. They are intended for +% symbols in non English languages. +% +% If the default math font is used, they are equivalent to \imath and +% \jmath; if a different font is used (like \mathrm, \mathbf, \mathsf) +% these commands look in the corresponding font tables to find their +% codes. In text mode, they expand to \i and \j. For example: +% +% $f_{\mathrm{m\acute{\dotlessj}n}}$ +% +% Code +% ~~~~ + +\def\fileversion{1.0} +\def\filedate{1999/10/12} + +\ProvidesPackage{dotlessi}[1999/10/12 v1.0 Dotless i/j for Math] + +\expandafter\def\expandafter\@uclclist\expandafter + {\@uclclist\dotlessi\i\dotlessj\j} + +\def\dotl@make#1#2{% + \ifmmode + {\ifnum\mathgroup=\m@ne + #2% + \else + \count@\escapechar \escapechar=\m@ne + \expandafter\expandafter\expandafter + \split@name\expandafter\string\the\textfont\mathgroup\@nil + \escapechar=\count@ + \@ifundefined{\f@encoding\string#1}% + {\edef\f@encoding{\string?}}{}% + \expandafter\count@\the\csname\f@encoding\string#1\endcsname + \advance\count@"7000 + \mathchar\count@ + \fi}% + \else + #1% + \fi} + +\DeclareRobustCommand\dotlessi{\dotl@make\i\imath} +\DeclareRobustCommand\dotlessj{\dotl@make\j\jmath} + +\endinput diff --git a/Master/texmf-dist/tex/latex/bezos/esindex.sty b/Master/texmf-dist/tex/latex/bezos/esindex.sty new file mode 100644 index 00000000000..5fefcf2c184 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bezos/esindex.sty @@ -0,0 +1,123 @@ +% This file is copyrighted (c) 1998-2004 by Javier Bezos. +% All Rights Reserved. +% +% 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. + +\ProvidesPackage{esindex}[2004/07/19 v1.1 Spanish indexes] + +\def\esx@level{`\!} +\def\esx@actual{`\@} +\def\esx@encap{`\|} +\def\esx@quote{`\"} + +\def\esx@error{\PackageError{esindex}{Unknown index parameter}% + {Options in this package have the form^^J% + parameter=value, where parameter stands for^^J% + one of the following MakeIndex ones:^^J% + encap, level, actual, quote}} + +\def\esx@process#1=#2\esx@process{% + \@ifundefined{esx@#1}{\esx@error}{% + \expandafter\edef\csname esx@#1\endcsname + {\string`\expandafter\noexpand\csname\string#2\endcsname}}} + +\DeclareOption*{% + \@expandtwoargs\in@{=}{\CurrentOption}% + \ifin@ + \expandafter\esx@process\CurrentOption\esx@process + \else + \esx@error + \fi} + +\ProcessOptions + +\begingroup + +\catcode`\|=\catcode\esx@encap \lccode`\|=\esx@encap\relax +\catcode`\!=\catcode\esx@level \lccode`\!=\esx@level\relax +\catcode`\&=\catcode\esx@actual \lccode`\&=\esx@actual\relax +\catcode`\*=13 \lccode`\*=\esx@quote\relax + +\catcode`\'=13 +\catcode`\"=13 +\catcode`\~=13 + +\gdef\esindex#1#{\esx@index{#1}} + +\lowercase{ +\gdef\esx@index#1#2{% + \let\esx@g\@empty + \esx@bar@idx#2|\@@ + \expandafter\esx@@index\esx@b!\@@ + \protected@edef\esx@g{\noexpand\index#1{\esx@g\esx@a}}% + \esx@g} +} + +\lowercase{ +\gdef\esx@bar@idx#1|#2\@@{% + \def\esx@b{#1}\def\esx@a{#2}% + \ifx\esx@a\@empty\else\esx@bar@eat#2\fi} +} + +\lowercase{ +\gdef\esx@bar@eat#1|{\def\esx@a{|#1}} +} + +\lowercase{ +\gdef\esx@@index#1!#2\@@{% + \begingroup + \def\@tabacckludge##1{\csname\string##1\endcsname}% + \def\'##1{\@ifundefined{esx@index@q@\string##1}% + {##1}% + {\csname esx@index@q@\string##1\endcsname}}% + \ifnum\catcode`\'=\active + \let'\'% + \fi + \def\~##1{\string##1\string^^ff}% + \ifnum\catcode`\~=\active + \let~\~% + \fi + \def\"##1{\@ifundefined{esx@index@qq@\string##1}% + {\string"##1}% + {\csname esx@index@qq@\string##1\endcsname}}% + \ifnum\catcode`\"=\active + \let"\"% + \fi + \protected@xdef\esx@g{\esx@g#1\string &}% + \endgroup + \begingroup + \def*##1{% <- its lower case is the quote char (") + \ifcat##1a% + \@ifundefined{spanish@sh@\string*\string##1@}% + {\string*##1}% + {\string*\string*##1}% + \else + \string*\string##1% + \fi}% + \def\esx@b{#2}% + \ifx\esx@b\@empty + \protected@xdef\esx@g{\esx@g#1}% + \else + \protected@xdef\esx@g{\esx@g#1!}% + \esx@@index#2\@@ + \fi + \endgroup} +} +\endgroup + +\def\esx@index@q@n{n\string^^ff} +\def\esx@index@q@N{N\string^^ff} + +\def\esx@index@qq@o{.o} +\def\esx@index@qq@O{.O} +\def\esx@index@qq@a{.a} +\def\esx@index@qq@A{.A} +\def\esx@index@qq@u{u} +\def\esx@index@qq@A{U} +\def\esx@index@qq@c{c} +\def\esx@index@qq@C{C} + +\endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/bezos/tensind.sty b/Master/texmf-dist/tex/latex/bezos/tensind.sty new file mode 100644 index 00000000000..2c9cc1bbc8e --- /dev/null +++ b/Master/texmf-dist/tex/latex/bezos/tensind.sty @@ -0,0 +1,284 @@ +% +--------------------------------------------------+ +% | Typeset titlesec.tex to get the documentation. | +% +--------------------------------------------------+ +% +% This file is copyrighted (c) 1998 by Javier Bezos. +% All Rights Reserved. +% +% 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. +% +% Release +% ~~~~~~~ + +\ProvidesPackage{tensind}[1998/05/01 v1.0 Tensorial Indexes] + +\@tempcnta=\the\catcode`^ +\@tempcntb=\the\catcode`_ +\catcode`^=7\catcode`_=8 + +\newdimen\tsi@dimen + +\newif\iftsi@sp +\newif\iftsi@sb + +\newif\iftsi@e +\newif\iftsi@b +\newif\iftsi@l +\newif\iftsi@r +\newif\iftsi@o +\newif\iftsi@c +\newif\iftsi@s +\newif\iftsi@nodot + +\def\tsi@thedots{} +\def\tsi@theprimes{} +\def\tsi@thesb{} +\def\tsi@thesp{} +\def\tsi@lastloc{x} +\def\tsi@lastindex{}% +\def\tsi@addindex{\tsi@addpr} + +\let\tsi@bl\relax +\let\tsi@br\relax +\let\tsi@bm\relax +\let\tsi@tl\relax +\let\tsi@tr\relax +\let\tsi@tm\relax + +\let\tsi@choice\mathchoice + +\newif\iftsi@top +\newif\iftsi@bot + +\let\tsi@gap\relax + +\def\tensorformat#1{\tsi@lfalse\tsi@rfalse\tsi@efalse + \tsi@bfalse\tsi@ofalse\tsi@cfalse\tsi@sfalse + \@tfor\tsi@a:=#1\do{\csname tsi@\tsi@a true\endcsname}} + +\tensorformat{} +\def\indexdot{\cdot} + +\def\tsi@appendto#1#2{\protected@edef#2{#2#1}} + +\def\tensor{\catcode`_=8\catcode`^=7 % + \def\tsi@end{\end}\tsi@ifnextchar[{\tsi@otensor}{\tsi@xtensor}} + +\begingroup + +\catcode`?=13 +\gdef\tensordelimiter#1{\mathcode`#1="8000{\catcode`?=13\lccode`?=`#1 + \lowercase{% + \gdef?{\begingroup\catcode`_=8 \catcode`^=7 % + \def\tsi@end{#1}\def?{\endtensor\endgroup}% + \@ifnextchar[{\tsi@otensor}{\tsi@xtensor}}}}} + +\endgroup + +\def\tsi@otensor[#1]{\tensorformat{#1}\tsi@xtensor} + +\gdef\tsi@xtensor#1{% + \def\tsi@nucl{#1}% + \futurelet\nxt\tsi@process} + +\def\tsi@process#1{% + \def\next{\futurelet\nxt\tsi@process}% + \def\tsi@theindex{#1}\def\tsi@a{_}% + \ifx\tsi@theindex\tsi@a + \if\tsi@lastloc x\let\tsi@first\@empty\fi + \if\tsi@lastloc b\else\tsi@switchsb\fi + \else + \def\tsi@a{^}% + \ifx\tsi@theindex\tsi@a + \if\tsi@lastloc p\else\tsi@switchsp\fi + \else + \ifx\tsi@theindex\tsi@end + \let\next\tsi@end + \else + \tsi@nodotfalse + \ifx\nxt\bgroup + \def\tsi@lastindex{}% + \else + \csname tsi@cmd\string#1\endcsname + \def\tsi@lastindex{#1}% + \fi + \tsi@addindex + \fi + \fi + \fi + \next} + +\def\tsi@switchsp{% + \let\tsi@addindex\tsi@addsp + \iftsi@top + \def\tsi@gap{\tsi@tm}% + \else + \def\tsi@gap{\tsi@tl}% + \fi + \tsi@appendto{\tsi@thedots}\tsi@thesp + \let\tsi@gap\relax + \def\tsi@thedots{}} + +\def\tsi@switchsb{% + \let\tsi@addindex\tsi@addsb + \iftsi@bot + \def\tsi@gap{\tsi@bm}% + \else + \def\tsi@gap{\tsi@bl}% + \fi + \tsi@appendto{\tsi@thedots}\tsi@thesb + \let\tsi@gap\relax + \def\tsi@thedots{}} + +\def\tsi@addpr{% + \tsi@appendto{\tsi@theindex}\tsi@theprimes} + +\def\tsi@addsp{% + \tsi@toptrue + \tsi@appendto{\tsi@theindex}\tsi@thesp + \iftsi@nodot + \tsi@appendto{\protect\tsi@phantom{\tsi@theindex}}\tsi@thedots + \else + \tsi@appendto{\tsi@gap{\tsi@theindex}}\tsi@thedots + \fi + \def\tsi@lastloc{p}} + +\def\tsi@addsb{% + \tsi@bottrue + \tsi@appendto{\tsi@theindex}\tsi@thesb + \iftsi@nodot + \tsi@appendto{\protect\tsi@phantom{\tsi@theindex}}\tsi@thedots + \else + \tsi@appendto{\tsi@gap{\tsi@theindex}}\tsi@thedots + \fi + \def\tsi@lastloc{b}} + +\def\tsi@dot#1{% + \setbox\z@\hbox{$\tsi@fam\m@th\tsi@index#1$}% + \hbox to\wd\z@{\hss$\tsi@fam\m@th\tsi@index\indexdot$\hss}} + +\newdimen\primes + +\def\endtensor{% + \if\tsi@lastloc p + \def\tsi@gap{\tsi@br}% + \tsi@appendto{\tsi@thedots}\tsi@thesb + \else + \def\tsi@gap{\tsi@tr}% + \tsi@appendto{\tsi@thedots}\tsi@thesp + \fi + \let\tsi@bl\tsi@phantom \let\tsi@br\tsi@phantom + \let\tsi@bm\tsi@phantom \let\tsi@tm\tsi@phantom + \def\tsi@tl##1{\tsi@phantom{##1}\global\advance\tsi@dimen\wd\z@}% + \iftsi@top + \let\tsi@tr\tsi@phantom + \else + \let\tsi@tr\tsi@tl + \fi + \iftsi@bot + \iftsi@l\let\tsi@bl\tsi@dot\let\tsi@bm\tsi@dot\fi + \iftsi@r\let\tsi@br\tsi@dot\let\tsi@bm\tsi@dot\fi + \else + \iftsi@e\let\tsi@br\tsi@dot\tsi@bottrue\fi + \fi + \iftsi@b\else + \iftsi@top + \iftsi@l\let\tsi@tl\tsi@dot\let\tsi@tm\tsi@dot\fi + \iftsi@r\let\tsi@tr\tsi@dot\let\tsi@tm\tsi@dot\fi + \else + \iftsi@e\let\tsi@tr\tsi@dot\tsi@toptrue\fi + \fi + \fi + \ifx\tsi@theprimes\@empty\else\tsi@toptrue\fi + \edef\tsi@fam{\fam\the\fam}% + \tsi@choice + {\tsi@endtensor\displaystyle\scriptstyle}% + {\tsi@endtensor\textstyle\scriptstyle}% + {\tsi@endtensor\scriptstyle\scriptscriptstyle}% + {\tsi@endtensor\scriptscriptstyle\scriptscriptstyle}} + + +\def\tsi@endtensor#1#2{% + \let\tsi@text#1\let\tsi@index#2% + \setbox\z@ \hbox{$\tsi@fam\m@th#1\tsi@nucl_{x}$}% + \setbox\@ne\hbox{$\tsi@fam\m@th#1\tsi@nucl{}_{x}$}% + \tsi@dimen\wd\z@ \advance\tsi@dimen-\wd\@ne + \@tempdimb-\tsi@dimen + \setbox\z@ \hbox{$\kern\tsi@dimen\tsi@fam\m@th#2\tsi@thesp$}% + \setbox\@ne\hbox{$\tsi@fam\m@th#2\tsi@thesb$}% + \setbox\tw@\hbox{$\tsi@fam\m@th#2{\tsi@theprimes}$}% + \dp\z@\z@ + \ifdim\tsi@dimen>\wd\tw@ + \tsi@dimen\z@ + \else + \advance\tsi@dimen-\wd\tw@ + \fi + \wd\tw@\z@ + \iftsi@s + \ifx\tsi@text\displaystyle + \tsi@otrue\tsi@cfalse + \else + \tsi@ofalse\tsi@ctrue + \fi + \fi + \let\tsi@a\@empty + \tsi@nucl + \iftsi@bot_{\kern-\tsi@dimen\copy\@ne}% + \iftsi@o\tsi@toptrue\else\iftsi@c\tsi@toptrue + \ifx\tsi@text\displaystyle\else + \def\tsi@a{\raise.1ex}% + \fi + \kern-\wd\@ne\kern\tsi@dimen + \kern\@tempdimb\kern-\scriptspace + \fi\fi + \fi + \iftsi@top^{\tsi@a\box\tw@\kern-\tsi@dimen\tsi@a\box\z@}\fi} + +\def\tsi@phantom#1{% + \setbox\tw@\null + \setbox\z@\hbox{$\tsi@fam\m@th\tsi@index#1$}% + \wd\tw@\wd\z@ + \box\tw@}% + +\def\whenindex#1#2#3{% + \expandafter\def\csname tsi@cmd\expandafter\string#1\endcsname{% + \def\tsi@theindex{#2}#3}} + +\whenindex{'}{\prime}{} + +\def\spadjust#1#2{% + \def\tsi@a{#1}% + \ifx\tsi@a\tsi@lastindex + \iftsi@l\else + \iftsi@r\else + \ifx\tsi@addindex\tsi@addsp + \if\tsi@lastloc b% + \protected@edef\tsi@theindex{\mskip#2\thinmuskip\tsi@theindex}% + \fi + \fi + \fi + \fi + \fi} + +\def\sbadjust#1#2{% + \def\tsi@a{#1}% + \ifx\tsi@a\tsi@lastindex + \iftsi@l\else + \iftsi@r\else + \ifx\tsi@addindex\tsi@addsb + \if\tsi@lastloc p% + \protected@edef\tsi@theindex{\mskip#2\thinmuskip\tsi@theindex}% + \fi + \fi + \fi + \fi + \fi} + + +\def\omitdot{\tsi@nodottrue} +\def\finishdots{\tsi@nodottrue\let\tsi@nodotfalse\relax} + +\catcode`^=\@tempcnta\catcode`_=\@tempcntb |