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.

Maybe my question is easy. When I want to write

$$ \mbox{div}(F) = \sum_i (F_i)_{x_i} $$

I have to type \mbox{div}(F), which is cumbersome.

Is there a way to define a command \blabla to produce \mbox{div}(F)?

share|improve this question
2  
Welcome to TeX.SX! Does tex.stackexchange.com/questions/671/… help? If it does, then we can close this question as duplicate; otherwise, please add to your question some more details. –  egreg Nov 7 '12 at 18:36
1  
@egreg: I'm pretty sure the use of $$ stems from Math.SE, as the user is register there. –  Werner Nov 7 '12 at 18:43
    
If the question is about MathJax, I don't think there's much to do about it. –  egreg Nov 7 '12 at 19:00
1  
For a drop-in replacement of that command sequence you can simply wirte \newcommand{\blabla}{\mbox{div}(F)} and thereafter use \blabla. However, do have a look at the question pointed to by @egreg. –  Andrew Swann Nov 7 '12 at 19:05
add comment

1 Answer

Perhaps you want

\DeclareMathOperator{\mydiv}{div}  

in your preamble. Then you could write

\begin{equation}
\mydiv(F) = ...
\end{equation}

Please don't use the outdated $$ for displayed equations as detailed in Why is \[ ... \] preferable to $$?.

share|improve this answer
add comment

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.