13

I want to represent dBm in LaTeX. I have included the siunits package. But only dB is included. What is the best way to represent other units?

  • 9
    (1) Might be an idea to explain what dBm is, (2) It is explained in the manual how to define your own units or shortcuts to common unit combinations. – daleif Feb 15 '17 at 15:44
  • 3
    Is switching the package an option? Its easy to define your own units in the siunitx package https://www.ctan.org/pkg/siunitx?lang=en – samcarter_is_at_topanswers.xyz Feb 15 '17 at 16:08

2 Answers2

24

With SIunits:

\documentclass{article}
\usepackage{SIunits}
\addunit\decibelm{dBm}
\begin{document}

\decibelm

\end{document}

I would (not surprisingly) use siunitx. This looks like a separate unit for which I might use

\documentclass{article}
\usepackage{siunitx}
\DeclareSIUnit{\belmilliwatt}{Bm}
\DeclareSIUnit{\dBm}{\deci\belmilliwatt}
\begin{document}

\si{\deci\belmilliwatt}
\si{\dBm}

\end{document}

On the other hand, if it's a qualifier then

\documentclass{article}
\usepackage{siunitx}
\sisetup{qualifier-mode = text}
\begin{document}

\si{\deci\bel\of{m}}

\end{document}
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • thx Joseph! - one question: what do I need the \si for? I have tried, it works with $\dBm$ as well. –  Feb 15 '17 at 17:58
  • @Luk In siunitx with the standard settings the unit macros are not globally defined, they are only available inside the arguments to \si and \SI. You can alter this if you wish. – Joseph Wright Feb 15 '17 at 18:08
1

For dBm with siunitx ---

\si{\dB\milli\nothing}

This has an unwanted space between B and m, but it does not require declaring new units, so good for a quick implementation. white space in dBm

@daleif

Might be an idea to explain what dBm is

dBm (or dBmW) means deci-bel milliwatt, or the power in milliwatts but written in 10*log10 format, e.g., 10 dBm = 10 mW.

It seems that the author of siunitx refused to add this unit, since it is not a standard unit.

Well, it is an industrial (and academic) standard.

llama
  • 103
  • 3
Yvon
  • 171