NumberWithUnits()
macro. It turns out that when the number that you pass to NumberWithUnits()
is already a MathObject, NumberWithUnits()
will not create a new one but reuses that object and adds the unit information to it. But if the MathObject came from Compute()
, it will have set the correct answer to what was passed to it, and NumberWithUnits()
unfortunately doesn't change that, so the units are missing when the correct answer is used.
I've put an updated copy of parserNumberWithUnits.pl
in our course's templates/macros
folder as a temporary fix, but will need to do a more thorough one for the official release. in any case, your original file should show correct units now.