Two equations on the same line












5














I have seen some posts close to what I need, but not quite what I need.



I would like to produce two equations on the same line with one equation number adjusted to left and one to the right. Both equations should be multiline.



And I want to generate a tag for both equation labels.



So the output should look like what is produced by the code below.



begin{array}{llrr}
& a=b & x=y & \
(eq1) & c=d & y=z & (eq2) \
& e=f & u=v
end{array}









share|improve this question









New contributor




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




















  • 1) Welcome. 2) Please provide a so-called MWE: tex.meta.stackexchange.com/questions/228. 3) Maybe you can provide a link to the close posts that you are referring to. 4) At least I have trouble understanding exactly what you want to achieve. Maybe you can draw an example/illustration by hand and provide the picture. 5) I also enjoyed the movie District 9 (assuming you are referring to it with your name) :).
    – Dr. Manuel Kuehner
    14 hours ago


















5














I have seen some posts close to what I need, but not quite what I need.



I would like to produce two equations on the same line with one equation number adjusted to left and one to the right. Both equations should be multiline.



And I want to generate a tag for both equation labels.



So the output should look like what is produced by the code below.



begin{array}{llrr}
& a=b & x=y & \
(eq1) & c=d & y=z & (eq2) \
& e=f & u=v
end{array}









share|improve this question









New contributor




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




















  • 1) Welcome. 2) Please provide a so-called MWE: tex.meta.stackexchange.com/questions/228. 3) Maybe you can provide a link to the close posts that you are referring to. 4) At least I have trouble understanding exactly what you want to achieve. Maybe you can draw an example/illustration by hand and provide the picture. 5) I also enjoyed the movie District 9 (assuming you are referring to it with your name) :).
    – Dr. Manuel Kuehner
    14 hours ago
















5












5








5


0





I have seen some posts close to what I need, but not quite what I need.



I would like to produce two equations on the same line with one equation number adjusted to left and one to the right. Both equations should be multiline.



And I want to generate a tag for both equation labels.



So the output should look like what is produced by the code below.



begin{array}{llrr}
& a=b & x=y & \
(eq1) & c=d & y=z & (eq2) \
& e=f & u=v
end{array}









share|improve this question









New contributor




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











I have seen some posts close to what I need, but not quite what I need.



I would like to produce two equations on the same line with one equation number adjusted to left and one to the right. Both equations should be multiline.



And I want to generate a tag for both equation labels.



So the output should look like what is produced by the code below.



begin{array}{llrr}
& a=b & x=y & \
(eq1) & c=d & y=z & (eq2) \
& e=f & u=v
end{array}






equations line






share|improve this question









New contributor




district9 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




district9 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 3 hours ago









Peter Mortensen

54136




54136






New contributor




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









asked 14 hours ago









district9

262




262




New contributor




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





New contributor





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






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












  • 1) Welcome. 2) Please provide a so-called MWE: tex.meta.stackexchange.com/questions/228. 3) Maybe you can provide a link to the close posts that you are referring to. 4) At least I have trouble understanding exactly what you want to achieve. Maybe you can draw an example/illustration by hand and provide the picture. 5) I also enjoyed the movie District 9 (assuming you are referring to it with your name) :).
    – Dr. Manuel Kuehner
    14 hours ago




















  • 1) Welcome. 2) Please provide a so-called MWE: tex.meta.stackexchange.com/questions/228. 3) Maybe you can provide a link to the close posts that you are referring to. 4) At least I have trouble understanding exactly what you want to achieve. Maybe you can draw an example/illustration by hand and provide the picture. 5) I also enjoyed the movie District 9 (assuming you are referring to it with your name) :).
    – Dr. Manuel Kuehner
    14 hours ago


















1) Welcome. 2) Please provide a so-called MWE: tex.meta.stackexchange.com/questions/228. 3) Maybe you can provide a link to the close posts that you are referring to. 4) At least I have trouble understanding exactly what you want to achieve. Maybe you can draw an example/illustration by hand and provide the picture. 5) I also enjoyed the movie District 9 (assuming you are referring to it with your name) :).
– Dr. Manuel Kuehner
14 hours ago






1) Welcome. 2) Please provide a so-called MWE: tex.meta.stackexchange.com/questions/228. 3) Maybe you can provide a link to the close posts that you are referring to. 4) At least I have trouble understanding exactly what you want to achieve. Maybe you can draw an example/illustration by hand and provide the picture. 5) I also enjoyed the movie District 9 (assuming you are referring to it with your name) :).
– Dr. Manuel Kuehner
14 hours ago












3 Answers
3






active

oldest

votes


















6














I propose this solution, with a code borrowed on this site from @DavidCarlisle:



documentclass{article}
usepackage[utf8]{inputenc}%
usepackage{tabularx}
usepackage{mathtools, nccmath}

makeatletter
newcommand{leqnomode}{tagsleft@trueletveqno@@leqno}%
newcommand{reqnomode}{tagsleft@falseletveqno@@eqno}%
newcommand*{compress}{@minipagetrue}
makeatother

begin{document}

Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.

{centeringcompress
begin{tabularx}{linewidth}{>{leqnomode}XX}
begin{equation}
begin{aligned}
a & =b \
c & =d \
e & =f
end{aligned}
end{equation}
&
begin{equation}
begin{aligned}
x & =y \
y & =z \
u & =v
end{aligned}
end{equation}
end{tabularx} vspace{-baselineskip}}

Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

end{document}


enter image description here






share|improve this answer





















  • Thank you. Nice to have all these options.
    – district9
    10 hours ago



















5














Like this:



Enter image description here



documentclass{article}
usepackage{tabularx}
newcolumntype{C}{>{centeringarraybackslash}X}
usepackage{amsmath}

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
begin{tabularx}{linewidth}{@{} lCCr @{}}
refstepcounter{equation}
(theequation)label{eq:left}
& $begin{aligned}
a & = b \
c & = d
end{aligned}$
& $begin{aligned}
x & = y \
z & = w
end{aligned}$
& refstepcounter{equation}
(theequation)label{eq:right}
end{tabularx}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Addendum: I figured out how to use my own tags for equations:



documentclass{article}

usepackage{amsmath}
makeatletter
newcommand{leqnomode}{tagsleft@true}
newcommand{reqnomode}{tagsleft@false}
makeatother

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
vspace{-baselineskip}
begin{minipage}{0.5linewidth}leqnomode
begin{equation}label{eq:left}
begin{split}
a & = b \
c & = d
end{split}tag{*}
end{equation}
end{minipage}begin{minipage}{0.5linewidth}
begin{equation}label{eq:right}
begin{split}
x & = y \
z & = uvw
end{split}tag{**}
end{equation}
end{minipage}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Enter image description here






share|improve this answer























  • +1: So there is no pre-defined environment for this kind of equation layout?
    – Dr. Manuel Kuehner
    13 hours ago










  • Thank you, this works. One more thing I need is: I want to define my own tags, say myeq1" and myeq2" to show up in place of (1) and (2). So far I could not figure out where to insert tag{myeq1} and tag{myeq2} without getting an error message from Latex.
    – district9
    13 hours ago










  • @district9, using tag{...} command is not possible here. you can insert in place of the theequation the content of tag, however, tags is not possible to cite in text.
    – Zarko
    13 hours ago










  • @Zarko: Thank you. Well, in my paper the tag would be essential, and I would even want to use it with hypperref. (If I click on an equation number, then I should be taken to the equation).
    – district9
    13 hours ago










  • @district9, see edited answer.
    – Zarko
    12 hours ago



















2














I'm not sure it is a good idea.



documentclass{article}
usepackage{amsmath}
usepackage{array}
usepackage{lipsum} % for context

newenvironment{doublynumberedequation}[2]
{%
unskip
refstepcounter{equation}label{#1}%
refstepcounter{equation}label{#2}%
defsecondlabel{#2}%
begin{equation*}
begin{tabular*}{displaywidth}{
@{extracolsep{stretch{1}}}
l
>{$displaystyle}c<{$}
@{extracolsep{stretch{2}}}
>{$displaystyle}c<{$}
@{extracolsep{stretch{1}}}
r
@{}
}
eqref{#1} &
}
{& eqref{secondlabel}end{tabular*}end{equation*}}

begin{document}

lipsum*[4]
begin{doublynumberedequation}{left}{right}% use two meaningful labels
begin{aligned}
a&=b \
c&=d \
e&=f
end{aligned}
&
begin{aligned}
x&=y \
y&=z \
u&=v
end{aligned}
end{doublynumberedequation}
lipsum[5]

end{document}


enter image description here






share|improve this answer





















  • Thank you everyone!
    – district9
    11 hours ago











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',
autoActivateHeartbeat: false,
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
});


}
});






district9 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%2f467784%2ftwo-equations-on-the-same-line%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









6














I propose this solution, with a code borrowed on this site from @DavidCarlisle:



documentclass{article}
usepackage[utf8]{inputenc}%
usepackage{tabularx}
usepackage{mathtools, nccmath}

makeatletter
newcommand{leqnomode}{tagsleft@trueletveqno@@leqno}%
newcommand{reqnomode}{tagsleft@falseletveqno@@eqno}%
newcommand*{compress}{@minipagetrue}
makeatother

begin{document}

Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.

{centeringcompress
begin{tabularx}{linewidth}{>{leqnomode}XX}
begin{equation}
begin{aligned}
a & =b \
c & =d \
e & =f
end{aligned}
end{equation}
&
begin{equation}
begin{aligned}
x & =y \
y & =z \
u & =v
end{aligned}
end{equation}
end{tabularx} vspace{-baselineskip}}

Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

end{document}


enter image description here






share|improve this answer





















  • Thank you. Nice to have all these options.
    – district9
    10 hours ago
















6














I propose this solution, with a code borrowed on this site from @DavidCarlisle:



documentclass{article}
usepackage[utf8]{inputenc}%
usepackage{tabularx}
usepackage{mathtools, nccmath}

makeatletter
newcommand{leqnomode}{tagsleft@trueletveqno@@leqno}%
newcommand{reqnomode}{tagsleft@falseletveqno@@eqno}%
newcommand*{compress}{@minipagetrue}
makeatother

begin{document}

Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.

{centeringcompress
begin{tabularx}{linewidth}{>{leqnomode}XX}
begin{equation}
begin{aligned}
a & =b \
c & =d \
e & =f
end{aligned}
end{equation}
&
begin{equation}
begin{aligned}
x & =y \
y & =z \
u & =v
end{aligned}
end{equation}
end{tabularx} vspace{-baselineskip}}

Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

end{document}


enter image description here






share|improve this answer





















  • Thank you. Nice to have all these options.
    – district9
    10 hours ago














6












6








6






I propose this solution, with a code borrowed on this site from @DavidCarlisle:



documentclass{article}
usepackage[utf8]{inputenc}%
usepackage{tabularx}
usepackage{mathtools, nccmath}

makeatletter
newcommand{leqnomode}{tagsleft@trueletveqno@@leqno}%
newcommand{reqnomode}{tagsleft@falseletveqno@@eqno}%
newcommand*{compress}{@minipagetrue}
makeatother

begin{document}

Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.

{centeringcompress
begin{tabularx}{linewidth}{>{leqnomode}XX}
begin{equation}
begin{aligned}
a & =b \
c & =d \
e & =f
end{aligned}
end{equation}
&
begin{equation}
begin{aligned}
x & =y \
y & =z \
u & =v
end{aligned}
end{equation}
end{tabularx} vspace{-baselineskip}}

Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

end{document}


enter image description here






share|improve this answer












I propose this solution, with a code borrowed on this site from @DavidCarlisle:



documentclass{article}
usepackage[utf8]{inputenc}%
usepackage{tabularx}
usepackage{mathtools, nccmath}

makeatletter
newcommand{leqnomode}{tagsleft@trueletveqno@@leqno}%
newcommand{reqnomode}{tagsleft@falseletveqno@@eqno}%
newcommand*{compress}{@minipagetrue}
makeatother

begin{document}

Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.

{centeringcompress
begin{tabularx}{linewidth}{>{leqnomode}XX}
begin{equation}
begin{aligned}
a & =b \
c & =d \
e & =f
end{aligned}
end{equation}
&
begin{equation}
begin{aligned}
x & =y \
y & =z \
u & =v
end{aligned}
end{equation}
end{tabularx} vspace{-baselineskip}}

Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 12 hours ago









Bernard

165k769193




165k769193












  • Thank you. Nice to have all these options.
    – district9
    10 hours ago


















  • Thank you. Nice to have all these options.
    – district9
    10 hours ago
















Thank you. Nice to have all these options.
– district9
10 hours ago




Thank you. Nice to have all these options.
– district9
10 hours ago











5














Like this:



Enter image description here



documentclass{article}
usepackage{tabularx}
newcolumntype{C}{>{centeringarraybackslash}X}
usepackage{amsmath}

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
begin{tabularx}{linewidth}{@{} lCCr @{}}
refstepcounter{equation}
(theequation)label{eq:left}
& $begin{aligned}
a & = b \
c & = d
end{aligned}$
& $begin{aligned}
x & = y \
z & = w
end{aligned}$
& refstepcounter{equation}
(theequation)label{eq:right}
end{tabularx}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Addendum: I figured out how to use my own tags for equations:



documentclass{article}

usepackage{amsmath}
makeatletter
newcommand{leqnomode}{tagsleft@true}
newcommand{reqnomode}{tagsleft@false}
makeatother

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
vspace{-baselineskip}
begin{minipage}{0.5linewidth}leqnomode
begin{equation}label{eq:left}
begin{split}
a & = b \
c & = d
end{split}tag{*}
end{equation}
end{minipage}begin{minipage}{0.5linewidth}
begin{equation}label{eq:right}
begin{split}
x & = y \
z & = uvw
end{split}tag{**}
end{equation}
end{minipage}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Enter image description here






share|improve this answer























  • +1: So there is no pre-defined environment for this kind of equation layout?
    – Dr. Manuel Kuehner
    13 hours ago










  • Thank you, this works. One more thing I need is: I want to define my own tags, say myeq1" and myeq2" to show up in place of (1) and (2). So far I could not figure out where to insert tag{myeq1} and tag{myeq2} without getting an error message from Latex.
    – district9
    13 hours ago










  • @district9, using tag{...} command is not possible here. you can insert in place of the theequation the content of tag, however, tags is not possible to cite in text.
    – Zarko
    13 hours ago










  • @Zarko: Thank you. Well, in my paper the tag would be essential, and I would even want to use it with hypperref. (If I click on an equation number, then I should be taken to the equation).
    – district9
    13 hours ago










  • @district9, see edited answer.
    – Zarko
    12 hours ago
















5














Like this:



Enter image description here



documentclass{article}
usepackage{tabularx}
newcolumntype{C}{>{centeringarraybackslash}X}
usepackage{amsmath}

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
begin{tabularx}{linewidth}{@{} lCCr @{}}
refstepcounter{equation}
(theequation)label{eq:left}
& $begin{aligned}
a & = b \
c & = d
end{aligned}$
& $begin{aligned}
x & = y \
z & = w
end{aligned}$
& refstepcounter{equation}
(theequation)label{eq:right}
end{tabularx}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Addendum: I figured out how to use my own tags for equations:



documentclass{article}

usepackage{amsmath}
makeatletter
newcommand{leqnomode}{tagsleft@true}
newcommand{reqnomode}{tagsleft@false}
makeatother

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
vspace{-baselineskip}
begin{minipage}{0.5linewidth}leqnomode
begin{equation}label{eq:left}
begin{split}
a & = b \
c & = d
end{split}tag{*}
end{equation}
end{minipage}begin{minipage}{0.5linewidth}
begin{equation}label{eq:right}
begin{split}
x & = y \
z & = uvw
end{split}tag{**}
end{equation}
end{minipage}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Enter image description here






share|improve this answer























  • +1: So there is no pre-defined environment for this kind of equation layout?
    – Dr. Manuel Kuehner
    13 hours ago










  • Thank you, this works. One more thing I need is: I want to define my own tags, say myeq1" and myeq2" to show up in place of (1) and (2). So far I could not figure out where to insert tag{myeq1} and tag{myeq2} without getting an error message from Latex.
    – district9
    13 hours ago










  • @district9, using tag{...} command is not possible here. you can insert in place of the theequation the content of tag, however, tags is not possible to cite in text.
    – Zarko
    13 hours ago










  • @Zarko: Thank you. Well, in my paper the tag would be essential, and I would even want to use it with hypperref. (If I click on an equation number, then I should be taken to the equation).
    – district9
    13 hours ago










  • @district9, see edited answer.
    – Zarko
    12 hours ago














5












5








5






Like this:



Enter image description here



documentclass{article}
usepackage{tabularx}
newcolumntype{C}{>{centeringarraybackslash}X}
usepackage{amsmath}

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
begin{tabularx}{linewidth}{@{} lCCr @{}}
refstepcounter{equation}
(theequation)label{eq:left}
& $begin{aligned}
a & = b \
c & = d
end{aligned}$
& $begin{aligned}
x & = y \
z & = w
end{aligned}$
& refstepcounter{equation}
(theequation)label{eq:right}
end{tabularx}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Addendum: I figured out how to use my own tags for equations:



documentclass{article}

usepackage{amsmath}
makeatletter
newcommand{leqnomode}{tagsleft@true}
newcommand{reqnomode}{tagsleft@false}
makeatother

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
vspace{-baselineskip}
begin{minipage}{0.5linewidth}leqnomode
begin{equation}label{eq:left}
begin{split}
a & = b \
c & = d
end{split}tag{*}
end{equation}
end{minipage}begin{minipage}{0.5linewidth}
begin{equation}label{eq:right}
begin{split}
x & = y \
z & = uvw
end{split}tag{**}
end{equation}
end{minipage}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Enter image description here






share|improve this answer














Like this:



Enter image description here



documentclass{article}
usepackage{tabularx}
newcolumntype{C}{>{centeringarraybackslash}X}
usepackage{amsmath}

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
begin{tabularx}{linewidth}{@{} lCCr @{}}
refstepcounter{equation}
(theequation)label{eq:left}
& $begin{aligned}
a & = b \
c & = d
end{aligned}$
& $begin{aligned}
x & = y \
z & = w
end{aligned}$
& refstepcounter{equation}
(theequation)label{eq:right}
end{tabularx}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Addendum: I figured out how to use my own tags for equations:



documentclass{article}

usepackage{amsmath}
makeatletter
newcommand{leqnomode}{tagsleft@true}
newcommand{reqnomode}{tagsleft@false}
makeatother

%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%
usepackage{lipsum}

begin{document}
lipsum*[66]
begin{center}
vspace{-baselineskip}
begin{minipage}{0.5linewidth}leqnomode
begin{equation}label{eq:left}
begin{split}
a & = b \
c & = d
end{split}tag{*}
end{equation}
end{minipage}begin{minipage}{0.5linewidth}
begin{equation}label{eq:right}
begin{split}
x & = y \
z & = uvw
end{split}tag{**}
end{equation}
end{minipage}
end{center}
dots, see eqref{eq:left} and eqref{eq:right} dots
lipsum*[66]
end{document}


Enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 4 hours ago









Peter Mortensen

54136




54136










answered 13 hours ago









Zarko

121k865156




121k865156












  • +1: So there is no pre-defined environment for this kind of equation layout?
    – Dr. Manuel Kuehner
    13 hours ago










  • Thank you, this works. One more thing I need is: I want to define my own tags, say myeq1" and myeq2" to show up in place of (1) and (2). So far I could not figure out where to insert tag{myeq1} and tag{myeq2} without getting an error message from Latex.
    – district9
    13 hours ago










  • @district9, using tag{...} command is not possible here. you can insert in place of the theequation the content of tag, however, tags is not possible to cite in text.
    – Zarko
    13 hours ago










  • @Zarko: Thank you. Well, in my paper the tag would be essential, and I would even want to use it with hypperref. (If I click on an equation number, then I should be taken to the equation).
    – district9
    13 hours ago










  • @district9, see edited answer.
    – Zarko
    12 hours ago


















  • +1: So there is no pre-defined environment for this kind of equation layout?
    – Dr. Manuel Kuehner
    13 hours ago










  • Thank you, this works. One more thing I need is: I want to define my own tags, say myeq1" and myeq2" to show up in place of (1) and (2). So far I could not figure out where to insert tag{myeq1} and tag{myeq2} without getting an error message from Latex.
    – district9
    13 hours ago










  • @district9, using tag{...} command is not possible here. you can insert in place of the theequation the content of tag, however, tags is not possible to cite in text.
    – Zarko
    13 hours ago










  • @Zarko: Thank you. Well, in my paper the tag would be essential, and I would even want to use it with hypperref. (If I click on an equation number, then I should be taken to the equation).
    – district9
    13 hours ago










  • @district9, see edited answer.
    – Zarko
    12 hours ago
















+1: So there is no pre-defined environment for this kind of equation layout?
– Dr. Manuel Kuehner
13 hours ago




+1: So there is no pre-defined environment for this kind of equation layout?
– Dr. Manuel Kuehner
13 hours ago












Thank you, this works. One more thing I need is: I want to define my own tags, say myeq1" and myeq2" to show up in place of (1) and (2). So far I could not figure out where to insert tag{myeq1} and tag{myeq2} without getting an error message from Latex.
– district9
13 hours ago




Thank you, this works. One more thing I need is: I want to define my own tags, say myeq1" and myeq2" to show up in place of (1) and (2). So far I could not figure out where to insert tag{myeq1} and tag{myeq2} without getting an error message from Latex.
– district9
13 hours ago












@district9, using tag{...} command is not possible here. you can insert in place of the theequation the content of tag, however, tags is not possible to cite in text.
– Zarko
13 hours ago




@district9, using tag{...} command is not possible here. you can insert in place of the theequation the content of tag, however, tags is not possible to cite in text.
– Zarko
13 hours ago












@Zarko: Thank you. Well, in my paper the tag would be essential, and I would even want to use it with hypperref. (If I click on an equation number, then I should be taken to the equation).
– district9
13 hours ago




@Zarko: Thank you. Well, in my paper the tag would be essential, and I would even want to use it with hypperref. (If I click on an equation number, then I should be taken to the equation).
– district9
13 hours ago












@district9, see edited answer.
– Zarko
12 hours ago




@district9, see edited answer.
– Zarko
12 hours ago











2














I'm not sure it is a good idea.



documentclass{article}
usepackage{amsmath}
usepackage{array}
usepackage{lipsum} % for context

newenvironment{doublynumberedequation}[2]
{%
unskip
refstepcounter{equation}label{#1}%
refstepcounter{equation}label{#2}%
defsecondlabel{#2}%
begin{equation*}
begin{tabular*}{displaywidth}{
@{extracolsep{stretch{1}}}
l
>{$displaystyle}c<{$}
@{extracolsep{stretch{2}}}
>{$displaystyle}c<{$}
@{extracolsep{stretch{1}}}
r
@{}
}
eqref{#1} &
}
{& eqref{secondlabel}end{tabular*}end{equation*}}

begin{document}

lipsum*[4]
begin{doublynumberedequation}{left}{right}% use two meaningful labels
begin{aligned}
a&=b \
c&=d \
e&=f
end{aligned}
&
begin{aligned}
x&=y \
y&=z \
u&=v
end{aligned}
end{doublynumberedequation}
lipsum[5]

end{document}


enter image description here






share|improve this answer





















  • Thank you everyone!
    – district9
    11 hours ago
















2














I'm not sure it is a good idea.



documentclass{article}
usepackage{amsmath}
usepackage{array}
usepackage{lipsum} % for context

newenvironment{doublynumberedequation}[2]
{%
unskip
refstepcounter{equation}label{#1}%
refstepcounter{equation}label{#2}%
defsecondlabel{#2}%
begin{equation*}
begin{tabular*}{displaywidth}{
@{extracolsep{stretch{1}}}
l
>{$displaystyle}c<{$}
@{extracolsep{stretch{2}}}
>{$displaystyle}c<{$}
@{extracolsep{stretch{1}}}
r
@{}
}
eqref{#1} &
}
{& eqref{secondlabel}end{tabular*}end{equation*}}

begin{document}

lipsum*[4]
begin{doublynumberedequation}{left}{right}% use two meaningful labels
begin{aligned}
a&=b \
c&=d \
e&=f
end{aligned}
&
begin{aligned}
x&=y \
y&=z \
u&=v
end{aligned}
end{doublynumberedequation}
lipsum[5]

end{document}


enter image description here






share|improve this answer





















  • Thank you everyone!
    – district9
    11 hours ago














2












2








2






I'm not sure it is a good idea.



documentclass{article}
usepackage{amsmath}
usepackage{array}
usepackage{lipsum} % for context

newenvironment{doublynumberedequation}[2]
{%
unskip
refstepcounter{equation}label{#1}%
refstepcounter{equation}label{#2}%
defsecondlabel{#2}%
begin{equation*}
begin{tabular*}{displaywidth}{
@{extracolsep{stretch{1}}}
l
>{$displaystyle}c<{$}
@{extracolsep{stretch{2}}}
>{$displaystyle}c<{$}
@{extracolsep{stretch{1}}}
r
@{}
}
eqref{#1} &
}
{& eqref{secondlabel}end{tabular*}end{equation*}}

begin{document}

lipsum*[4]
begin{doublynumberedequation}{left}{right}% use two meaningful labels
begin{aligned}
a&=b \
c&=d \
e&=f
end{aligned}
&
begin{aligned}
x&=y \
y&=z \
u&=v
end{aligned}
end{doublynumberedequation}
lipsum[5]

end{document}


enter image description here






share|improve this answer












I'm not sure it is a good idea.



documentclass{article}
usepackage{amsmath}
usepackage{array}
usepackage{lipsum} % for context

newenvironment{doublynumberedequation}[2]
{%
unskip
refstepcounter{equation}label{#1}%
refstepcounter{equation}label{#2}%
defsecondlabel{#2}%
begin{equation*}
begin{tabular*}{displaywidth}{
@{extracolsep{stretch{1}}}
l
>{$displaystyle}c<{$}
@{extracolsep{stretch{2}}}
>{$displaystyle}c<{$}
@{extracolsep{stretch{1}}}
r
@{}
}
eqref{#1} &
}
{& eqref{secondlabel}end{tabular*}end{equation*}}

begin{document}

lipsum*[4]
begin{doublynumberedequation}{left}{right}% use two meaningful labels
begin{aligned}
a&=b \
c&=d \
e&=f
end{aligned}
&
begin{aligned}
x&=y \
y&=z \
u&=v
end{aligned}
end{doublynumberedequation}
lipsum[5]

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 12 hours ago









egreg

708k8618823163




708k8618823163












  • Thank you everyone!
    – district9
    11 hours ago


















  • Thank you everyone!
    – district9
    11 hours ago
















Thank you everyone!
– district9
11 hours ago




Thank you everyone!
– district9
11 hours ago










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










draft saved

draft discarded


















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













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












district9 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%2f467784%2ftwo-equations-on-the-same-line%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

What visual should I use to simply compare current year value vs last year in Power BI desktop

Alexandru Averescu

Trompette piccolo