diff options
author | Karl Berry <karl@freefriends.org> | 2012-11-10 00:47:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-11-10 00:47:21 +0000 |
commit | 66d38b59401f47f68453dae0772d40329da9704e (patch) | |
tree | 062fd0453e9b05b68b2a8dd0bd9631dd7b3f882d /Master/texmf-dist/tex/latex/bropd | |
parent | 723027aa71581306fc669ced6dd3f027f3be8bb4 (diff) |
bropd (9nov12)
git-svn-id: svn://tug.org/texlive/trunk@28222 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bropd')
-rw-r--r-- | Master/texmf-dist/tex/latex/bropd/bropd.sty | 67 |
1 files changed, 53 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/bropd/bropd.sty b/Master/texmf-dist/tex/latex/bropd/bropd.sty index 5f16b74b052..30495203af6 100644 --- a/Master/texmf-dist/tex/latex/bropd/bropd.sty +++ b/Master/texmf-dist/tex/latex/bropd/bropd.sty @@ -23,19 +23,22 @@ %% bropd.pdf. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bropd} -[2012/11/04 1.0 automated typing of brackets and differential operators] -\newif\if@bropd@a\newif\if@bropd@b\newif\if@bropd@s +[2012/11/08 1.1 automated typing of brackets and differential operators] +\newif\if@bropd@a\newif\if@bropd@b\newif\if@bropd@s\newif\if@bropd@u \newcounter{@bropd@c}\newcounter{@bropd@d} \newcounter{@bropd@e}\newcounter{@bropd@f} -\DeclareOption{pdshort}{\@bropd@atrue} +\DeclareOption{pdshort}{\@bropd@atrue\@bropd@ufalse} +\DeclareOption{pdalt}{\@bropd@atrue\@bropd@utrue} \DeclareOption{sans}{\@bropd@strue}\ProcessOptions -\newcommand\@bropd@g[4]{\def\@bropd@h{#1} +\def\@bropd@t{!} +\def\@bropd@g#1#2#3#4{\def\@bropd@h{#1} +\ifx\@bropd@o\@bropd@t\let\@bropd@o\empty\fi \ifx\@bropd@h\empty \setcounter{@bropd@c}0\setcounter{@bropd@d}1 \let\@bropd@h\empty \@for\@bropd@i:=#3\do{\stepcounter{@bropd@c}} \frac{#4\ifnum\value{@bropd@c}>1 -^{\arabic{@bropd@c}}\fi#2} +^{\arabic{@bropd@c}}\fi\@bropd@o} {\@for\@bropd@i:=#3\do{ \ifx\@bropd@i\@bropd@h \stepcounter{@bropd@d} @@ -51,9 +54,9 @@ \ifnum\value{@bropd@d}>1 ^{\arabic{@bropd@d}}\fi} \else -\frac{#4^{#1}#2}{#4#3^{#1}} +\frac{#4^{#1}\@bropd@o}{#4\noexpand#3^{#1}} \fi} -\newcommand\@bropd@j[1]{\setcounter{@bropd@f}0 +\def\@bropd@j#1{\setcounter{@bropd@f}0 {\renewcommand{\br}[1]{\stepcounter{@bropd@e}{##1} \ifnum\value{@bropd@e}>\value{@bropd@f} \setcounter{@bropd@f}{\value{@bropd@e}} @@ -84,7 +87,8 @@ \fi \let\@bropd@l\empty \@bropd@n} -\newcommand\pd[3][]{\def\@bropd@h{#1} +\if@bropd@u +\def\@bropd@q#1#2#3{\def\@bropd@h{#1} \ifx\@bropd@h\empty \@bropd@bfalse \else @@ -94,9 +98,36 @@ \@bropd@btrue \fi \fi -\if@bropd@b\@bropd@g{#1}{#2}{\noexpand#3}\partial +\ifx\@bropd@o\@bropd@t +\@bropd@btrue\let\@bropd@o\empty +\fi +\if@bropd@b\@bropd@g{#1}\@bropd@o{\noexpand#3}\partial +\else +\partial_{\ifx\@bropd@h\empty +\@for\@bropd@i:=#3\do\@bropd@i\else\setcounter{@bropd@c}0 +\loop +\ifnum\value{@bropd@c}<#1 +#3\stepcounter{@bropd@c} +\repeat +\fi} +\@bropd@o +\fi} +\else +\def\@bropd@q#1#2#3{\def\@bropd@h{#1} +\ifx\@bropd@h\empty +\@bropd@bfalse +\else +\if!\ifnum9<1#1!\else_\fi +\@bropd@bfalse +\else +\@bropd@btrue +\fi +\fi +\ifx\@bropd@o\@bropd@t +\@bropd@btrue\let\@bropd@o\empty +\fi +\if@bropd@b\@bropd@g{#1}\@bropd@o{\noexpand#3}\partial \else -\def\@bropd@o{#2} \def\@bropd@p{\ifx\@bropd@h\empty \@for\@bropd@i:=#3\do\@bropd@i\else\setcounter{@bropd@c}0 \loop @@ -105,15 +136,23 @@ \repeat \fi} \ifx\@bropd@o\empty -\let\@bropd@l\@bropd@p\else{#2}{_{\@bropd@p}}\fi\fi} +\let\@bropd@l\@bropd@p\else{\@bropd@o}{_{\@bropd@p}}\fi\fi} +\fi \else -\newcommand\pd[3][]{\@bropd@g{#1}{#2}{\noexpand#3}\partial} +\def\@bropd@q#1#2#3{\@bropd@g{#1}{#2}{\noexpand#3}\partial} \newcommand\br[1]{\@bropd@j{#1}\@bropd@k} \fi +\newcommand\pd[3][]{\def\@bropd@o{#2} +\ifx\@bropd@o\empty +\let\@bropd@v\br +\else +\let\@bropd@v\empty +\fi +\@bropd@q{#1}{#2}{#3}\@bropd@v} \if@bropd@s -\newcommand\@bropd@r{\mathsf{d}} +\def\@bropd@r{\mathsf d} \else -\newcommand\@bropd@r{\mathrm{d}} +\def\@bropd@r{\mathrm d} \fi \newcommand\od[3][]{\def\@bropd@h{#1} \frac{\@bropd@r\ifx\@bropd@h\empty\else^{#1}\fi#2} |