diff options
Diffstat (limited to 'macros/latex/contrib/dimnum')
-rw-r--r-- | macros/latex/contrib/dimnum/README | 22 | ||||
-rw-r--r-- | macros/latex/contrib/dimnum/dimnum.dtx | 337 | ||||
-rw-r--r-- | macros/latex/contrib/dimnum/dimnum.ins | 63 | ||||
-rw-r--r-- | macros/latex/contrib/dimnum/dimnum.pdf | bin | 0 -> 181017 bytes |
4 files changed, 422 insertions, 0 deletions
diff --git a/macros/latex/contrib/dimnum/README b/macros/latex/contrib/dimnum/README new file mode 100644 index 0000000000..426c859331 --- /dev/null +++ b/macros/latex/contrib/dimnum/README @@ -0,0 +1,22 @@ +NAME + dimnum -- Provides commands for Dimensionless numbers + +VERSION + Version: v1.0.0 + +COPYRIGHT + Copyright (c) 2021 Miguel R. Clemente <miguel.clemente@dem.uc.pt> + + This file 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 Miguel R. Clemente.
\ No newline at end of file diff --git a/macros/latex/contrib/dimnum/dimnum.dtx b/macros/latex/contrib/dimnum/dimnum.dtx new file mode 100644 index 0000000000..2020b088c7 --- /dev/null +++ b/macros/latex/contrib/dimnum/dimnum.dtx @@ -0,0 +1,337 @@ +% \iffalse meta-comment +% +% Copyright (C) 2021 by Miguel R. Clemente <miguel.clemente@dem.uc.pt> +% --------------------------------------------------------------------------- +% 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 Miguel R. Clemente. +% +% This work consists of the files dimnum.dtx and dimnum.ins +% and the derived filebase dimnum.sty. +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{dimnum.dtx} +%</driver> +%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] +%<package>\ProvidesPackage{dimnum} +%<*package> + [2021/04/01 v1.0.0 Provides commands for Dimensionless numbers] +%</package> +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{dimnum}[2021/04/01] +\usepackage{multirow} +\usepackage{tabu} +\usepackage{longtable} +\usepackage{booktabs} +\usepackage{caption} +\usepackage{verbatim} +\usepackage{indentfirst} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{dimnum.dtx} + \PrintChanges +\end{document} +%</driver> +% \fi +% +% \CheckSum{122} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% +% \changes{v1.0.0}{2021/04/01}{Public release} +% +% \DoNotIndex{\newcommand,\newenvironment} +% +% \providecommand*{\url}{\texttt} +% \GetFileInfo{dimnum.dtx} +% \title{The \textsf{dimnum} package} +% \author{Miguel R. Clemente \\ \url{miguel.clemente@dem.uc.pt}} +% \date{\fileversion~from \filedate} +% +% \maketitle +% +% Note: \Pr[l] is redefined from the \verb!amsmath! package. +% +% \section{Introduction} +% +% This package simplifies the calling of Dimensionless Numbers in math or text mode. +% +% In Table~\ref{Tab:DimNum} you can find all available Dimensionless Numbers. +% +% \section{Usage} +% +% A Dimensionless number is composed of four items: +% \begin{itemize} +% \item the command, +% \item the symbol, +% \item the name, +% \item its identifier. +% \end{itemize} + +% You can call a Dimensionless Number in three distinct ways: +% \begin{itemize} +% \item by its symbol -- using the command (i.e. \verb!\Ar! -- \Ar). +% \item by its name (short version) -- appending [s] to the command (i.e. \verb!\Bi[s]! -- \Bi[s]). +% \item by its name and identifier (long version) -- appending [l] to the command (i.e. \verb!\Kn[l]! -- \Kn[l]). +% \end{itemize} + +% Symbol, short and long versions, all work in math or text mode without the need of further commands. + +% Besides the comprehensive list of included Dimensionless Numbers, this package also introduces a command to create new Dimensionless Numbers. Creating a Dimensionless Number is achieved by using $$\verb!\newdimnum{\command}{symbol}{name}{identifier}!$$ for example, to add the \Mo[l] we write $$\verb!\newdimnum{\Mo}{Mo}{Morton}{number}!$$ + +% The identifier can be left empty, such as in the case of \Cd[l] $$\verb!\newdimnum{Cd}{\ensuremath{C_d}}{Drag Coefficient}{}!$$ +% in this example we also introduce an important command. When the Dimensionless Number symbol is always expressed in math mode -- either by definition or the use of subscripts or superscripts -- we add \verb!\ensuremath{}! to encompass the symbol, ensuring a proper representation of the Dimensionless Number. + +% You can add your own Dimensionless Numbers to your projects. Requests and suggestions to increment Table~\ref{Tab:DimNum} are accepted and encouraged. +% +%\begin{longtabu*} to \textwidth {>{\small}X[2,m] >{\small}X[m,c] >{\small}X[m,c] >{\small}X[2,m,c]} +% \centering \\ +% \captionsetup{justification=centering} \\ +% \caption{List of Dimensionless Numbers Available} \\ +% \label{Tab:DimNum} \\ +% \toprule \toprule +% \rowfont[]{\bf}Long Name & Symbol & Command & Application Fields\\ \midrule +% \endfirsthead +% \multicolumn{4}{c}% +% {{\footnotesize{\tablename\ \thetable{} -- continued from the previous page}}} \\ +% \toprule +% \rowfont[]{\bf}Long Name & Symbol & Command & Application Fields\\ \midrule +% \endhead +% \midrule \multicolumn{4}{r}{{\footnotesize{Continues on the next page}}} \\ +% \endfoot +% \bottomrule +% \endlastfoot +% \Ar[l] & \Ar & \verb!\Ar! & Fluid Mechanics \\ +% \At[l] & \At & \verb!\At! & Fluid Mechanics \\ +% \Ba[l] & \Ba & \verb!\Ba! & Geology, Fluid Mechanics \\ +% \Be[l] & \Be & \verb!\Be! & Fluid Mechanics, Thermodynamics \\ +% \Bm[l] & \Bm & \verb!\Bm! & Fluid Mechanics, Rheology \\ +% \Bi[l] & \Bi & \verb!\Bi! & Heat Transfer, Mass Transfer \\ +% \Bl[l] & \Bl & \verb!\Bl! & Geology, Fluid Mechanics, Porous Media \\ +% \Bs[l] & \Bs & \verb!\Bs! & Chemistry \\ +% \Bo[l] & \Bo & \verb!\Bo! & Geology, Fluid Mechanics, Porous Media \\ +% \Br[l] & \Br & \verb!\Br! & Fluid Mechanics, Heat Transfer \\ +% \Bk[l] & \Bk & \verb!\Bk! & Fluid Mechanics \\ +% \Cap[l] & \Cap & \verb!\Cap! & Fluid Mechanics, Porous Media \\ +% \Cau[l] & \Cau & \verb!\Cau! & \\ +% \Ch[l] & \Ch & \verb!\Ch! & Magnetohydrodynamics \\ +% \Cf[l] & \Cf & \verb!\Cf! & \\ +% \Co[l] & \Co & \verb!\Co! & \\ +% \Dah[l] & \Dah & \verb!\Dah! & Chemistry \\ +% \Dar[l] & \Dar & \verb!\Dar! & Porous Media \\ +% \De[l] & \De & \verb!\De! & Fluid Mechanics \\ +% \Deb[l] & \Deb & \verb!\Deb! & Rheology \\ +% \Cd[l] & \Cd & \verb!\Cd! & \\ +% \Du[l] & \Du & \verb!\Du! & Colloid Science \\ +% \Ec[l] & \Ec & \verb!\Ec! & Heat Transfer \\ +% \Ek[l] & \Ek & \verb!\Ek! & Geophysics \\ +% \Ela[l] & \Ela & \verb!\Ela! & \\ +% \El[l] & \El & \verb!\El! & \\ +% \Eo[l] & \Eo & \verb!\Eo! & Fluid Mechanics \\ +% \Er[l] & \Er & \verb!\Er! & Fluid Dynamics \\ +% \Eu[l] & \Eu & \verb!\Eu! & Hydrodynamics \\ +% \Fo[l] & \Fo & \verb!\Fo! & Heat Transfer, Mass Transfer \\ +% \Fr[l] & \Fr & \verb!\Fr! & Fluid Mechanics \\ +% \Ga[l] & \Ga & \verb!\Ga! & Fluid Mechanics \\ +% \Go[l] & \Go & \verb!\Go! & Fluid Dynamics \\ +% \Gz[l] & \Gz & \verb!\Gz! & Fluid Mechanics, Heat Transfer \\ +% \Gr[l] & \Gr & \verb!\Gr! & Heat Transfer \\ +% \Ha[l] & \Ha & \verb!\Ha! & Chemistry \\ +% \Hg[l] & \Hg & \verb!\Hg! & Heat Transfer \\ +% \Ho[l] & \Ho & \verb!\Ho! & \\ +% \Ir[l] & \Ir & \verb!\Ir! & Wave Mechanics \\ +% \Ja[l] & \Ja & \verb!\Ja! & Chemistry \\ +% \Ka[l] & \Ka & \verb!\Ka! & Combustion \\ +% \Kc[l] & \Kc & \verb!\Kc! & Fluid Dynamics \\ +% \Kn[l] & \Kn & \verb!\Kn! & Gas Dynamics \\ +% \Ku[l] & \Ku & \verb!\Ku! & Fluid Mechanics \\ +% \La[l] & \La & \verb!\La! & Fluid Dynamics \\ +% \Le[l] & \Le & \verb!\Le! & Heat Transfer, Mass Transfer \\ +% \Ma[l] & \Ma & \verb!\Ma! & Gas Dynamics \\ +% \Mg[l] & \Mg & \verb!\Mg! & Fluid Mechanics \\ +% \Mo[l] & \Mo & \verb!\Mo! & Fluid Dynamics \\ +% \Nus[l] & \Nus & \verb!\Nus! & Heat Transfer \\ +% \Oh[l] & \Oh & \verb!\Oh! & Fluid Dynamics \\ +% \Pe[l] & \Pe & \verb!\Pe! & Heat Transfer \\ +% \pH[l] & \pH & \verb!\pH! & Chemistry \\ +% \Pr[l] & \Pr & \verb!\Pr! & Heat Transfer \\ +% \Ra[l] & \Ra & \verb!\Ra! & Heat Transfer \\ +% \Rey[l] & \Rey & \verb!\Rey! & Fluid Mechanics \\ +% \Ri[l] & \Ri & \verb!\Ri! & Fluid Dynamics \\ +% \Ro[l] & \Ro & \verb!\Ro! & Fluid Dynamics \\ +% \Ros[l] & \Ros & \verb!\Ros! & Geophysics \\ +% \Rou[l] & \Rou & \verb!\Rou! & Sediment Transport \\ +% \Sc[l] & \Sc & \verb!\Sc! & Mass Transfer \\ +% \Sh[l] & \Sh & \verb!\Sh! & Mass Transfer \\ +% \So[l] & \So & \verb!\So! & Hydrodynamic Lubrication \\ +% \St[l] & \St & \verb!\St! & Fluid Dynamics, Mass Transfer \\ +% \Ste[l] & \Ste & \verb!\Ste! & Thermodynamics \\ +% \Stk[l] & \Stk & \verb!\Stk! & Particles Suspensions \\ +% \Sr[l] & \Sr & \verb!\Sr! & Fluid Dynamics \\ +% \Stu[l] & \Stu & \verb!\Stu! & Magnetohydrodynamics \\ +% \Sv[l] & \Sv & \verb!\Sv! & Design \\ +% \Ta[l] & \Ta & \verb!\Ta! & Fluid Dynamics \\ +% \Ur[l] & \Ur & \verb!\Ur! & Wave Mechanics \\ +% \Va[l] & \Va & \verb!\Va! & Porous Media \\ +% \Wa[l] & \Wa & \verb!\Wa! & Electrochemistry \\ +% \Wea[l] & \Wea & \verb!\Wea! & Combustion \\ +% \We[l] & \We & \verb!\We! & Multiphase Flow \\ +% \Wei[l] & \Wei & \verb!\Wei! & Viscoelastic Flows \\ +% \bottomrule +% \end{longtabu*} +% +% +% \StopEventually{} +% +% \section{Implementation} +% +% \iffalse +%<*package> +% \fi +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{dimnum} +[2021/04/01 v1.0.0 Provides commands for Dimensionless numbers] +\RequirePackage{amsmath} +\RequirePackage{xifthen} +\let\Pr\relax +\newif\ifstartedinmathmode +% \end{macrocode} +% +% \begin{macro}{\newdimnum} +% \begin{macrocode} +\newcommand{\newdimnum}[4]{% +\expandafter\newcommand\csname #1\endcsname[1][]{% +\ifthenelse{\equal{##1}{}}{% +\relax\ifmmode\startedinmathmodetrue\else\startedinmathmodefalse\fi% +\ifstartedinmathmode\operatorname{#2}\else#2\fi}{% +\ifthenelse{\equal{##1}{s}}{\text{#3}}{% +\ifthenelse{\equal{##1}{l}}{% +\ifthenelse{\equal{#4}{}}{\text{#3}}{\text{#3 #4}}}{% +\ifthenelse{\equal{#4}{}}{\text{#3}}{\text{#3 #4}}}% + }% + }% + }% +} +% \end{macrocode} +% \end{macro} +% +%\newdimnum{command}{symbol}{name}{identifier} +% \begin{macrocode} +\newdimnum{Ar}{Ar}{Archimedes}{number} +\newdimnum{At}{A}{Atwood}{number} +\newdimnum{Ba}{Ba}{Bagnold}{number} +\newdimnum{Be}{Be}{Bejan}{number} +\newdimnum{Bm}{Bm}{Bingham}{number} +\newdimnum{Bi}{Bi}{Biot}{number} +\newdimnum{Bl}{Bl}{Blake}{number} +\newdimnum{Bs}{Bs}{Bodenstein}{number} +\newdimnum{Bo}{Bo}{Bond}{number} +\newdimnum{Br}{Br}{Brinkman}{number} +\newdimnum{Bk}{\ensuremath{N_{BK}}}{Brownell-Katz}{number} +\newdimnum{Cap}{Ca}{Capillary}{number} +\newdimnum{Cau}{C}{Cauchy}{number} +\newdimnum{Ch}{Q}{Chandrasekhar}{number} +\newdimnum{Cf}{\ensuremath{C_f}}{Coefficient of Frication}{} +\newdimnum{Co}{Co}{Condensation}{number} +\newdimnum{Dah}{Da}{Dahmköhler}{number} +\newdimnum{Dar}{Da}{Darcy}{number} +\newdimnum{De}{De}{Dean}{number} +\newdimnum{Deb}{De}{Deborah}{number} +\newdimnum{Cd}{\ensuremath{C_d}}{Drag Coefficient}{} +\newdimnum{Du}{Du}{Dukhin}{number} +\newdimnum{Ec}{Ec}{Eckert}{number} +\newdimnum{Ek}{Ek}{Ekman}{number} +\newdimnum{Ela}{El}{Elasticity}{number} +\newdimnum{El}{El}{Elenbass}{number} +\newdimnum{Eo}{Eo}{Eötvös}{number} +\newdimnum{Er}{Er}{Ericksen}{number} +\newdimnum{Eu}{Eu}{Euler}{number} +\newdimnum{Fo}{Fo}{Fourier}{number} +\newdimnum{Fr}{Fr}{Froude}{number} +\newdimnum{Ga}{Ga}{Galilei}{number} +\newdimnum{Go}{G}{Görtier}{number} +\newdimnum{Gz}{Gz}{Graetz}{number} +\newdimnum{Gr}{Gr}{Grashof}{number} +\newdimnum{Ha}{Ha}{Hatta}{number} +\newdimnum{Hg}{Hg}{Hagen}{number} +\newdimnum{Ho}{H}{Hodgson}{number} +\newdimnum{Ir}{Ir}{Iribarren}{number} +\newdimnum{Ja}{Ja}{Jakob}{number} +\newdimnum{Ka}{Ka}{Karlovitz}{number} +\newdimnum{Kc}{\ensuremath{K_C}}{Keulegan-Carpenter}{number} +\newdimnum{Kn}{Kn}{Knudsen}{number} +\newdimnum{Ku}{Ku}{Kutateladze}{number} +\newdimnum{La}{La}{Laplace}{number} +\newdimnum{Le}{Le}{Lewis}{number} +\newdimnum{Ma}{Ma}{Mach}{number} +\newdimnum{Mg}{Mg}{Marangoni}{number} +\newdimnum{Mo}{Mo}{Morton}{number} +\newdimnum{Nus}{Nu}{Nusselt}{number} +\newdimnum{Oh}{Oh}{Ohnesorge}{number} +\newdimnum{Pe}{Pe}{Péclet}{number} +\newdimnum{pH}{pH}{pH}{} +\newdimnum{Po}{Po}{Poiseuille}{constant} +\newdimnum{Pr}{Pr}{Prandtl}{number} +\newdimnum{Ra}{Ra}{Rayleigh}{number} +\newdimnum{Rey}{Re}{Reynolds}{number} +\newdimnum{Ri}{Ri}{Richardson}{number} +\newdimnum{Ro}{Ro}{Roshko}{number} +\newdimnum{Ros}{Ro}{Rossby}{number} +\newdimnum{Rou}{P}{Rouse}{number} +\newdimnum{Sc}{Sc}{Schmidt}{number} +\newdimnum{Sh}{Sh}{Sherwood}{number} +\newdimnum{So}{S}{Sommerfield}{number} +\newdimnum{St}{St}{Stanton}{number} +\newdimnum{Ste}{Ste}{Stefan}{number} +\newdimnum{Stk}{Stk}{Stokes}{number} +\newdimnum{Sr}{Sr}{Strouhal}{number} +\newdimnum{Stu}{N}{Stuart}{number} +\newdimnum{Sv}{Sv}{Svelteness}{} +\newdimnum{Ta}{Ta}{Taylor}{number} +\newdimnum{Ur}{U}{Ursell}{number} +\newdimnum{Va}{Va}{Vadasz}{number} +\newdimnum{Wa}{Wa}{Wagner}{number} +\newdimnum{Wea}{Wea}{Weaver flame speed}{number} +\newdimnum{We}{We}{Weber}{number} +\newdimnum{Wei}{Wi}{Weissenberg}{number} +\endinput +% \end{macrocode} +% +% \iffalse +%</package> +% \fi +% +% \Finale +\endinput diff --git a/macros/latex/contrib/dimnum/dimnum.ins b/macros/latex/contrib/dimnum/dimnum.ins new file mode 100644 index 0000000000..96a9253467 --- /dev/null +++ b/macros/latex/contrib/dimnum/dimnum.ins @@ -0,0 +1,63 @@ +%% dimnum.ins +%% Copyright (C) 2021 by Miguel R. Clemente +%% +%% This file 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 Miguel R. Clemente. +%% + +\input docstrip.tex +\keepsilent + +\usedir{tex/latex/dimnum} + +\preamble + +This is a generated file. + +Copyright (C) 2021 by Miguel R. Clemente + +This file 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 Miguel R. Clemente. + +\endpreamble + +\generate{\file{dimnum.sty}{\from{dimnum.dtx}{package}}} + +\obeyspaces +\Msg{*************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* dimnum.sty *} +\Msg{* *} +\Msg{* To produce the documentation run the file dimnum.dtx *} +\Msg{* through LaTeX. *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{*************************************************************} + +\endbatchfile
\ No newline at end of file diff --git a/macros/latex/contrib/dimnum/dimnum.pdf b/macros/latex/contrib/dimnum/dimnum.pdf Binary files differnew file mode 100644 index 0000000000..24473874ec --- /dev/null +++ b/macros/latex/contrib/dimnum/dimnum.pdf |