0

Hi

I'm new in tex and I'm using optidef and xepersian packages in latex.

There is a problem , I can not reference to my optimization problem .

I wrote this simple code :

\begin{argmini}
%\label{cvx_ineq}
{\hat{x}}{S_2(\hat{x})}
{}{}
\addConstraint{||\hat{x}_\mathcal{M}-x_\mathcal{M}||_2^2}{\leq \epsilon^2 }
\end{argmini}

As you can see I commented the label line. (if you uncomment it you'll get an error!).

Is there any way for labeling optimization equations?

Because there was no tag named optidef I just taged xepersian

I would appreciate for your solutions.

Captain
  • 51
  • 5
  • Your label line has a typo: correctly it is \label, while you wrote \lable. If you still have any problem, please, add a complete minimal working example. – bmv Jan 21 '18 at 13:24
  • sorry i corrected that line ,but the problem is same as the previous one – Captain Jan 21 '18 at 13:33

1 Answers1

0

This way you can label it:

\documentclass[]{article}

\usepackage{optidef}

\begin{document} \begin{argmini} {\hat{x}}{S_2(\hat{x})} {\label{opt:cvx_ineq}}{} \addConstraint{||\hat{x}\mathcal{M}-x\mathcal{M}||_2^2}{\leq \epsilon^2 } \end{argmini}

\ref{opt:cvx_ineq} \end{document}

You put the \label in between the \begin{argmini} and its required arguments. That's what was causing the problem.

hjonas
  • 3
Skillmon
  • 60,462