Aligning multiple equations split











up vote
1
down vote

favorite












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:



immediatewrite18{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}









share|improve this question






















  • 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 at 19:59















up vote
1
down vote

favorite












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:



immediatewrite18{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}









share|improve this question






















  • 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 at 19:59













up vote
1
down vote

favorite









up vote
1
down vote

favorite











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:



immediatewrite18{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}









share|improve this question













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:



immediatewrite18{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}






math-mode equations split






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 3 at 19:51









user151562

2277




2277












  • 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 at 19:59


















  • 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 at 19:59
















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 at 19:59




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 at 19:59










1 Answer
1






active

oldest

votes

















up vote
3
down vote













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






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463031%2faligning-multiple-equations-split%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote













    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






    share|improve this answer

























      up vote
      3
      down vote













      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






      share|improve this answer























        up vote
        3
        down vote










        up vote
        3
        down vote









        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






        share|improve this answer












        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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 3 at 20:16









        Bernard

        164k769192




        164k769192






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463031%2faligning-multiple-equations-split%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?