# Simple function request (altering max function)

Currently, using \max{1,2} will print:

max 1,2.

How do I alter it such that it prints:

max{1,2},

without having to use \max{\{1,2\}} in text?

Note: I'm fine with making a new function called \max2 that achieves this (if overwriting the original function is a problem for some reason).

-

\max does not take an argument so you don't need \max{\{1,2\}} just \max\{1,2\} . However if you want to save yourself those two backslashes
\let\oldmax\max

In LaTeX, \max is defined as a mathop item that can take subscript limits, viz., \def\max{\mathop{\operator@font max}}. With your setup, the command $\max_z{a,b}$ is legal but results in something rather awful-looking. It may be wise to leave \max alone and provide an entirely new command, e.g., \def\maxi#1{\textrm{max}\{#1\}}. –  Mico Oct 11 '12 at 15:44