Making Vpp and Vrms units in LaTeX with siunitx
John PeckPublished
The siunitx package for LaTeX makes it easy to handle units in both normal and math modes. I end up needing units like Vrms when talking about electronics, so I add this in my preamble:
\usepackage{siunitx}
\DeclareSIUnit \vrms {\ensuremath{\mathrm{V_{rms}}}}
\DeclareSIUnit \vpp {\ensuremath{\mathrm{V_{pp}}}}
...to define these units to siunitx. I can then invoke the units with something like
free air. I drove them to about \SI{9}{\vpp}.
where I know siunitx will then make the proper space between the number and the unit. This all renders like this:
...in the PDF output.