6

When expressing a value such as 90 percent by weight, I have seen papers use all of these formats:

  • 90 wt%
  • 90 wt.%
  • 90-wt %
  • 90 wt.-%
  • 90 wt. percent
  • 90 weight percent

There are probably still more. How can I use the siunitx package to handle these formats without manually reformatting to fit each style?

1

2 Answers 2

12

Define a new unit name:

\documentclass{article}

\usepackage{siunitx}

\DeclareSIUnit{\wtpercent}{wt\%}
%\DeclareSIUnit{\wtpercent}{wt.\%}
%\DeclareSIUnit{\wtpercent}{wt\%}
%\DeclareSIUnit{\wtpercent}{wt~\%}
%\DeclareSIUnit{\wtpercent}{wt-\%}
%\DeclareSIUnit{\wtpercent}{wt.~percent\%}
%\DeclareSIUnit{\wtpercent}{weight~percent}

\begin{document}

\SI{90}{\wtpercent} 

\end{document}

You can then choose the one you need by switching commented lines.

If you also want to support the form with the hyphen between the number and the unit, you have to use a personal command:

\documentclass{article}

\usepackage{siunitx}

\DeclareSIUnit{\wtpercent}{wt\%}
%\DeclareSIUnit{\wtpercent}{wt.\%}
%\DeclareSIUnit{\wtpercent}{wt\%}
%\DeclareSIUnit{\wtpercent}{wt-\%}
%\DeclareSIUnit{\wtpercent}{wt.~percent\%}
%\DeclareSIUnit{\wtpercent}{weight~percent}
\NewDocumentCommand{\SIwt}{O{}m}{\SI[#1]{#2}{\wtpercent}

% for the hyphen between the number and the unit
% uncomment the following lines and comment out
% all preceding ones
%\DeclareSIUnit{\wtpercent}{wt~\%}
%\NewDocumentCommand{\SIwt}{O{}m}{\SI[number-unit-separator={-},#1]#2}{\wtpercent}}

\begin{document}

\SIwt{90}

\end{document}
2

A slightly different "answer" to your question. ISO and NIST recommend against using percentage by weight/volume/amount of substance or any other variation as it mixes information with units.

See 7.10.2 of the guide here: https://www.nist.gov/publications/guide-use-international-system-units-si

Because the symbol % represents simply a number, it is not meaningful to attach information to it (see Sec. 7.4). One must therefore avoid using phrases such as “percentage by weight,” “percentage by mass,” “percentage by volume,” or “percentage by amount of substance.” Similarly, one must avoid writing, for example, “% (m/m),” “% (by weight),” “% (V/V),” “% (by volume),” or “% (mol/mol).” The preferred forms are “the mass fraction is 0.10,” or “the mass fraction is 10 %,” ...

Which is a long-winded way of suggesting that you instead use:

The mass fraction is \qty{90}{\percent}

Personally I prefer the representation which best conveys the meaning, and "wt%" or "% (m/m)" are both quite good at that. But if your goal is to have a solution which is acceptable to all publications, there are many which won't accept any variation of "percentage by mass".

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .