How to rename a command for a symbol

Don't use \mathrm for defining operators: the spacing might be wrong. Compare

\[ \mathrm{int} A \]

versus

\[ \mathop{\mathrm{int}} A \]

There's no need to use the complicated second construction, because amsmath provides an easy way to get it.

\usepackage{amsmath}
\let\intgrl\int % keep the original definition of `\int`
\let\int\relax % to avoid a "spurious" error message
\DeclareMathOperator{\int}{int}
\DeclareMathOperator{\Int}{Int}

However, I wouldn't redefine \int and use

\DeclareMathOperator{\sint}{int}
\DeclareMathOperator{\sInt}{Int}

("s" for "set").


you probably need to use something like:

\let\intgrl\int
\def\int{\mathrm{int}}
\def\Int{\mathrm{Int}}

In one of the source files for The Comprehensive LaTeX Symbol List by Scott Pakin there is this

% There are a number of symbols (e.g., \Square) that are defined by      %
% multiple packages.  In order to typeset all the variants in this       %
% document, we have to give glyph a unique name.  To do that, we define  %
% \savesymbol{XXX}, which renames a symbol from \XXX to \origXXX, and    %
% \restoresymbols{yyy}{XXX}, which renames \origXXX back to \XXX and     %
% defines a new command, \yyyXXX, which corresponds to the most recently %
% loaded version of \XXX.                                                %

Somewhere else he mentions that the commands are avialable in the savesym package (though that didn't seem to have any docmentation, hence the above copy past). I could get the package through miktex package manager.

Check out the file symbols.tex for more info (he re-implements the commands).

Tags:

Symbols

Macros