I would like to say a congruence holds modulo a fairly large expression, THING, to be enclosed parenthetically.

\left( \mod{THING}\right)

seems to result in a large space between the open paren and the "mod," and


produces parentheses too small for my taste. Is there an option less hacky than just using an \mbox?


3 Answers 3


Using the amsmath definition seems better; I'll also use mathtools for the growing parentheses.


% Here's how amsmath defines \pmod
% \newcommand{\pod}[1]{\allowbreak
%   \if@display\mkern18mu\else\mkern8mu\fi(#1)}
% \renewcommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}}

\DeclarePairedDelimiterX{\pmodx}[1]{(}{)}{{\operator@font mod}\mkern6mu#1}

a &\equiv b \pmod{n}\\
a &\equiv b \pmod[\big]{n}\\
a &\equiv b \pmod[\Big]{\frac{n}{2}}\\
a &\equiv b \pmod[\bigg]{\sum_{k=1}^n k^2}\\
a &\equiv b \pmod*{\sqrt{\sum_{k=1}^n k^3}\,}

It would be easy to define also \pod with the same idea.

enter image description here

It's not a good idea to use \mod, which is defined to be like \pmod but without parentheses.


The commands \mod and pmod are intended to be used like

 x\equiv y\pmod b \qquad x\equiv y\mod c

enter image description here

and not in the way you are using them.

You probably want a new operator like this:


and then use Bigl and Bigr or similar to have larger parenthesis:






enter image description here


The command \mod introduces some hard coded kerning which you see here. You can just define a new command with the kerning you like. However, \pmod keeps this kerning in front of the parentheses. If you want to stick to that, you should do the second approach.

Personally, I do not like to use \left(\right) as it makes more harm then help. Therefore, I would define some simpler \mod-command for my uses and use the best matching brackets manually.

% arara: lualatex

\newcommand{\myMod}[1]{\allowbreak \if@display \mkern 18mu \else \mkern 0mu\fi {\operator@font mod}\,\,#1} % 0mu was 12mu for the math mode in the orignial defintion
\newcommand{\myPMod}[1]{\allowbreak \if@display \mkern 18mu\else \mkern 8mu\fi \left({{\operator@font mod}\mkern 6mu #1}\right)} % replaced () by \left(\right) in respect to the original definiont

% The original \mod 

% \mod redefined in order to kick out the math style kerning

% The original \pmod

% \pmod redefined with \left(\right) instead of normal parantheses

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .