From 8c35ac8f04be9e931fcae14c5f283e875ffaebda Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 30 Jun 2008 16:18:19 +0000 Subject: esdiff update (30jun08) git-svn-id: svn://tug.org/texlive/trunk@9113 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/esdiff/esdiff.sty | 177 +++++++++++++------------- 1 file changed, 92 insertions(+), 85 deletions(-) (limited to 'Master/texmf-dist/tex/latex/esdiff') diff --git a/Master/texmf-dist/tex/latex/esdiff/esdiff.sty b/Master/texmf-dist/tex/latex/esdiff/esdiff.sty index ef8eec0a729..1d647b413e5 100644 --- a/Master/texmf-dist/tex/latex/esdiff/esdiff.sty +++ b/Master/texmf-dist/tex/latex/esdiff/esdiff.sty @@ -19,127 +19,134 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{esdiff} -\newcommand{\taille}[1]{\displaystyle{#1}} -\newcommand{\difint}{\mkern 0mu} -\newcommand{\derpint}{\mkern 0mu} -\newcommand{\croisint}{\mkern 0mu} -\newcommand{\dop}{\mathrm{d}} -\DeclareOption{display}{\renewcommand{\taille}[1]{\displaystyle{#1}}} -\DeclareOption{text}{\renewcommand{\taille}[1]{\textstyle{#1}}} -\DeclareOption{roman}{\renewcommand{\dop}{\ensuremath{\mathrm{d}}}} -\DeclareOption{italic}{\renewcommand{\dop}{\ensuremath{d}}} -\DeclareOption{thin}{\renewcommand{\difint}{\ensuremath{\,}}} -\DeclareOption{med}{\renewcommand{\difint}{\ensuremath{\;}}} -\DeclareOption{big}{\renewcommand{\difint}{\ensuremath{\:}}} -\DeclareOption{thinp}{\renewcommand{\derpint}{\ensuremath{\,}}} -\DeclareOption{medp}{\renewcommand{\derpint}{\ensuremath{\;}}} -\DeclareOption{bigp}{\renewcommand{\derpint}{\ensuremath{\:}}} -\DeclareOption{thinc}{\renewcommand{\croisint}{\ensuremath{\,}}} -\DeclareOption{medc}{\renewcommand{\croisint}{\ensuremath{\;}}} -\DeclareOption{bigc}{\renewcommand{\croisint}{\ensuremath{\:}}} +\newcommand*{\ES@taille}[1]{\displaystyle{#1}} +\newcommand*{\ES@difint}{\mkern 0mu} +\newcommand*{\ES@derpint}{\mkern 0mu} +\newcommand*{\ES@croisint}{\mkern 0mu} +\newcommand*{\ES@dop}{\mathrm{d}} +\DeclareOption{display}{\renewcommand*{\ES@taille}[1]{\displaystyle{#1}}} +\DeclareOption{text}{\renewcommand*{\ES@taille}[1]{\textstyle{#1}}} +\DeclareOption{roman}{\renewcommand*{\ES@dop}{\ensuremath{\mathrm{d}}}} +\DeclareOption{italic}{\renewcommand*{\ES@dop}{\ensuremath{d}}} +\DeclareOption{thin}{\renewcommand*{\ES@difint}{\ensuremath{\,}}} +\DeclareOption{med}{\renewcommand*{\ES@difint}{\ensuremath{\;}}} +\DeclareOption{big}{\renewcommand*{\ES@difint}{\ensuremath{\:}}} +\DeclareOption{thinp}{\renewcommand*{\ES@derpint}{\ensuremath{\,}}} +\DeclareOption{medp}{\renewcommand*{\ES@derpint}{\ensuremath{\;}}} +\DeclareOption{bigp}{\renewcommand*{\ES@derpint}{\ensuremath{\:}}} +\DeclareOption{thinc}{\renewcommand*{\ES@croisint}{\ensuremath{\,}}} +\DeclareOption{medc}{\renewcommand*{\ES@croisint}{\ensuremath{\;}}} +\DeclareOption{bigc}{\renewcommand*{\ES@croisint}{\ensuremath{\:}}} \ProcessOptions\relax -\def\diff{\@ifstar{\diffstar}{\diffnostar}} -\def\diffstar{\@ifnextchar[{\@diffstar}{\@@diffstar}} -\def\@diffstar[#1]#2#3#4{\mathchoice{\left(\frac{\dop^{#1}\difint#2}% -{\dop\difint#3^{#1}}\right)_{\mkern-7mu#4}}% -{\taille{\left(\frac{\dop^{#1}\difint#2}% -{\dop\difint#3^{#1}}\right)_{\mkern-7mu#4}}}% -{\scriptstyle{\left(\frac{\dop^{#1}\difint#2}% -{\dop\difint#3^{#1}}\right)_{\mkern-7mu#4}}}% -{\scriptstyle{\left(\frac{\dop^{#1}\difint#2}% -{\dop\difint#3^{#1}}\right)_{\mkern-7mu#4}}}} -\def\@@diffstar#1#2#3{\mathchoice{\left(\frac{\dop\difint#1}% -{\dop\difint#2}\right)_{\mkern-7mu#3}}% -{\taille{\left(\frac{\dop\difint#1}{\dop\difint#2}% +\newcommand*{\diff}{} +\def\diff{\@ifstar{\ES@diffstar}{\ES@diffnostar}} +\def\ES@diffstar{\@ifnextchar[{\ES@diffstar@i}{\ES@diffstar@ii}} +\def\ES@diffstar@i[#1]#2#3#4{% +\mathchoice{% +\left(\frac{\ES@dop^{#1}\ES@difint#2}% +{\ES@dop\ES@difint#3^{#1}}\right)_{\mkern-7mu#4}}% +{\ES@taille{\left(\frac{\ES@dop^{#1}\ES@difint#2}% +{\ES@dop\ES@difint#3^{#1}}\right)_{\mkern-7mu#4}}}% +{\scriptstyle{\left(\frac{\ES@dop^{#1}\ES@difint#2}% +{\ES@dop\ES@difint#3^{#1}}\right)_{\mkern-7mu#4}}}% +{\scriptstyle{\left(\frac{\ES@dop^{#1}\ES@difint#2}% +{\ES@dop\ES@difint#3^{#1}}\right)_{\mkern-7mu#4}}}} +\def\ES@diffstar@ii#1#2#3{% +\mathchoice{\left(\frac{\ES@dop\ES@difint#1}% +{\ES@dop\ES@difint#2}\right)_{\mkern-7mu#3}}% +{\ES@taille{\left(\frac{\ES@dop\ES@difint#1}{\ES@dop\ES@difint#2}% \right)_{\mkern-7mu#3}}}{\scriptstyle{\left(% -\frac{\dop\difint#1}{\dop\difint#2}\right)% +\frac{\ES@dop\ES@difint#1}{\ES@dop\ES@difint#2}\right)% _{\mkern-7mu#3}}}% -{\scriptstyle{\left(\frac{\dop\difint#1}{\dop\difint#2}\right)% +{\scriptstyle{\left(\frac{\ES@dop\ES@difint#1}{\ES@dop\ES@difint#2}\right)% _{\mkern-7mu#3}}}} -\def\diffnostar{\@ifnextchar[{\@diffnostar}{\@@diffnostar}} -\def\@diffnostar[#1]#2#3{\mathchoice{\frac{\dop^{#1}\difint#2}% -{\dop\difint#3^{#1}}}% -{\taille{\frac{\dop^{#1}\difint#2}{\dop\difint#3^{#1}}}}% -{\scriptstyle{\frac{\dop^{#1}\difint#2}{\dop\difint#3^{#1}}}}% -{\scriptstyle{\frac{\dop^{#1}\difint#2}{\dop\difint#3^{#1}}}}} -\def\@@diffnostar#1#2{\mathchoice% -{\frac{\dop\difint#1}{\dop\difint#2}}% -{\taille{\frac{\dop\difint#1}{\dop\difint#2}}}% -{\scriptstyle{\frac{\dop\difint#1}{\dop\difint#2}}}% -{\scriptstyle{\frac{\dop\difint#1}{\dop\difint#2}}}} -\def\diffp{\@ifstar{\diffpstar}{\diffpnostar}} -\def\diffpstar{\@ifnextchar[{\@diffpstar}{\@@diffpstar}} -\def\@diffpstar[#1]#2#3#4{\mathchoice{\left(\frac{\partial^{#1}% -\derpint#2}{\partial\derpint#3^{#1}}\right)_{\mkern-7mu#4}}% -{\taille{\left(\frac{\partial^{#1}\derpint#2}{\partial\derpint#3^{#1}}% +\def\ES@diffnostar{\@ifnextchar[{\ES@diffnostar@i}{\ES@diffnostar@ii}} +\def\ES@diffnostar@i[#1]#2#3{\mathchoice{\frac{\ES@dop^{#1}\ES@difint#2}% +{\ES@dop\ES@difint#3^{#1}}}% +{\ES@taille{\frac{\ES@dop^{#1}\ES@difint#2}{\ES@dop\ES@difint#3^{#1}}}}% +{\scriptstyle{\frac{\ES@dop^{#1}\ES@difint#2}{\ES@dop\ES@difint#3^{#1}}}}% +{\scriptstyle{\frac{\ES@dop^{#1}\ES@difint#2}{\ES@dop\ES@difint#3^{#1}}}}} +\def\ES@diffnostar@ii#1#2{\mathchoice% +{\frac{\ES@dop\ES@difint#1}{\ES@dop\ES@difint#2}}% +{\ES@taille{\frac{\ES@dop\ES@difint#1}{\ES@dop\ES@difint#2}}}% +{\scriptstyle{\frac{\ES@dop\ES@difint#1}{\ES@dop\ES@difint#2}}}% +{\scriptstyle{\frac{\ES@dop\ES@difint#1}{\ES@dop\ES@difint#2}}}} +\newcommand*{\diffp}{} +\def\diffp{\@ifstar{\ES@diffpstar}{\ES@diffpnostar}} +\def\ES@diffpstar{\@ifnextchar[{\ES@diffpstar@i}{\ES@diffpstar@ii}} +\def\ES@diffpstar@i[#1]#2#3#4{% +\mathchoice{\left(\frac{\partial^{#1}% +\ES@derpint#2}{\partial\ER@derpint#3^{#1}}\right)_{\mkern-7mu#4}}% +{\ES@taille{\left(\frac{\partial^{#1}\ES@derpint#2}{\partial\ES@derpint#3^{#1}}% \right)_{\mkern-7mu#4}}}% -{\scriptstyle{\left(\frac{\partial^{#1}\derpint#2}% -{\partial\derpint#3^{#1}}% +{\scriptstyle{\left(\frac{\partial^{#1}\ES@derpint#2}% +{\partial\ES@derpint#3^{#1}}% \right)_{\mkern-7mu#4}}}% -{\scriptstyle{\left(\frac{\partial^{#1}\derpint#2}% -{\partial\derpint#3^{#1}}% +{\scriptstyle{\left(\frac{\partial^{#1}\ES@derpint#2}% +{\partial\ES@derpint#3^{#1}}% \right)_{\mkern-7mu#4}}}} -\def\@@diffpstar#1#2#3{\mathchoice{\left({\begingroup +\def\ES@diffpstar@ii#1#2#3{\mathchoice{\left({\begingroup \toks0={}\count0=0 - \degree #2\degree - \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\derpint#1}% + \ES@degree #2\ES@degree + \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\ES@derpint#1}% {\the\toks0}% \endgroup}\right)_{\mkern-7mu#3}}% - {\taille{\left({\begingroup + {\ES@taille{\left({\begingroup \toks0={}\count0=0 - \degree #2\degree - \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\derpint#1}% + \ES@degree #2\ES@degree + \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\ES@derpint#1}% {\the\toks0}% \endgroup}\right)_{\mkern-7mu#3}}}% {\scriptstyle{\left({\begingroup \toks0={}\count0=0 - \degree #2\degree - \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\derpint#1}% + \ES@degree #2\ES@degree + \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\ES@derpint#1}% {\the\toks0}% \endgroup}\right)_{\mkern-7mu#3}}}% {\scriptstyle{\left({\begingroup \toks0={}\count0=0 - \degree #2\degree - \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\derpint#1}% + \ES@degree #2\ES@degree + \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\ES@derpint#1}% {\the\toks0}% \endgroup}\right)_{\mkern-7mu#3}}}} -\def\diffpnostar{\@ifnextchar[{\@diffpnostar}{\@@diffpnostar}} -\def\@diffpnostar[#1]#2#3{\mathchoice{\frac{\partial^{#1}\derpint#2}% -{\partial\derpint#3^{#1}}}% -{\taille{\frac{\partial^{#1}\derpint#2}{\partial\derpint#3^{#1}}}}% -{\scriptstyle{\frac{\partial^{#1}\derpint#2}{\partial\derpint#3^{#1}}}}% -{\scriptstyle{\frac{\partial^{#1}\derpint#2}{\partial\derpint#3^{#1}}}}} -\def\@@diffpnostar#1#2{\mathchoice{\begingroup +\def\ES@diffpnostar{\@ifnextchar[{\ES@diffpnostar@i}{\ES@diffpnostar@ii}} +\def\ES@diffpnostar@i[#1]#2#3{% +\mathchoice{\frac{\partial^{#1}\ES@derpint#2}% +{\partial\ES@derpint#3^{#1}}}% +{\ES@taille{\frac{\partial^{#1}\ES@derpint#2}{\partial\ES@derpint#3^{#1}}}}% +{\scriptstyle{\frac{\partial^{#1}\ES@derpint#2}{\partial\ES@derpint#3^{#1}}}}% +{\scriptstyle{\frac{\partial^{#1}\ES@derpint#2}{\partial\ES@derpint#3^{#1}}}}} +\def\ES@diffpnostar@ii#1#2{\mathchoice{\begingroup \toks0={}\count0=0 - \degree #2\degree - \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\derpint#1}% + \ES@degree #2\ES@degree + \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\ES@derpint#1}% {\the\toks0}% \endgroup}% - {\taille{\begingroup + {\ES@taille{\begingroup \toks0={}\count0=0 - \degree #2\degree - \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\derpint#1}% + \ES@degree #2\ES@degree + \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\ES@derpint#1}% {\the\toks0}% \endgroup}}% {\scriptstyle{\begingroup \toks0={}\count0=0 - \degree #2\degree - \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\derpint#1}% + \ES@degree #2\ES@degree + \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\ES@derpint#1}% {\the\toks0}% \endgroup}}% {\scriptstyle{\begingroup \toks0={}\count0=0 - \degree #2\degree - \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\derpint#1}% + \ES@degree #2\ES@degree + \frac{\partial\ifnum\count0>1^{\the\count0 }\fi\ES@derpint#1}% {\the\toks0}% \endgroup}}} -\def\degree #1{\ifx #1\degree \expandafter\stopd - \else \expandafter\addd \fi #1^1$#1\addd} -\def\stopd #1\addd{} -\def\addd #1^#2#3$#4\addd{\advance\count0 #2 +\def\ES@degree #1{\ifx #1\ES@degree \expandafter\ES@stopd + \else \expandafter\ES@addd \fi #1^1$#1\ES@addd} +\def\ES@stopd #1\ES@addd{} +\def\ES@addd #1^#2#3$#4\ES@addd{\advance\count0 #2 \toks0=\expandafter{\the\toks0% - {\partial\derpint #4}% - \croisint}\degree} + {\partial\ES@derpint #4}% + \ES@croisint}\ES@degree} \endinput %% %% End of file `esdiff.sty'. -- cgit v1.2.3