TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to write an equation, but I keep getting an "Undined control sequence error on the line my equation is one, and I can't seem to figure out what the error is. Can any of you guys seen an errors in the equation?

\theta^* = \bf{argmin}\underbrace{{1\over2}(g-F(\theta))^T(g-F(\theta))}_\text{f(\theta)}
share|improve this question

closed as too localized by Andrew Swann, lockstep, Claudio Fiandrino, Thorsten, Martin Schröder Dec 27 '12 at 16:48

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You probably have \text marked as undefined; you need \usepackage{amsmath}, for it. By the way, \bf{argmin} is wrong: use \mathbf{argmin} or, better yet, \operatorname{\mathbf{argmin}}. However, \text is wrong in that context: just _{f(\theta)} should be used. – egreg Dec 13 '12 at 14:37
up vote 7 down vote accepted

First you need the amsmath package for the text command. And then you should use \mathbf{} for the boldface math and \textbf{} for text. \bf,\it etc. is obsolete. Does it matter if I use \textit or \it, \bfseries or \bf, etc

Then \text{} is used for non-math content but \theta needs math mode.

So overall the following works.

\theta^* = \mathbf{argmin}\underbrace{{1\over2}(g-F(\theta))^T(g-F(\theta))}_{\text{f}(\theta)}

enter image description here

share|improve this answer
I'm still not convinced that the "f" should be upright. Also \operatorname{\mathbf{argmin}} is more correct and \over should be changed into \frac or perhaps \dfrac. – egreg Dec 27 '12 at 12:55
@egreg Indeed I didn't pay too much attention to the content but rather trying to replicate the problem. So I just tried to make it work. – percusse Dec 27 '12 at 23:34

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