1

I want to replicate this:

enter image description here

However I got this:

enter image description here

Can anyone help me please?

My MWE is this:

\immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls}
\documentclass[a4paper,11pt,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\usepackage{geometry}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{tablefootnote}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{array}
\usepackage{mathtools}
\usepackage{float}
\usepackage{subfig}
%, nccmath}
\usepackage{siunitx} 
\usepackage{mhchem}
\usepackage{chemfig}    
\usepackage[colorinlistoftodos]{todonotes}
\usepackage[autostyle]{csquotes}
\usepackage{multirow}
\usepackage{xcolor}
\usepackage{booktabs}
\usepackage{soul}
\usepackage{acro}
\usepackage{pgfplots}
\usepackage{enumitem}
\usepackage{lscape}
\usepackage{tabularx}
\usepackage{nomencl}
\makenomenclature
\usepackage{amsmath}
\usepackage{lipsum}
%\usepackage[toc,page]{appendix}
%\usepackage{tikz}
\usetikzlibrary{intersections, calc}
\pgfplotsset{compat=1.14}
\usepackage{filecontents}
\acsetup{first-style=short}

\usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex} 

\addbibresource{example.bib}

\begin{document}

\begin{equation}
\begin{split}
\mathbold{min}~ \nabla f(x)^{T} d  + \frac{1}{2} d^{T} Hd \\
\mathbold{s.t.}~ g_{j}(x) + \nabla g_{j}(x)^{T} d \leq 0 , \quad j  = 1, ..., m, \\
g_{j}(x) + \nabla g_{j}(x)^{T} d = 0 \quad j = m +1, ..., m+l,
\end{split}
\end{equation}

\end{document}
  • For your code there is an error (using Papeeria): /main.tex :37 Package pgfkeys Error: Choice '1.14' unknown in choice key '/pgfplots/compat/anchors'. I am going to ignore this key. [\pgfplotsset{compat=1.14}]. – Sebastiano Dec 3 '18 at 19:59
3

A solution with two (nested) alignedat environments. I removed all unrelated packages. Note you don't have to load amsmath if you load mathtools – the latter does it for you:

\documentclass[a4paper, 11pt, oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
\usepackage{geometry}
\usepackage{mathtools}

\begin{document}

\begin{equation}
\begin{alignedat}{2}
 & \mathbold{min} & \enspace & \nabla f(x)^{T} d + \frac{1}{2} d^{T} Hd \\
 & \mathbold{s.t.} & & \begin{alignedat}[t]{2}
g_{j}(x) + \nabla g_{j}(x)^{T} d & \leq 0 , & \quad j & = 1, ..., m, \\
g_{j}(x) + \nabla g_{j}(x)^{T} d & = 0 & j & = m +1, ..., m+l,
\end{alignedat}
\end{alignedat}
\end{equation}

\end{document} 

enter image description here

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.