# error-how to solve the Undefined control sequence

Undefined control sequence.
l.226 ... 1}} = \mathop {\arg \min }\limits_X {\rm
{ }}L(X,{Y_k},{Z_k},\beta )\\


How to solve issue? which is from:

$$\begin{array}{l} {X_{k + 1}} = \mathop {\arg \min }\limits_X {\rm{ }}L(X,{Y_k},{Z_k},\beta )\\ {\rm{ }} = \mathop {\arg \min }\limits_X {\rm{ }}{\left\| X \right\|_*} + {\raise0.7ex\hbox{\beta } \!\mathord{\left/ {\vphantom {\beta 2}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{2}}\left\| {X - (Y_k - {\raise0.7ex\hbox{1} \!\mathord{\left/ {\vphantom {1 \beta }}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{\beta }}Z_k)} \right\|_F^2 \end{array}$$


Can anyone help me solve this error?

• Welcome to TeX.Stackexchange! Oct 2 '17 at 23:05
• I suspect you have reformatted the error message which makes it very hard to tell which command is undefined. the undefined command is shown by a line break. probably it is \rm which has not been defined by default in latex for 25 years. Oct 2 '17 at 23:07
• what is the intention of this code which is very strange! {\rm{ }} (if you define \rm) is the same as {} \lower and \raise are tex primitives that you wouldn't expect to see in a document, and the whole expression is an equality so should be in a display math enviornment not an array Oct 2 '17 at 23:11
• thank you so much sir, I convert the equation from Mathtype, it works in another template, but shows error in a current conference template in overleaf.
– Peng
Oct 2 '17 at 23:16

You have reformatted the error message which obscures which command is undefined.

Also you did not provide a test file.

If you set your example using article it works without error

\documentclass{article}

\begin{document}

$$\begin{array}{l} {X_{k + 1}} = \mathop {\arg \min }\limits_X {\rm{ }}L(X,{Y_k},{Z_k},\beta )\\ {\rm{ }} = \mathop {\arg \min }\limits_X {\rm{ }}{\left\| X \right\|_*} + {\raise0.7ex\hbox{\beta } \!\mathord{\left/ {\vphantom {\beta 2}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{2}}\left\| {X - (Y_k - {\raise0.7ex\hbox{1} \!\mathord{\left/ {\vphantom {1 \beta }}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{\beta }}Z_k)} \right\|_F^2 \end{array}$$
\end{document}


\documentclass{scrartcl}


koma script defines \rm to give an error:

! Class scrartcl Error: undefined old font command \rm'.

See the scrartcl class documentation for explanation.
Type  H <return>  for immediate help.
...

l.7 ... + 1}} = \mathop {\arg \min }\limits_X {\rm
{ }}L(X,{Y_k},{Z_k},\beta
?


other classes may not define \rm at all in which case you get the primitive undefined command error message but again with a line break highlighting the issue

\documentclass{minimal}


! Undefined control sequence.
l.7 ... + 1}} = \mathop {\arg \min }\limits_X {\rm
{ }}L(X,{Y_k},{Z_k},\beta
?


Normally use of \rm should be replaced by \mathrm but here it is applied to nothing so it is simpler just to delete it \{\rm{ }} is the same as {}.

A more reasonable markup might be

\documentclass{article}

\usepackage{amsmath,nicefrac}
\begin{document}

\begin{aligned} X_{k + 1} &= \mathop {\arg \min }_X L(X,{Y_k},{Z_k},\beta)\\ & = \mathop {\arg \min }_X \| X\|_* + \nicefrac{\beta}{2} \| X - (Y_k - \nicefrac{1}{\beta}Z_k)\|_F^2 \end{aligned}
\end{document}
`