diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/bropd')
-rw-r--r-- | Master/texmf-dist/tex/latex/bropd/bropd.sty | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bropd/bropd.sty b/Master/texmf-dist/tex/latex/bropd/bropd.sty new file mode 100644 index 00000000000..5f16b74b052 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bropd/bropd.sty @@ -0,0 +1,123 @@ +%% +%% This is file `bropd.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bropd.dtx +%% +%% Copyright 2012 by Benjamin Tatlock +%% +%% This work may be distributed and/or modified under the conditions of the +%% LaTeX Project Public License, either version 1.3 of this license or (at your +%% option) any later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX version +%% 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Benjamin Tatlock. +%% +%% This work consists of the file bropd.dtx and the derived files bropd.sty and +%% 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 +\newcounter{@bropd@c}\newcounter{@bropd@d} +\newcounter{@bropd@e}\newcounter{@bropd@f} +\DeclareOption{pdshort}{\@bropd@atrue} +\DeclareOption{sans}{\@bropd@strue}\ProcessOptions +\newcommand\@bropd@g[4]{\def\@bropd@h{#1} +\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} +{\@for\@bropd@i:=#3\do{ +\ifx\@bropd@i\@bropd@h +\stepcounter{@bropd@d} +\else +\@bropd@h +\ifnum\value{@bropd@d}>1 +^{\arabic{@bropd@d}} +\fi +#4\setcounter{@bropd@d}1 +\fi +\let\@bropd@h\@bropd@i} +\@bropd@h +\ifnum\value{@bropd@d}>1 +^{\arabic{@bropd@d}}\fi} +\else +\frac{#4^{#1}#2}{#4#3^{#1}} +\fi} +\newcommand\@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}} +\fi +\addtocounter{@bropd@e}{-1}}\sbox0{$#1$}} +\loop +\ifnum\value{@bropd@f}>2 +\addtocounter{@bropd@f}{-3} +\repeat +\ifnum\value{@bropd@f}>0 +\ifnum\value{@bropd@f}>1 +\def\@bropd@k{\left\lbrace#1\right\rbrace} +\else +\def\@bropd@k{\left[#1\right]} +\fi +\else +\def\@bropd@k{\left(#1\right)} +\fi} +\if@bropd@a +\let\@bropd@l\empty +\newcommand\br[1]{\let\@bropd@m\@bropd@l +\@bropd@j{\let\@bropd@l\empty#1\let\@bropd@l\@bropd@m} +\ifx\@bropd@l\empty +\def\@bropd@n{\@bropd@k} +\else +\let\@bropd@m\@bropd@l +\def\@bropd@n{\@bropd@k_{\@bropd@m}} +\fi +\let\@bropd@l\empty +\@bropd@n} +\newcommand\pd[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 +\if@bropd@b\@bropd@g{#1}{#2}{\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 +\ifnum\value{@bropd@c}<#1 +#3\stepcounter{@bropd@c} +\repeat +\fi} +\ifx\@bropd@o\empty +\let\@bropd@l\@bropd@p\else{#2}{_{\@bropd@p}}\fi\fi} +\else +\newcommand\pd[3][]{\@bropd@g{#1}{#2}{\noexpand#3}\partial} +\newcommand\br[1]{\@bropd@j{#1}\@bropd@k} +\fi +\if@bropd@s +\newcommand\@bropd@r{\mathsf{d}} +\else +\newcommand\@bropd@r{\mathrm{d}} +\fi +\newcommand\od[3][]{\def\@bropd@h{#1} +\frac{\@bropd@r\ifx\@bropd@h\empty\else^{#1}\fi#2} +{\@bropd@r#3\ifx\@bropd@h\empty\else^{#1}\fi}} +\endinput +%% +%% End of file `bropd.sty'. |