Is there a way to replace "minimize" and "maximize" in optidef package with something that will display "exists"? I am wondering how to best typeset an existence problem in optidef, though maybe that's not the right package.
Asked
Active
Viewed 67 times
1 Answers
2
You didn't specify what your intended input or output is. However, as a guess the following approach: you can use the customopti environment with the problem keyword as first (mandatory) argument.
MWE:
\documentclass{article}
\usepackage{optidef}
\begin{document}
\begin{customopti}
{exists}{w}{f(w)+ R(w+6x)}
{\label{eq:Example1}}{}
\addConstraint{g(w)}{=0}
\addConstraint{n(w)}{= 6}
\addConstraint{L(w)+r(x)}{=Kw+p}
\addConstraint{h(x)}{=0.}
\end{customopti}
\end{document}
Result:
Note that this requires the latest version from Github (https://github.com/jeslago/optidef/blob/master/optidef.sty), which is currently (June 2021) not yet on CTAN.
Marijn
- 37,699

\DeclareDocumentEnvironment{exists}, because it silently overwrites the existing command\exists. – egreg Jun 23 '21 at 17:32customoptienvironment inoptidef(see line 795 of https://github.com/jeslago/optidef/blob/master/optidef.sty) though it doesnt seem to be documented and when I tried it, it didn't seem to work for me – rrrrr Jun 23 '21 at 17:41