TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a simple way to typeset byte units like MB, GB, TB in latex in math mode? How do you typeset 1GB for example?

share|improve this question
You may find that very helpful: tex.stackexchange.com/questions/2248/… siunitx IS the state of the art latex unit package. – bloodworks Jan 1 '13 at 18:22
up vote 22 down vote accepted

You can use siunitx, which supports both SI- and binary prefixes. Its main macro, \SI, works in math mode as well as in text:


    For example, $x = \SI{1}{\giga\byte}$ or \SI{1}{\gibi\byte}.

See page 38 of the siunitx manual for further information.

share|improve this answer
@doncherry Exactly. I would like to those units in math mode. – drasto Jan 1 '13 at 18:37
+1 after edit. Looks useable. – drasto Jan 1 '13 at 18:38
@drasto: It works on my installation. Are you loading the package with the correct option? Are you redefining \byte somewhere? – You Jan 1 '13 at 19:06
I was using incorrect options. – drasto Jan 1 '13 at 20:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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