Mathematica Stack Exchange is a question and answer site for users of Mathematica. 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

So I've developed this simple code

Mes /: MakeBoxes[Mes[mess_, error_, unit_], 
                 form : (StandardForm | TraditionalForm) : StandardForm
                ] := RowBox[{
                   MakeBoxes[NumberForm[Quantity[mess ± error, unit], {20, 2}], form]}]

in order to easily print things like this:

NumberForm[Quantity[1 ± 0.1, "picoFarads"], {20, 2}]

which give a nice output:

(1.00 ± 0.10) pF

but using the Mes structure:

Mes[1, 0.1, "picoFarads"]

gives me:

Quantity[1.00 ± 0.10,picoFarads]

On the other hand:

Mes[1, 0.1, "Farads"]


(1.00 ± 0.10) F

I'm not sure what's going on but it seems to be connected with internet connection needed to interpret the units. How can I make MakeBoxes wait for the unit to get interpreted?

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.