3

I would like to declare the following unit:

dB re 1 $\mu$Pa

I found this answer: Define new unit in siunitx with angles and spaces

And got this working:

\DeclareSIUnit[number-unit-product={}]{\dBpa}{\dB \micro \pascal}

But I would it like this:

\DeclareSIUnit[number-unit-product={}]{\dBpa}{\dB \text{re 1} \micro \pascal}

But the \text part does not work.

How could one include normal text in a unit?

EDIT:

Inside the document this works:

  \si{\dB \ensuremath{\text{ re } 1} \micro \pascal}

1 Answer 1

4

With a little detour it is possible to create the unit I wanted to create:

\DeclareSIUnit[]{\reference}{\ensuremath{~\text{ re } 1 }}
\DeclareSIUnit[]{\dBpa}{\dB \reference \micro \pascal}

So the text part is first declared as a separate SIUnit. This can then be used in the second declaration.

You must log in to answer this question.

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