Custom label for optidef

2018-03-19 17:26:42

I have an optimization problem as follows

\begin{mini}|l|

{}{f(x)}{}{}

\label{generalP1}

\addConstraint{g_{j}(x)}{\le 0, j = 1, \hdots, m}

\addConstraint{ x }{\in \mathcal{C}}

\end{mini}

The label appears as (1) but I would like to change the label to my own labeling like say $\alpha$

I tried looking at optidef package's documentation but I couldn't find anything helpful. Any way how to tackle this?

The mini environment is actually a wrapper for an equation and alignat environments. And as the equation environment, the starred version does not produce a number, and you can put a \tag instead.

This will do:

\documentclass{article}

\usepackage{optidef}

\begin{document}

\begin{mini*}|l|

{}{f(x)}{}{}

\label{generalP1}

\addConstraint{g_{j}(x)}{\le 0, j = 1, \hdots, m}\tag{$\alpha$}

\addConstraint{ x }{\in \mathcal{C}}

\end{mini*}

\end{document}

  • The mini environment is actually a wrapper for an equation and alignat environments. And as the equation environment, the starred version does not produce a number, and you can put a \tag instead.

    This will do:

    \documentclass{article}

    \usepackage{optidef}

    \begin{document}

    \begin{mini*}|l|

    {}{f(x)}{}{}

    \label{generalP1}

    \addConstraint{g_{j}(x)}{\le 0, j = 1, \hdots, m}\tag{$\alpha$}

    \addConstraint{ x }{\in \mathcal{C}}

    \end{mini*}

    \end{document}

    2018-03-19 18:48:17