diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-27 21:24:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-27 21:24:50 +0000 |
commit | bd17efe2677dfdcad708f3bc4e6e2de1200428e0 (patch) | |
tree | 02d6f90ffe29faec5b1d6cab201d211c15bdcaa5 /Master/texmf-dist/tex/latex/mandi | |
parent | ddff32c23f0ead73721da09dbec94a35abac62bc (diff) |
mandi (27mar18)
git-svn-id: svn://tug.org/texlive/trunk@47150 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mandi')
-rw-r--r-- | Master/texmf-dist/tex/latex/mandi/mandi.sty | 148 |
1 files changed, 75 insertions, 73 deletions
diff --git a/Master/texmf-dist/tex/latex/mandi/mandi.sty b/Master/texmf-dist/tex/latex/mandi/mandi.sty index 2aa2008ba60..0338670e13c 100644 --- a/Master/texmf-dist/tex/latex/mandi/mandi.sty +++ b/Master/texmf-dist/tex/latex/mandi/mandi.sty @@ -28,7 +28,7 @@ %% vdemo.py. %% --------------------------------------------------------------------------- %% -%%\ProvidesPackage{mandi}[2018/01/15 2.7.1 Macros for physics and astronomy] +%%\ProvidesPackage{mandi}[2018/03/20 2.7.2 Macros for physics and astronomy] \NeedsTeXFormat{LaTeX2e}[1999/12/01] \RequirePackage{amsmath} @@ -104,13 +104,15 @@ \newboolean{@optsinglemagbars} \newboolean{@optbaseunits} \newboolean{@optdrvdunits} +\newboolean{@optaltnunits} \newboolean{@optapproxconsts} \newboolean{@optuseradians} \setboolean{@optromanvectors}{false} % this is where you set the default option \setboolean{@optboldvectors}{false} % this is where you set the default option \setboolean{@optsinglemagbars}{false} % this is where you set the default option \setboolean{@optbaseunits}{false} % this is where you set the default option -\setboolean{@optdrvdunits}{false} % this is where you set the default option +\setboolean{@optdrvdunits}{true} % this is where you set the default option +\setboolean{@optaltnunits}{false} % this is where you set the default option \setboolean{@optapproxconsts}{false} % this is where you set the default option \setboolean{@optuseradians}{false} % this is where you set the default option \DeclareOption{romanvectors}{\setboolean{@optromanvectors}{true}} @@ -122,9 +124,9 @@ \DeclareOption{useradians}{\setboolean{@optuseradians}{true}} \ProcessOptions\relax \newcommand*{\mandiversion}{\ifmmode% - 2.7.1\mbox{ dated }2018/01/15% + 2.7.2\mbox{ dated }2018/03/20% \else% - 2.7.1 dated 2018/01/15% + 2.7.2 dated 2018/03/20% \fi }% \typeout{ } @@ -208,20 +210,20 @@ \expandafter\@firstoftwo\expandafter{\iffalse}\fi0 #3}{0 #2}}}% \newcommand*\selectbaseunit[3]{#1} \newcommand*\selectdrvdunit[3]{#2} -\newcommand*\selecttradunit[3]{#3} +\newcommand*\selectaltnunit[3]{#3} \newcommand*\selectunit{} \newcommand*\perpusebaseunit{\let\selectunit=\selectbaseunit} \newcommand*\perpusedrvdunit{\let\selectunit=\selectdrvdunit} -\newcommand*\perpusetradunit{\let\selectunit=\selecttradunit} +\newcommand*\perpusealtnunit{\let\selectunit=\selectaltnunit} \newcommand*\hereusebaseunit[1]{% \begingroup\perpusebaseunit#1\endgroup}% \newcommand*\hereusedrvdunit[1]{% \begingroup\perpusedrvdunit#1\endgroup}% -\newcommand*\hereusetradunit[1]{% - \begingroup\perpusetradunit#1\endgroup}% +\newcommand*\hereusealtnunit[1]{% + \begingroup\perpusealtnunit#1\endgroup}% \newenvironment{usebaseunit}{\perpusebaseunit}{}% \newenvironment{usedrvdunit}{\perpusedrvdunit}{}% -\newenvironment{usetradunit}{\perpusetradunit}{}% +\newenvironment{usealtnunit}{\perpusealtnunit}{}% \newcommand*\newphysicsquantity{\definephysicsquantity{\newcommand}} \newcommand*\redefinephysicsquantity{\definephysicsquantity{\renewcommand}} \newcommandx*\definephysicsquantity[5][4=,5=]{% @@ -238,11 +240,11 @@ \mi@name#4{#5}#7{\unit{#8}{\selectunit{#3}{#1}{#2}}}% \mi@name#4{#5baseunit}#7{\unit{#8}{#3}}% \mi@name#4{#5drvdunit}#7{\unit{#8}{#1}}% - \mi@name#4{#5tradunit}#7{\unit{#8}{#2}}% + \mi@name#4{#5altnunit}#7{\unit{#8}{#2}}% \mi@name#4{#5onlyunit}{\selectunit{#3}{#1}{#2}}% \mi@name#4{#5onlybaseunit}{\ensuremath{#3}}% \mi@name#4{#5onlydrvdunit}{\ensuremath{#1}}% - \mi@name#4{#5onlytradunit}{\ensuremath{#2}}% + \mi@name#4{#5onlyaltnunit}{\ensuremath{#2}}% \mi@name#4{#5value}#7{\ensuremath{#8}}% \mi@forkifnull{#7}{% \ifx#4\renewcommand\mi@name\let{#5mathsymbol}=\relax\fi @@ -261,8 +263,8 @@ {\ifthenelse{\boolean{@optdrvdunits}} {\perpusedrvdunit % \typeout{mandi: You'll get derived units.}} - {\perpusetradunit % - \typeout{mandi: You'll get traditional units.}}} + {\perpusealtnunit % + \typeout{mandi: You'll get alternate units.}}} \ifthenelse{\boolean{@optapproxconsts}} {\typeout{mandi: You'll get approximate constants.}} {\typeout{mandi: You'll get precise constants.}} @@ -322,7 +324,7 @@ \newcommand*{\insolarD}[1]{\unit{#1}{\Dsolar}} \newcommand*{\insolard}[1]{\unit{#1}{\dsolar}} \newcommand*{\velocityc}[1]{\ensuremath{#1c}} -\newcommand*{\lorentz}[1]{\ensuremath{#1}} +\newcommand*{\lorentzfactor}[1]{\ensuremath{#1}} \newcommand*{\speed}{\velocity} \newphysicsquantity{displacement}% {\m}% @@ -434,16 +436,16 @@ [] \newphysicsquantity{work}% {\m\squared\usk\kg\usk\s\reciprocalsquared}% - [\N\usk\m]% - [\J] + [\J]% + [\N\usk\m] \newphysicsquantity{energy}% {\m\squared\usk\kg\usk\s\reciprocalsquared}% - [\N\usk\m]% - [\J] + [\J]% + [\N\usk\m] \newphysicsquantity{power}% {\m\squared\usk\kg\usk\s\reciprocalcubed}% - [\J\per\s]% - [\W] + [\W]% + [\J\per\s] \newphysicsquantity{specificheatcapacity}% {\J\per\K\usk\kg}% [\J\per\K\usk\kg]% @@ -458,18 +460,18 @@ [\rad\per\s\squared] \newphysicsquantity{momentofinertia}% {\m\squared\usk\kg}% - [\m\usk\kg\squared]% + [\m\squared\usk\kg]% [\J\usk\s\squared] \ifthenelse{\boolean{@optuseradians}} {% \newphysicsquantity{angularmomentum}% {\m\squared\usk\kg\usk\reciprocal\s\usk\reciprocal\rad}% - [\N\usk\m\usk\s\per\rad]% - [\m\squared\usk\kg\usk\reciprocal\s\usk\reciprocal\rad] + [\kg\usk\m\squared\per(\s\usk\rad)]% + [\N\usk\m\usk\s\per\rad] \newphysicsquantity{angularimpulse}% {\m\squared\usk\kg\usk\reciprocal\s\usk\reciprocal\rad}% - [\N\usk\m\usk\s\per\rad]% - [\J\usk\s\per\rad] + [\J\usk\s\per\rad]% + [\N\usk\m\usk\s\per\rad] \newphysicsquantity{torque}% {\m\squared\usk\kg\usk\s\reciprocalsquared\usk\reciprocal\rad}% [\N\usk\m\per\rad]% @@ -478,12 +480,12 @@ {% \newphysicsquantity{angularmomentum}% {\m\squared\usk\kg\usk\reciprocal\s}% - [\N\usk\m\usk\s]% - [\m\squared\usk\kg\usk\reciprocal\s] + [\kg\usk\m\squared\per\s]% + [\N\usk\m\usk\s] \newphysicsquantity{angularimpulse}% {\m\squared\usk\kg\usk\reciprocal\s}% - [\N\usk\m\usk\s]% - [\J\usk\s] + [\J\usk\s]% + [\N\usk\m\usk\s] \newphysicsquantity{torque}% {\m\squared\usk\kg\usk\s\reciprocalsquared}% [\N\usk\m]% @@ -515,36 +517,36 @@ [\C] \newphysicsquantity{permittivity}% {\m\reciprocalcubed\usk\reciprocal\kg\usk\s\reciprocalquarted\usk\A\squared}% - [\F\per\m]% - [\C\squared\per\N\usk\m\squared] + [\C\squared\per\N\usk\m\squared]% + [\F\per\m] \newphysicsquantity{permeability}% {\m\usk\kg\usk\s\reciprocalsquared\usk\A\reciprocalsquared}% - [\henry\per\m]% - [\T\usk\m\per\A] + [\T\usk\m\per\A]% + [\henry\per\m] \newphysicsquantity{electricfield}% {\m\usk\kg\usk\s\reciprocalcubed\usk\reciprocal\A}% - [\V\per\m]% - [\N\per\C] + [\N\per\C]% + [\V\per\m] \newphysicsquantity{electricdipolemoment}% {\m\usk\s\usk\A}% [\C\usk\m]% [\C\usk\m] \newphysicsquantity{electricflux}% {\m\cubed\usk\kg\usk\s\reciprocalcubed\usk\reciprocal\A}% - [\V\usk\m]% - [\N\usk\m\squared\per\C] + [\N\usk\m\squared\per\C]% + [\V\usk\m] \newphysicsquantity{magneticfield}% {\kg\usk\s\reciprocalsquared\usk\reciprocal\A}% [\T]% [\N\per\C\usk(\m\per\s)] % also \Wb\per\m\squared \newphysicsquantity{magneticflux}% {\m\squared\usk\kg\usk\s\reciprocalsquared\usk\reciprocal\A}% - [\volt\usk\s]% - [\T\usk\m\squared] % also \Wb and \J\per\A + [\T\usk\m\squared]% + [\volt\usk\s] % also \Wb and \J\per\A \newphysicsquantity{cmagneticfield}% {\m\usk\kg\usk\s\reciprocalcubed\usk\reciprocal\A}% - [\V\per\m]% - [\N\per\C] + [\N\per\C]% + [\V\per\m] \newphysicsquantity{linearchargedensity}% {\reciprocal\m\usk\s\usk\A}% [\C\per\m]% @@ -571,12 +573,12 @@ [\C\usk\m\per(\N\per\C)] \newphysicsquantity{electricpotential}% {\square\m\usk\kg\usk\reciprocalcubic\s\usk\reciprocal\A}% - [\J\per\C]% - [\V] + [\V]% + [\J\per\C] \newphysicsquantity{emf}% {\square\m\usk\kg\usk\reciprocalcubic\s\usk\reciprocal\A}% - [\J\per\C]% - [\V] + [\V]% + [\J\per\C] \newphysicsquantity{dielectricconstant}% {}% []% @@ -611,16 +613,16 @@ [\ensuremath{\mathrm{e}}\per\s] \newphysicsquantity{conventionalcurrent}% {\A}% - [\C\per\s]% - [\A] + [\A]% + [\C\per\s] \newphysicsquantity{magneticdipolemoment}% {\square\m\usk\A}% - [\J\per\T]% - [\A\usk\square\m] + [\A\usk\square\m]% + [\J\per\T] \newphysicsquantity{currentdensity}% {\reciprocalsquare\m\usk\A}% - [\C\usk\s\per\square\m]% - [\A\per\square\m] + [\A\per\square\m]% + [\C\usk\s\per\square\m] \newphysicsquantity{capacitance}% {\reciprocalsquare\m\usk\reciprocal\kg\usk\quartic\s\usk\square\A}% [\F]% @@ -631,16 +633,16 @@ [\volt\usk\s\per\A] % also \square\m\usk\kg\per\C\squared, \Wb\per\A \newphysicsquantity{conductivity}% {\reciprocalcubic\m\usk\reciprocal\kg\usk\cubic\s\usk\square\A}% - [\siemens\per\m]% - [(\A\per\square\m)\per(\V\per\m)] + [(\A\per\square\m)\per(\V\per\m)]% + [\siemens\per\m] \newphysicsquantity{resistivity}% {\cubic\m\usk\kg\usk\reciprocalcubic\s\usk\reciprocalsquare\A}% [\ohm\usk\m]% [(\V\per\m)\per(\A\per\square\m)] \newphysicsquantity{resistance}% {\square\m\usk\kg\usk\reciprocalcubic\s\usk\reciprocalsquare\A}% - [\V\per\A]% - [\ohm] + [\ohm]% + [\V\per\A] \newphysicsquantity{conductance}% {\reciprocalsquare\m\usk\reciprocal\kg\usk\cubic\s\usk\square\A}% [\A\per\V]% @@ -1184,37 +1186,37 @@ {\ensuremath{\frac{1}{\phantom{_o}4\pi\epsilon_0}}}% {\mi@p{9}{8.9875517873681764}\timestento{9}}% {\m\cubed\usk\kg\usk\reciprocalquartic\s\usk\A\reciprocalsquared}% - [\m\per\farad]% - [\newton\usk\m\squared\per\coulomb\squared] + [\newton\usk\m\squared\per\coulomb\squared]% + [\m\per\farad] \newphysicsconstant{oofpezcs}% {\ensuremath{\frac{1}{\phantom{_o}4\pi\epsilon_0 c^2\phantom{_o}}}}% {\tento{-7}}% {\m\usk\kg\usk\s\reciprocalsquared\usk\A\reciprocalsquared}% - [\T\usk\m\squared]% - [\N\usk\s\squared\per\C\squared] + [\N\usk\s\squared\per\C\squared]% + [\T\usk\m\squared] \newphysicsconstant{vacuumpermittivity}% {\ensuremath{\epsilon_0}}% {\mi@p{9.0}{8.854187817}\timestento{-12}}% {\m\reciprocalcubed\usk\reciprocal\kg\usk\s\quarted\usk\A\squared}% - [\F\per\m]% - [\C\squared\per\N\usk\m\squared] + [\C\squared\per\N\usk\m\squared]% + [\F\per\m] \newphysicsconstant{mzofp}% {\ensuremath{\frac{\phantom{_oo}\mu_0\phantom{_o}}{4\pi}}}% {\tento{-7}}% {\m\usk\kg\usk\s\reciprocalsquared\usk\A\reciprocalsquared}% - [\henry\per\m]% - [\tesla\usk\m\per\A] + [\tesla\usk\m\per\A]% + [\henry\per\m] \newphysicsconstant{vacuumpermeability}% {\ensuremath{\mu_0}}% {4\pi\timestento{-7}}% {\m\usk\kg\usk\s\reciprocalsquared\usk\A\reciprocalsquared}% - [\henry\per\m]% - [\T\usk\m\per\A] + [\T\usk\m\per\A]% + [\henry\per\m] \newphysicsconstant{boltzmann}% {\ensuremath{k_B}}% {\mi@p{1.4}{1.38064852}\timestento{-23}}% {\m\squared\usk\kg\usk\reciprocalsquare\s\usk\reciprocal\K}% - [\joule\per\K]% + [\J\per\K]% [\J\per\K] \newphysicsconstant{boltzmannineV}% {\ensuremath{k_B}}% @@ -1226,7 +1228,7 @@ {\ensuremath{\sigma}}% {\mi@p{5.7}{5.670367}\timestento{-8}}% {\kg\usk\s\reciprocalcubed\usk\K\reciprocalquarted}% - [\W\per\m\squared\usk\K^4]% + [\W\per\m\squared\usk\K\quarted]% [\W\per\m\squared\usk\K\quarted] \newphysicsconstant{planck}% {\ensuremath{h}}% @@ -1292,8 +1294,8 @@ {\ensuremath{G}}% {\mi@p{6.7}{6.67408}\timestento{-11}}% {\m\cubed\usk\reciprocal\kg\usk\s\reciprocalsquared}% - [\J\usk\m\per\kg\squared]% - [\N\usk\m\squared\per\kg\squared] + [\N\usk\m\squared\per\kg\squared]% + [\J\usk\m\per\kg\squared] \newphysicsconstant{surfacegravfield}% {\ensuremath{g}}% {\mi@p{9.8}{9.807}}% @@ -2433,9 +2435,9 @@ \newcommand*{\chkquantity}[1]{% \begin{center} \begin{tabular}{C{4.5cm} C{4cm} C{4cm} C{4cm}} - name & baseunit & drvdunit & tradunit \tabularnewline + name & baseunit & drvdunit & altnunit \tabularnewline \cs{#1} & \csname #1onlybaseunit\endcsname & \csname #1onlydrvdunit\endcsname & - \csname #1onlytradunit\endcsname + \csname #1onlyaltnunit\endcsname \end{tabular} \end{center} }% @@ -2445,9 +2447,9 @@ name & symbol & value \tabularnewline \cs{#1} & \csname #1mathsymbol\endcsname & \csname #1value\endcsname \tabularnewline - baseunit & drvdunit & tradunit \tabularnewline + baseunit & drvdunit & altnunit \tabularnewline \csname #1onlybaseunit\endcsname & \csname #1onlydrvdunit\endcsname & - \csname #1onlytradunit\endcsname + \csname #1onlyaltnunit\endcsname \end{tabular} \end{center} }% |