Skip to content

Commit

Permalink
Add new unit/qualifier (thermal) and showcase
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpovel committed Mar 2, 2021
1 parent 676a236 commit 7a2d0d0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bib/glossaries/symbols/subscripts.bib
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ @symbol{air
@symbol{electric,
name={\text{el.}},
description={electric},
}
}
@symbol{thermal,
name={\text{th}},
description={thermal},
}
3 changes: 3 additions & 0 deletions chapters/mainmatter/base-features.tex
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ \subsubsection{Physical Units}
The mode in which units with negative exponents are displayed can be changed,
\iecfeg{e.g.}\ fractions can be used:
\si[per-mode=fraction]{\meter\cubed\kelvin\per\kilogram\squared\per\giga\watt\per\degreeCelsius}.
You can also use \verb|\DeclareSIQualifier| to create textual subscripts for units,
further specifying them, or create entirely custom units using \verb|\DeclareSIUnit|.
An example for both combined is: \si[per-mode=fraction]{\mega\watthour\thermal\per\meter\cubed}.

The \verb|\SI{<quantity>}{<unit>}| command essentially combines \verb|\num| and
\verb|\si|, inserting a small space in between, for correct typesetting.
Expand Down
5 changes: 4 additions & 1 deletion cookbook.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@
% Declare units ourselves:
% Set as text so it stays a hyphen in math mode, as opposed to minus sign
\DeclareSIUnit{\volpercent}{Vol.\text{-}\%}
\DeclareSIUnit{\kilowatthour}{kWh}%
\DeclareSIUnit{\watthour}{Wh}%
\DeclareSIUnit{\annum}{a}%
\DeclareSIUnit{\atmosphere}{atm}%
\DeclareSIUnit{\partspermillion}{ppm}%
Expand All @@ -1669,6 +1669,9 @@
\DeclareSIQualifier{\water}{%
\glsfmtname{sub.water}%
}
\DeclareSIQualifier{\thermal}{%
\glsfmtname{sub.thermal}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down

0 comments on commit 7a2d0d0

Please sign in to comment.