Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to change medmuskip while using mathtools:


But this results in an error:

! Illegal unit of measure (pt inserted).
<to be read again>
l.3 \setlength{\medmuskip}{0mu}

Without mathtools, this works.

Why and what should I do to be able to change medmuskip?

share|improve this question
Probably not really helpful, but if I put \setlength{\medmuskip}{0mu} before \usepackage{mathtools}, it works for me. – MaxD Jul 6 '14 at 13:21

1 Answer 1

up vote 10 down vote accepted

With the usual definition, \setlength{<parameter>}{<value>} is just a wrapper for




is legal, because it translates to


which is perfectly legal, as \medmuskip should be assigned values only in mu units (also fil, fill or filll units for the plus and minus parts).

However, when calc is loaded (it's required by mathtools), \setlength changes meaning and mu units are not allowed any more, because calc is oriented to standard lengths only.

There's not much you can do about it other than defining a wrapper yourself:


and do


or, say

\setmuskip{\medmuskip}{3mu plus 3mu}

(which is the default).

share|improve this answer
Nice! So in this case, why not use only \medmuskip=0mu\relax? What is the advantage using a new command? – Sigur Jul 6 '14 at 14:02
@Sigur Uniformity of syntax. – egreg Jul 6 '14 at 14:02

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.