center text and equation











up vote
1
down vote

favorite












how can I center the first equation Max $Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}$ and the text "s.a" with the other equations below ?



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}


begin{document}
Luego el modelo matemático queda planteado como se muestra a continuación:\

Max $Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}$

s.a

begin{equation}
x_{1} + x_{2} + x_{3} + x_{4} + x_{5} leq 1.000.000
label{eqn:p1-r1}
end{equation}
begin{equation}
x_{1} + x_{2} leq 0.3(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r2}
end{equation}
begin{equation}
x_{4} geq x_{5}
label{eqn:p1-r3}
end{equation}
begin{equation}
x_{3} + x_{4} leq 0.5(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r4}
end{equation}
begin{equation}
x_{4} geq 0.25(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r5}
end{equation}

begin{itemize}
item Resuelva el problema mediante el software de optimización OPL –CPLEX, y entregue la Solución y Valor
Optimo.\
end{itemize}

end{document}









share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Welcome to TeX SX! Could you post a full compilable code?
    – Bernard
    Nov 23 at 19:55








  • 1




    @EmiliOrtega please add a compilable MWE. Though not THE way to typeset these type of equation. You can do it by using display-math style. Replace $...$ by [...].
    – Raaja
    Nov 23 at 19:55












  • I added compilable code right now! @Raaja I didn't get what you meant by "display-math"
    – EmiliOrtega
    Nov 23 at 20:37










  • since you're using amsmath, you might use the gather environment (with \ to separate lines) instead of entering each line as a separate equation. and don't leave a blank line before any single or multi-line equation block. the blank line will not prevent a page break (which is not desirable in such a location), and the use of a multi-line environment like gather will allow better control over page breaks between lines.
    – barbara beeton
    Nov 23 at 22:59















up vote
1
down vote

favorite












how can I center the first equation Max $Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}$ and the text "s.a" with the other equations below ?



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}


begin{document}
Luego el modelo matemático queda planteado como se muestra a continuación:\

Max $Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}$

s.a

begin{equation}
x_{1} + x_{2} + x_{3} + x_{4} + x_{5} leq 1.000.000
label{eqn:p1-r1}
end{equation}
begin{equation}
x_{1} + x_{2} leq 0.3(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r2}
end{equation}
begin{equation}
x_{4} geq x_{5}
label{eqn:p1-r3}
end{equation}
begin{equation}
x_{3} + x_{4} leq 0.5(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r4}
end{equation}
begin{equation}
x_{4} geq 0.25(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r5}
end{equation}

begin{itemize}
item Resuelva el problema mediante el software de optimización OPL –CPLEX, y entregue la Solución y Valor
Optimo.\
end{itemize}

end{document}









share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Welcome to TeX SX! Could you post a full compilable code?
    – Bernard
    Nov 23 at 19:55








  • 1




    @EmiliOrtega please add a compilable MWE. Though not THE way to typeset these type of equation. You can do it by using display-math style. Replace $...$ by [...].
    – Raaja
    Nov 23 at 19:55












  • I added compilable code right now! @Raaja I didn't get what you meant by "display-math"
    – EmiliOrtega
    Nov 23 at 20:37










  • since you're using amsmath, you might use the gather environment (with \ to separate lines) instead of entering each line as a separate equation. and don't leave a blank line before any single or multi-line equation block. the blank line will not prevent a page break (which is not desirable in such a location), and the use of a multi-line environment like gather will allow better control over page breaks between lines.
    – barbara beeton
    Nov 23 at 22:59













up vote
1
down vote

favorite









up vote
1
down vote

favorite











how can I center the first equation Max $Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}$ and the text "s.a" with the other equations below ?



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}


begin{document}
Luego el modelo matemático queda planteado como se muestra a continuación:\

Max $Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}$

s.a

begin{equation}
x_{1} + x_{2} + x_{3} + x_{4} + x_{5} leq 1.000.000
label{eqn:p1-r1}
end{equation}
begin{equation}
x_{1} + x_{2} leq 0.3(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r2}
end{equation}
begin{equation}
x_{4} geq x_{5}
label{eqn:p1-r3}
end{equation}
begin{equation}
x_{3} + x_{4} leq 0.5(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r4}
end{equation}
begin{equation}
x_{4} geq 0.25(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r5}
end{equation}

begin{itemize}
item Resuelva el problema mediante el software de optimización OPL –CPLEX, y entregue la Solución y Valor
Optimo.\
end{itemize}

end{document}









share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











how can I center the first equation Max $Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}$ and the text "s.a" with the other equations below ?



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}


begin{document}
Luego el modelo matemático queda planteado como se muestra a continuación:\

Max $Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}$

s.a

begin{equation}
x_{1} + x_{2} + x_{3} + x_{4} + x_{5} leq 1.000.000
label{eqn:p1-r1}
end{equation}
begin{equation}
x_{1} + x_{2} leq 0.3(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r2}
end{equation}
begin{equation}
x_{4} geq x_{5}
label{eqn:p1-r3}
end{equation}
begin{equation}
x_{3} + x_{4} leq 0.5(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r4}
end{equation}
begin{equation}
x_{4} geq 0.25(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r5}
end{equation}

begin{itemize}
item Resuelva el problema mediante el software de optimización OPL –CPLEX, y entregue la Solución y Valor
Optimo.\
end{itemize}

end{document}






horizontal-alignment






share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 23 at 20:36





















New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 23 at 19:51









EmiliOrtega

62




62




New contributor




EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






EmiliOrtega is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    Welcome to TeX SX! Could you post a full compilable code?
    – Bernard
    Nov 23 at 19:55








  • 1




    @EmiliOrtega please add a compilable MWE. Though not THE way to typeset these type of equation. You can do it by using display-math style. Replace $...$ by [...].
    – Raaja
    Nov 23 at 19:55












  • I added compilable code right now! @Raaja I didn't get what you meant by "display-math"
    – EmiliOrtega
    Nov 23 at 20:37










  • since you're using amsmath, you might use the gather environment (with \ to separate lines) instead of entering each line as a separate equation. and don't leave a blank line before any single or multi-line equation block. the blank line will not prevent a page break (which is not desirable in such a location), and the use of a multi-line environment like gather will allow better control over page breaks between lines.
    – barbara beeton
    Nov 23 at 22:59














  • 1




    Welcome to TeX SX! Could you post a full compilable code?
    – Bernard
    Nov 23 at 19:55








  • 1




    @EmiliOrtega please add a compilable MWE. Though not THE way to typeset these type of equation. You can do it by using display-math style. Replace $...$ by [...].
    – Raaja
    Nov 23 at 19:55












  • I added compilable code right now! @Raaja I didn't get what you meant by "display-math"
    – EmiliOrtega
    Nov 23 at 20:37










  • since you're using amsmath, you might use the gather environment (with \ to separate lines) instead of entering each line as a separate equation. and don't leave a blank line before any single or multi-line equation block. the blank line will not prevent a page break (which is not desirable in such a location), and the use of a multi-line environment like gather will allow better control over page breaks between lines.
    – barbara beeton
    Nov 23 at 22:59








1




1




Welcome to TeX SX! Could you post a full compilable code?
– Bernard
Nov 23 at 19:55






Welcome to TeX SX! Could you post a full compilable code?
– Bernard
Nov 23 at 19:55






1




1




@EmiliOrtega please add a compilable MWE. Though not THE way to typeset these type of equation. You can do it by using display-math style. Replace $...$ by [...].
– Raaja
Nov 23 at 19:55






@EmiliOrtega please add a compilable MWE. Though not THE way to typeset these type of equation. You can do it by using display-math style. Replace $...$ by [...].
– Raaja
Nov 23 at 19:55














I added compilable code right now! @Raaja I didn't get what you meant by "display-math"
– EmiliOrtega
Nov 23 at 20:37




I added compilable code right now! @Raaja I didn't get what you meant by "display-math"
– EmiliOrtega
Nov 23 at 20:37












since you're using amsmath, you might use the gather environment (with \ to separate lines) instead of entering each line as a separate equation. and don't leave a blank line before any single or multi-line equation block. the blank line will not prevent a page break (which is not desirable in such a location), and the use of a multi-line environment like gather will allow better control over page breaks between lines.
– barbara beeton
Nov 23 at 22:59




since you're using amsmath, you might use the gather environment (with \ to separate lines) instead of entering each line as a separate equation. and don't leave a blank line before any single or multi-line equation block. the blank line will not prevent a page break (which is not desirable in such a location), and the use of a multi-line environment like gather will allow better control over page breaks between lines.
– barbara beeton
Nov 23 at 22:59










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Method 1: Not-so-correct way is to use display-math style as in:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}

begin{document}
Luego el modelo matemático queda planteado como se muestra a continuación:\

[max Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}]

s.a

begin{equation}
x_{1} + x_{2} + x_{3} + x_{4} + x_{5} leq 1.000.000
label{eqn:p1-r1}
end{equation}
begin{equation}
x_{1} + x_{2} leq 0.3(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r2}
end{equation}
begin{equation}
x_{4} geq x_{5}
label{eqn:p1-r3}
end{equation}
begin{equation}
x_{3} + x_{4} leq 0.5(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r4}
end{equation}
begin{equation}
x_{4} geq 0.25(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r5}
end{equation}

begin{itemize}
item Resuelva el problema mediante el software de optimización OPL –CPLEX, y entregue la Solución y Valor
Optimo.\
end{itemize}

end{document}


with which you will get:



enter image description here



Method 2: The (IMO) current way:



documentclass{article}
usepackage{amsmath}
%https://tex.stackexchange.com/questions/368570/typesetting-an-optimisation-problem
begin{document}
begin{subequations}
begin{alignat}{2}
&!max_{m(t)} &qquad& F(t)=m(t)a(t)^2\
&text{s.a} & & E(t)=m(t)c(t)^2,\
& & & m(t)=text{If I knew I would be the great E}
end{alignat}
end{subequations}
end{document}


to get:



enter image description here






share|improve this answer























  • and how can I move "s.a" at the same horizontal position than "max Z" ?
    – EmiliOrtega
    Nov 23 at 20:50










  • @EmiliOrtega Updated the answer.
    – Raaja
    Nov 23 at 20:54










  • Thanks, I have a question, what is that "&" operator for that you use inside of "alignat" ?
    – EmiliOrtega
    Nov 24 at 21:35










  • @EmiliOrtega It is mostly like a definition or a marker to define the alignment (to the best of my understanding) and you are welcome!
    – Raaja
    Nov 24 at 22:02













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
});


}
});






EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461471%2fcenter-text-and-equation%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
0
down vote













Method 1: Not-so-correct way is to use display-math style as in:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}

begin{document}
Luego el modelo matemático queda planteado como se muestra a continuación:\

[max Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}]

s.a

begin{equation}
x_{1} + x_{2} + x_{3} + x_{4} + x_{5} leq 1.000.000
label{eqn:p1-r1}
end{equation}
begin{equation}
x_{1} + x_{2} leq 0.3(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r2}
end{equation}
begin{equation}
x_{4} geq x_{5}
label{eqn:p1-r3}
end{equation}
begin{equation}
x_{3} + x_{4} leq 0.5(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r4}
end{equation}
begin{equation}
x_{4} geq 0.25(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r5}
end{equation}

begin{itemize}
item Resuelva el problema mediante el software de optimización OPL –CPLEX, y entregue la Solución y Valor
Optimo.\
end{itemize}

end{document}


with which you will get:



enter image description here



Method 2: The (IMO) current way:



documentclass{article}
usepackage{amsmath}
%https://tex.stackexchange.com/questions/368570/typesetting-an-optimisation-problem
begin{document}
begin{subequations}
begin{alignat}{2}
&!max_{m(t)} &qquad& F(t)=m(t)a(t)^2\
&text{s.a} & & E(t)=m(t)c(t)^2,\
& & & m(t)=text{If I knew I would be the great E}
end{alignat}
end{subequations}
end{document}


to get:



enter image description here






share|improve this answer























  • and how can I move "s.a" at the same horizontal position than "max Z" ?
    – EmiliOrtega
    Nov 23 at 20:50










  • @EmiliOrtega Updated the answer.
    – Raaja
    Nov 23 at 20:54










  • Thanks, I have a question, what is that "&" operator for that you use inside of "alignat" ?
    – EmiliOrtega
    Nov 24 at 21:35










  • @EmiliOrtega It is mostly like a definition or a marker to define the alignment (to the best of my understanding) and you are welcome!
    – Raaja
    Nov 24 at 22:02

















up vote
0
down vote













Method 1: Not-so-correct way is to use display-math style as in:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}

begin{document}
Luego el modelo matemático queda planteado como se muestra a continuación:\

[max Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}]

s.a

begin{equation}
x_{1} + x_{2} + x_{3} + x_{4} + x_{5} leq 1.000.000
label{eqn:p1-r1}
end{equation}
begin{equation}
x_{1} + x_{2} leq 0.3(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r2}
end{equation}
begin{equation}
x_{4} geq x_{5}
label{eqn:p1-r3}
end{equation}
begin{equation}
x_{3} + x_{4} leq 0.5(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r4}
end{equation}
begin{equation}
x_{4} geq 0.25(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r5}
end{equation}

begin{itemize}
item Resuelva el problema mediante el software de optimización OPL –CPLEX, y entregue la Solución y Valor
Optimo.\
end{itemize}

end{document}


with which you will get:



enter image description here



Method 2: The (IMO) current way:



documentclass{article}
usepackage{amsmath}
%https://tex.stackexchange.com/questions/368570/typesetting-an-optimisation-problem
begin{document}
begin{subequations}
begin{alignat}{2}
&!max_{m(t)} &qquad& F(t)=m(t)a(t)^2\
&text{s.a} & & E(t)=m(t)c(t)^2,\
& & & m(t)=text{If I knew I would be the great E}
end{alignat}
end{subequations}
end{document}


to get:



enter image description here






share|improve this answer























  • and how can I move "s.a" at the same horizontal position than "max Z" ?
    – EmiliOrtega
    Nov 23 at 20:50










  • @EmiliOrtega Updated the answer.
    – Raaja
    Nov 23 at 20:54










  • Thanks, I have a question, what is that "&" operator for that you use inside of "alignat" ?
    – EmiliOrtega
    Nov 24 at 21:35










  • @EmiliOrtega It is mostly like a definition or a marker to define the alignment (to the best of my understanding) and you are welcome!
    – Raaja
    Nov 24 at 22:02















up vote
0
down vote










up vote
0
down vote









Method 1: Not-so-correct way is to use display-math style as in:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}

begin{document}
Luego el modelo matemático queda planteado como se muestra a continuación:\

[max Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}]

s.a

begin{equation}
x_{1} + x_{2} + x_{3} + x_{4} + x_{5} leq 1.000.000
label{eqn:p1-r1}
end{equation}
begin{equation}
x_{1} + x_{2} leq 0.3(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r2}
end{equation}
begin{equation}
x_{4} geq x_{5}
label{eqn:p1-r3}
end{equation}
begin{equation}
x_{3} + x_{4} leq 0.5(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r4}
end{equation}
begin{equation}
x_{4} geq 0.25(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r5}
end{equation}

begin{itemize}
item Resuelva el problema mediante el software de optimización OPL –CPLEX, y entregue la Solución y Valor
Optimo.\
end{itemize}

end{document}


with which you will get:



enter image description here



Method 2: The (IMO) current way:



documentclass{article}
usepackage{amsmath}
%https://tex.stackexchange.com/questions/368570/typesetting-an-optimisation-problem
begin{document}
begin{subequations}
begin{alignat}{2}
&!max_{m(t)} &qquad& F(t)=m(t)a(t)^2\
&text{s.a} & & E(t)=m(t)c(t)^2,\
& & & m(t)=text{If I knew I would be the great E}
end{alignat}
end{subequations}
end{document}


to get:



enter image description here






share|improve this answer














Method 1: Not-so-correct way is to use display-math style as in:



documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[spanish,es-tabla]{babel} % espanol
decimalpoint
usepackage[utf8]{inputenc}
usepackage{graphicx} % graficos

usepackage{amsmath}

begin{document}
Luego el modelo matemático queda planteado como se muestra a continuación:\

[max Z = 0.15x_{1} + 0.12x_{2} + 0.1x_{3} + 0.05x_{4} + 0.08x_{5}]

s.a

begin{equation}
x_{1} + x_{2} + x_{3} + x_{4} + x_{5} leq 1.000.000
label{eqn:p1-r1}
end{equation}
begin{equation}
x_{1} + x_{2} leq 0.3(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r2}
end{equation}
begin{equation}
x_{4} geq x_{5}
label{eqn:p1-r3}
end{equation}
begin{equation}
x_{3} + x_{4} leq 0.5(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r4}
end{equation}
begin{equation}
x_{4} geq 0.25(x_{1} + x_{2} + x_{3} + x_{4} + x_{5})
label{eqn:p1-r5}
end{equation}

begin{itemize}
item Resuelva el problema mediante el software de optimización OPL –CPLEX, y entregue la Solución y Valor
Optimo.\
end{itemize}

end{document}


with which you will get:



enter image description here



Method 2: The (IMO) current way:



documentclass{article}
usepackage{amsmath}
%https://tex.stackexchange.com/questions/368570/typesetting-an-optimisation-problem
begin{document}
begin{subequations}
begin{alignat}{2}
&!max_{m(t)} &qquad& F(t)=m(t)a(t)^2\
&text{s.a} & & E(t)=m(t)c(t)^2,\
& & & m(t)=text{If I knew I would be the great E}
end{alignat}
end{subequations}
end{document}


to get:



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 23 at 20:51

























answered Nov 23 at 20:41









Raaja

2,0632525




2,0632525












  • and how can I move "s.a" at the same horizontal position than "max Z" ?
    – EmiliOrtega
    Nov 23 at 20:50










  • @EmiliOrtega Updated the answer.
    – Raaja
    Nov 23 at 20:54










  • Thanks, I have a question, what is that "&" operator for that you use inside of "alignat" ?
    – EmiliOrtega
    Nov 24 at 21:35










  • @EmiliOrtega It is mostly like a definition or a marker to define the alignment (to the best of my understanding) and you are welcome!
    – Raaja
    Nov 24 at 22:02




















  • and how can I move "s.a" at the same horizontal position than "max Z" ?
    – EmiliOrtega
    Nov 23 at 20:50










  • @EmiliOrtega Updated the answer.
    – Raaja
    Nov 23 at 20:54










  • Thanks, I have a question, what is that "&" operator for that you use inside of "alignat" ?
    – EmiliOrtega
    Nov 24 at 21:35










  • @EmiliOrtega It is mostly like a definition or a marker to define the alignment (to the best of my understanding) and you are welcome!
    – Raaja
    Nov 24 at 22:02


















and how can I move "s.a" at the same horizontal position than "max Z" ?
– EmiliOrtega
Nov 23 at 20:50




and how can I move "s.a" at the same horizontal position than "max Z" ?
– EmiliOrtega
Nov 23 at 20:50












@EmiliOrtega Updated the answer.
– Raaja
Nov 23 at 20:54




@EmiliOrtega Updated the answer.
– Raaja
Nov 23 at 20:54












Thanks, I have a question, what is that "&" operator for that you use inside of "alignat" ?
– EmiliOrtega
Nov 24 at 21:35




Thanks, I have a question, what is that "&" operator for that you use inside of "alignat" ?
– EmiliOrtega
Nov 24 at 21:35












@EmiliOrtega It is mostly like a definition or a marker to define the alignment (to the best of my understanding) and you are welcome!
– Raaja
Nov 24 at 22:02






@EmiliOrtega It is mostly like a definition or a marker to define the alignment (to the best of my understanding) and you are welcome!
– Raaja
Nov 24 at 22:02












EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.













EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.












EmiliOrtega is a new contributor. Be nice, and check out our Code of Conduct.
















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%2f461471%2fcenter-text-and-equation%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

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?