[texhax] Defining math operator with í in its text

Lars Madsen daleif at imf.au.dk
Sat Jan 23 17:33:04 CET 2010


Barbara Beeton wrote:
> 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

ahh, yes forgot about that, I've even mentioned that in my own LaTeX book.

As far as I know it is enough with \let\min\relax (saves a bit of typing)

Perhaps \reDeclareMathOperator should be added to mathtools

/daleif



More information about the texhax mailing list