# How to rename a command for a symbol

I'm using the symbol int for the interior of the topological space and Int for the interior of a closed manifold in Rn.

But \int is the built-in command for the 'integral' symbol. How can I rename the integral symbol to \intgrl?

At this moment, I have:

\def\int{\mathrm{int}}
\def\Int{\mathrm{Int}}

-

you probably need to use something like:

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

-
Thanks, much simpler than I expected. –  Leon Apr 14 '12 at 1:23

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").

-

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).

-