Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What is the correct way of having all operator names be set in, say, sans serif? Saying

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\operator@font{\sf}
\makeatother
\DeclareMathOperator\operator{operator}
\begin{document}
An $\operator 1$.
\end{document}

seems to do the trick, but amsopn.sty defines

\def\operator@font{\mathgroup\symoperators}

which seems to do more...

It would be nice if there were a @-free way of doing this, by the way.

share|improve this question
2  
/me sighs... CAPTCHAS are starting to make it obvious that I am not human: I had to try 6 until I finally got it right: they are too difficult :/ –  Mariano Suárez-Alvarez Feb 1 '12 at 23:32
1  
You need to redefine \operator@font, which is used in other macros with that name. Either use \makeatletter and \makeatother or rewrite amsopn.sty in order not to use \operator@font. I guess that the choice is easy. :) –  egreg Feb 2 '12 at 0:02

1 Answer 1

You can define a new symbol font, and also redefine \mathsf to use it, otherwise you'd waste a math group and there are only 16 of them:

\DeclareSymbolFont{sfoperators}{OT1}{cmss}{m}{n}
\DeclareSymbolFontAlphabet{\mathsf}{sfoperators}

\makeatletter
\def\operator@font{\mathgroup\symsfoperators}
\makeatother
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.