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

What's the easiest way to define a \bdiv equivalent to \bmod, i.e., a binary operator for integer division?

I tried \meaning\bmod, but got very primitive TeX commands, so I'm sure there's a higher-level way to define it that would give me the Roman font and binary operation spacing.

share|improve this question
up vote 11 down vote accepted

You can find the definition of \bmod in latex.ltx or source2e. The example below just replaces mod with div:


  \mathbin{\operator@font div}\penalty900\mkern5mu%

\[ a\bmod b \]
\[ a\bdiv b \]


share|improve this answer
Thank you. Now I just have to find where Ubuntu put those two files on my system. :-) – TOB Nov 10 '12 at 21:02
@TOB Just run texdoc source2e or kpsewhich latex.ltx. – Heiko Oberdiek Nov 10 '12 at 21:34
Awesome, thanks! – TOB Nov 11 '12 at 22:12

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.