summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/fouridx/fouridx.pdfbin111567 -> 210844 bytes
-rw-r--r--Master/texmf-dist/source/latex/fouridx/fouridx.dtx90
-rw-r--r--Master/texmf-dist/source/latex/fouridx/fouridx.ins2
-rw-r--r--Master/texmf-dist/tex/latex/fouridx/fouridx.sty41
4 files changed, 110 insertions, 23 deletions
diff --git a/Master/texmf-dist/doc/latex/fouridx/fouridx.pdf b/Master/texmf-dist/doc/latex/fouridx/fouridx.pdf
index 2fa2f5709b5..f85978b294d 100644
--- a/Master/texmf-dist/doc/latex/fouridx/fouridx.pdf
+++ b/Master/texmf-dist/doc/latex/fouridx/fouridx.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/fouridx/fouridx.dtx b/Master/texmf-dist/source/latex/fouridx/fouridx.dtx
index b912b84d9d6..54ddce209fa 100644
--- a/Master/texmf-dist/source/latex/fouridx/fouridx.dtx
+++ b/Master/texmf-dist/source/latex/fouridx/fouridx.dtx
@@ -1,12 +1,12 @@
% \iffalse meta comment
-% File: fouridx.dtx Copyright (C) 2008 Stefan Karrmann
+% File: fouridx.dtx Copyright (C) 2008, 2013 Stefan Karrmann
% \fi
%
% \iffalse
%
%<*package>
-\def\fileversion{1.00}
-\def\filedate{2008/03/27}
+\def\fileversion{2.00}
+\def\filedate{2013/11/21}
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -40,7 +40,7 @@
\DoNotIndex{\ifnum,\fi,\expandafter}
\CodelineNumbered
\RecordChanges
-\CheckSum{39}
+\CheckSum{138}
\begin{document}
\DocInput{fouridx.dtx}
\end{document}
@@ -49,6 +49,9 @@
%
% \changes{1.00}{2008/03/27}{Used leftidx.dtx as a template for the
% English documentation}%
+% \changes{2.00}{2013/11/21}{Bug fixed when line break happens
+% directly at the fouridx command. Thanks to Tilman Schr\"oder.
+% Respect math styles and enables nested calls.}%
%
% \maketitle
% \begin{abstract}
@@ -63,7 +66,7 @@
% \tableofcontents
%
% \section*{Copyright}
-% Copyright 2007 Stefan Karrmann.
+% Copyright 2007, 2013 Stefan Karrmann.
%
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
@@ -145,7 +148,43 @@
% \begin{minipage}[c]{0.19\linewidth}
% $\fourIdx{(k)}{n}{x}{\overline x\vert}A$
% \end{minipage}
-%
+% \subsection{Old bugs/regression}{
+% \newcommand{\fourIdxOld}[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}%
+% }}
+% \def\exA{\fourIdxOld 12345}
+% \begin{tabular}[c]{llcc}
+% Error & version & old & actual \\
+% \hline
+% math style ignored & 1.00 & \(1_{\exA}\) & \(1_{\fourIdx12345}\) \\[1ex]
+% \hline
+% hang over at left after line breaks & 1.00 &\rule[-3ex]{0cm}{7ex}
+% \begin{minipage}{2cm}\noindent\strut\rule{1pt}{2ex}Start of
+% line\hfil\break\exA
+% \end{minipage}
+% &
+% \begin{minipage}{2cm}\noindent\rule{1pt}{2ex}Start of
+% line\hfil\break$\fourIdx12345$
+% \end{minipage} \\[1ex]
+% \hline
+% wrong positions if nested & 1.00 & \rule{0cm}{5ex}
+% $\vert\fourIdxOld{\fourIdxOld{1}{2}34{51}}{2}{3x}{4}{\fourIdxOld{1}{2}{3}{4}{52}}\vert$
+% &
+% $\vert\fourIdx{\fourIdx{1}{2}34{51}}{2}{3x}{4}{\fourIdx{1}{2}{3}{4}{52}}\vert$
+% \\[1ex]
+% \hline
+% \end{tabular}
+% }
+% \subsection{Comparison with sideset}
+% The command sideset from the amsmath package has similiar functionality.
+% It requires that the central box is a math operator an it typesets the
+% left super- and subscript left aligned while fourIdx uses right
+% alignment. Which suits better depends on the purpose.
% \section{Usage of the package}
%
% One command is provided by the package.
@@ -191,16 +230,41 @@
\ProvidesPackage{fouridx}[\filedate\space v\fileversion\space Four indices]
% \end{macrocode}
% \begin{macro}{\fourIdx}
+% \changes{2.00}{2013/11/21}{Bug fix at line breaks, nested calls, and math
+% styles}%
% \changes{1.00}{2008/03/27}{Implementation simplyfied}%
-% Command for left indices.
+% Command for left and right indices.
% \begin{macrocode}
\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
}}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/fouridx/fouridx.ins b/Master/texmf-dist/source/latex/fouridx/fouridx.ins
index 8e2a208d084..2e7022b44f2 100644
--- a/Master/texmf-dist/source/latex/fouridx/fouridx.ins
+++ b/Master/texmf-dist/source/latex/fouridx/fouridx.ins
@@ -3,7 +3,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
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
%%