3

This question already has an answer here:

I want to show 1 GS/s (one giga sample per second) in my article. How to make use of siunitx package to produce the rate correctly?

I assume there to be something better, than \SI{1}{GS/s}.

I would like to write something like \SI{1}{\giga\sample\per\second}, but \sample is not defined in the package.

Related:

marked as duplicate by clemens, user13907, Torbjørn T., Maarten Dhondt, Stefan Pinnow Jun 13 '16 at 13:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

8

This gets described on page 12 of the siunitx manual:

New units are produced using the \DeclareSIUnit macro. < symbol > can contain literal input, other units, multiple prefixes, powers and \per, although literal text should not be intermixed with unit macros. Units can be created with < options > from the usual list understood by siunitx, and apply the specific unit macro only.

% arara: pdflatex

\documentclass{article}
\usepackage{siunitx}
%\sisetup{per-mode=symbol} % for the slashed version.
\DeclareSIUnit{\sample}{S}

\begin{document}
I would like to write something like \SI{1}{\giga\sample\per\second}

Problem could arise if you need to give some numbers in \si{\siemens}
\end{document} 

enter image description here

  • Thank you! Please add \sisetup{per-mode=symbol} to the answer to get exactly what I needed and I will accept the answer. I actually prefer the dash. – Johu Jun 13 '16 at 12:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.