Skip to content

Commit

Permalink
Add paired delimiters showcasing, add 'absolute' command to glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpovel committed Nov 9, 2020
1 parent 7c59cbe commit 4d0c6ff
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
7 changes: 6 additions & 1 deletion bib/glossaries/symbols/other.bib
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ @entry{derivative
@entry{partial_derivative,
name={\partialderivativefmt{\symbolplaceholder}},
description={partial, infinitesimal change in \symbolplaceholder},
unit={--},
unit={\symbolplaceholder},
}
@entry{difference,
name={\differencefmt{\symbolplaceholder}},
Expand Down Expand Up @@ -45,3 +45,8 @@ @entry{vector
description={Vector},
unit={--},
}
@entry{abs,
name={\ensuremath{\abs*{\symbolplaceholder}}},
description={Absolute of \symbolplaceholder},
unit={\symbolplaceholder},
}
38 changes: 36 additions & 2 deletions chapters/mainmatter/base-features.tex
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ \subsubsection{Predefined Macros}
\midrule
Mean & \(\mean{\sym{density}}\), \(\mean{\sym{area}}\) \\
Logarithmic Mean & \(\logmean{\sym{density}}\), \(\logmean{\sym{area}}\) \\
% The starred variant scales automatically:
Absolute\mpfootnotemark[1] & \(\abs*{\sym{density}}\), \(\abs*{\sym{area}}\), \(\abs*{\frac{\sym{area}^{2}}{\sym{area}^{3}}}\) \\
Flow & \(\flow{\sym{mass}}\), \(\flow{\sym{enthalpy}}\) \\
Delta & \(\difference{\sym{volume}}\), \(\difference{\symspec{enthalpy}}\) \\
Nabla Operator &
Expand Down Expand Up @@ -286,23 +288,55 @@ \subsubsection{Predefined Macros}
\fracderiv*{\symspec{enthalpy}}{\sym{abs_temperature}},
\fracderiv*[2]{\symspec{enthalpy}}{\sym{abs_temperature}}
\) \\
Time Deriv.\mpfootnotemark[1] &
Time Deriv.\mpfootnotemark[2] &
\(
\timederiv{\sym{voltage}},
\timederiv[2]{\sym{second_cart_coord}},
\timederiv*{\sym{voltage}},
\timederiv*[2]{\sym{first_cart_coord}}
\) \\
Positional Deriv.\mpfootnotemark[1] &
Positional Deriv.\mpfootnotemark[2] &
\(
\posderiv{\sym{volume}},
\posderiv[2]{\sym{velocity}},
\posderiv*{\sym{volume}},
\posderiv*[2]{\sym{velocity}}
\) \\
\addlinespace
% The starred variant scales automatically. The non-starred version
% does not scale.
% Supply the optional argument for manual control of the size, e.g.
% `\abs[\Bigg]{\frac{a}{b}}`, should this ever be needed.
Parentheses\mpfootnotemark[1] &
\(
\parens*{x},
\parens*{x_{2}},
\parens*{x^{2}},
\parens*{\frac{x}{y}},
\parens*{\frac{x^{2}}{y^{3}}}
\) \\
Brackets\mpfootnotemark[1] &
\(
\brackets*{x},
\brackets*{x_{2}},
\brackets*{x^{2}},
\brackets*{\frac{x}{y}},
\brackets*{\frac{x^{2}}{y^{3}}}
\) \\
Braces\mpfootnotemark[1] &
\(
\braces*{x},
\braces*{x_{2}},
\braces*{x^{2}},
\braces*{\frac{x}{y}},
\braces*{\frac{x^{2}}{y^{3}}}
\) \\
\bottomrule
\end{tabular}
\footnotetext[1]{%
These scale automatically according to their content, using \ctanpackage{mathtools}.%
}%
\footnotetext[2]{%
As a shortcut version of fractional derivatives.%
}%
}
Expand Down
1 change: 1 addition & 0 deletions cookbook.cls
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
% also scales the delimiters automatically, using \left and \right.
\DeclarePairedDelimiter{\parens}{(}{)}
\DeclarePairedDelimiter{\brackets}{[}{]}
\DeclarePairedDelimiter{\braces}{\{}{\}}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}% Absolute value

% For a 'cases' environment that also supports equation numbering,
Expand Down

0 comments on commit 4d0c6ff

Please sign in to comment.