What do \m@ne‎ and \@M do in the definition of \@makechapterhead in book class?
I took a quick look at latex.ltx and couldn't find any explanation.

  • 3
    \m@ne is the constant -1, while \@M stands for 10000. – egreg Dec 26 '11 at 23:18

\m@ne stands for minus one, i.e. is a count register with a fixed value of -1, which is used for efficiency reasons over a literal -1.

\@M is defined using \mathchardef and equal to \mathchar"2710, i.e. 10000, and is used for the same reasons like above.

See the question \@ne \tw@ \thr@@ for more details on the reasons. See also Documentation reference for LaTeX internal commands? for a list of further similar macros. I also can recommend you latexdef (or texdef -t latex) to test for the definitions of such macros, e.g. latexdef m@ne @M will give you the definition and numerical values of these two macros.

  • Why doesn't one use the same -1 instead of \m@ne? Isn't \m@ne confusing? – Vahid Damanafshan Dec 26 '11 at 23:27
  • 3
    It's used mainly for efficience (one token instead of two), but also because it avoids possible premature expansion of tokens after it. – egreg Dec 26 '11 at 23:29

The file latex.ltx is the correct one.

At line 316 you find \m@ne:

\countdef\m@ne=22 \m@ne=-1

At line 300 you find \@M:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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