summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-11-22 23:06:07 +0000
committerKarl Berry <karl@freefriends.org>2013-11-22 23:06:07 +0000
commit413dfb22f91764cea55e05185c26ac518e63ec56 (patch)
treea7f0c96bf6981db626f405b5c84402a14a9be78d /Master/texmf-dist/tex/latex
parent83470ceeb76cf871b770463e5b2a7c4b2d0b2ac3 (diff)
fouridx (22nov13)
git-svn-id: svn://tug.org/texlive/trunk@32214 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/fouridx/fouridx.sty41
1 files changed, 32 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/fouridx/fouridx.sty b/Master/texmf-dist/tex/latex/fouridx/fouridx.sty
index be3bfc77994..3bb06a55071 100644
--- a/Master/texmf-dist/tex/latex/fouridx/fouridx.sty
+++ b/Master/texmf-dist/tex/latex/fouridx/fouridx.sty
@@ -8,7 +8,7 @@
%%
%% fouridx package
%%
-%% Copyright 2008 Stefan Karrmann
+%% Copyright 2008, 2013 Stefan Karrmann
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
@@ -17,17 +17,40 @@
%%
%% S.Karrmann at web.de
%%
-\def\fileversion{1.00}
-\def\filedate{2008/03/27}
+\def\fileversion{2.00}
+\def\filedate{2013/11/21}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{fouridx}[\filedate\space v\fileversion\space Four indices]
\newcommand{\fourIdx}[5]{%
- \setbox1=\hbox{\ensuremath{^{#1}}}%
- \setbox2=\hbox{\ensuremath{_{#2}}}%
- \setbox5=\hbox{\ensuremath{#5}}%
- \hspace{\ifnum\wd1>\wd2\wd1\else\wd2\fi}%
- \ensuremath{\copy5^{\hspace{-\wd1}\hspace{-\wd5}#1\hspace{\wd5}#3}%
- _{\hspace{-\wd2}\hspace{-\wd5}#2\hspace{\wd5}#4}%
+ \ensuremath{\mathchoice%
+ {{\setbox1=\hbox{$\scriptstyle{#1}$}%
+ \setbox2=\hbox{$\scriptstyle{#2}$}%
+ \setbox5=\hbox{$\displaystyle{#5}$}%
+ \hspace*{\ifnum\wd1>\wd2\wd1\else\wd2\fi}%
+ \copy5^{\scriptstyle\hspace{-\wd1}\hspace{-\wd5}#1\hspace{\wd5}#3}%
+ _{\scriptstyle\hspace{-\wd2}\hspace{-\wd5}#2\hspace{\wd5}#4}%
+ }}% display
+ {{\setbox1=\hbox{$\scriptstyle{#1}$}%
+ \setbox2=\hbox{$\scriptstyle{#2}$}%
+ \setbox5=\hbox{$\textstyle{#5}$}%
+ \hspace*{\ifnum\wd1>\wd2\wd1\else\wd2\fi}%
+ \copy5^{\scriptstyle\hspace{-\wd1}\hspace{-\wd5}#1\hspace{\wd5}#3}%
+ _{\scriptstyle\hspace{-\wd2}\hspace{-\wd5}#2\hspace{\wd5}#4}%
+ }}% text
+ {{\setbox1=\hbox{$\scriptscriptstyle{#1}$}%
+ \setbox2=\hbox{$\scriptscriptstyle{#2}$}%
+ \setbox5=\hbox{$\scriptstyle{#5}$}%
+ \hspace*{\ifnum\wd1>\wd2\wd1\else\wd2\fi}%
+ \copy5^{\scriptscriptstyle\hspace{-\wd1}\hspace{-\wd5}#1\hspace{\wd5}#3}%
+ _{\scriptscriptstyle\hspace{-\wd2}\hspace{-\wd5}#2\hspace{\wd5}#4}%
+ }}% script
+ {{\setbox1=\hbox{$\scriptscriptstyle{#1}$}%
+ \setbox2=\hbox{$\scriptscriptstyle{#2}$}%
+ \setbox5=\hbox{$\scriptscriptstyle{#5}$}%
+ \hspace*{\ifnum\wd1>\wd2\wd1\else\wd2\fi}%
+ \copy5^{\scriptscriptstyle\hspace{-\wd1}\hspace{-\wd5}#1\hspace{\wd5}#3}%
+ _{\scriptscriptstyle\hspace{-\wd2}\hspace{-\wd5}#2\hspace{\wd5}#4}%
+ }}% scriptscript
}}
\endinput
%%