[texhax] Defining math operator with í in its text

Barbara Beeton bnb at ams.org
Sat Jan 23 16:17:22 CET 2010


On Sat, 23 Jan 2010, Lars Madsen wrote:

    Eduardo M KALINOWSKI wrote:
    >     In Portuguese, the operators "min" and "max" should actually be
    > written "mín" and "máx" because the full words have accents in those
    > letters. So I redefine them with something like
    > 
    > \renewcommand{\max}{\mathop{\operator at font m\acute{a}x}}
    > 
    > And for max everything works.
    > 
    > However, for min a problem arises. I cannot use \acute{i} because that
    > puts the accent over the dot and the result is very ugly. Using \acute{\i}
    > triggers the warning "Command \i invalid in math mode" and I get an
    > accented german sharp-s. \imath instead of \i also does not work, because
    > I get an italic i.
    > 
    > Using m\'{\i}n or just mín I get the expected result. However, in my
    > document I get a warning "Command \' invalid in math mode" is issued. It
    > seems to be harmless, but I'd like to eliminate the warning if possible.
    > In the minimal document below, it became an error.
    > 
    > One way to avoid that is using
    > 
    > \renewcommand{\min}{\mathop{\operator at font \text{mín}}}
    > 
    > But it seems somewhat hackish, so I wonder if there is a better solution.
    > 
    > 
    > 
    > \documentclass{article}
    > 
    > \makeatletter
    > \renewcommand{\min}{\mathop{\operator at font m\'{\i}n}}
    > \makeatother
    > 
    > \begin{document}
    > 
    > $\min$
    > 
    > \end{document}

    I usually just cheat \DeclareMathOperator*\min{\textup{m\'in}} (asuming
    amsmath, but that asumes that the operatorfont is the same as the text font.

    \text is not a good idea because it is italic inside an italic context,
    thus \textup is better.

that's good as far as it goes, but you'll get the
message that \min is already defined.  you have
to undefine it first.  this works:

  \makeatletter
  \let\min\@undefined
  \makeatother

there has been a request re amsmath to provide
a command \RedeclareMathOperator.  we will
consider that for the next update.
						-- bb


More information about the texhax mailing list