0
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{equation}
\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{equation}

Can anyone help me solve this error?

4
  • Welcome to TeX.Stackexchange! Oct 2 '17 at 23:05
  • 2
    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
  • 2
    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
1

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{equation}
\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{equation}
\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

enter image description here

\documentclass{article}

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

\begin{equation}
\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{equation}
\end{document}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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