[texhax] Defining math operator with í in its text

Lars Madsen daleif at imf.au.dk
Sat Jan 23 13:59:16 CET 2010


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.

/daleif




More information about the texhax mailing list