Braces and alignment











up vote
2
down vote

favorite












Alignment problem



begin{align}
begin{cases}
2x + y &= 5 \
2x - 3y &= 1
end{cases} \
hline
0x + 4y &= 4
end{align}


Is there any way to keep all equal signs aligned both inside and outside the cases?










share|improve this question






















  • Welcome to TeX.SE. Just out of idle curiosity: What's the purpose of the curly brace to the left of the first two rows? (Hint: Without that curly brace, a solution would be very simple...)
    – Mico
    Dec 6 at 14:50










  • Yes, without it the alignment becomes easy. The braces are used to represent the linear system, while the last line simply represents the answer.
    – Lean P
    Dec 6 at 15:18

















up vote
2
down vote

favorite












Alignment problem



begin{align}
begin{cases}
2x + y &= 5 \
2x - 3y &= 1
end{cases} \
hline
0x + 4y &= 4
end{align}


Is there any way to keep all equal signs aligned both inside and outside the cases?










share|improve this question






















  • Welcome to TeX.SE. Just out of idle curiosity: What's the purpose of the curly brace to the left of the first two rows? (Hint: Without that curly brace, a solution would be very simple...)
    – Mico
    Dec 6 at 14:50










  • Yes, without it the alignment becomes easy. The braces are used to represent the linear system, while the last line simply represents the answer.
    – Lean P
    Dec 6 at 15:18















up vote
2
down vote

favorite









up vote
2
down vote

favorite











Alignment problem



begin{align}
begin{cases}
2x + y &= 5 \
2x - 3y &= 1
end{cases} \
hline
0x + 4y &= 4
end{align}


Is there any way to keep all equal signs aligned both inside and outside the cases?










share|improve this question













Alignment problem



begin{align}
begin{cases}
2x + y &= 5 \
2x - 3y &= 1
end{cases} \
hline
0x + 4y &= 4
end{align}


Is there any way to keep all equal signs aligned both inside and outside the cases?







math-mode align cases






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 6 at 14:20









Lean P

111




111












  • Welcome to TeX.SE. Just out of idle curiosity: What's the purpose of the curly brace to the left of the first two rows? (Hint: Without that curly brace, a solution would be very simple...)
    – Mico
    Dec 6 at 14:50










  • Yes, without it the alignment becomes easy. The braces are used to represent the linear system, while the last line simply represents the answer.
    – Lean P
    Dec 6 at 15:18




















  • Welcome to TeX.SE. Just out of idle curiosity: What's the purpose of the curly brace to the left of the first two rows? (Hint: Without that curly brace, a solution would be very simple...)
    – Mico
    Dec 6 at 14:50










  • Yes, without it the alignment becomes easy. The braces are used to represent the linear system, while the last line simply represents the answer.
    – Lean P
    Dec 6 at 15:18


















Welcome to TeX.SE. Just out of idle curiosity: What's the purpose of the curly brace to the left of the first two rows? (Hint: Without that curly brace, a solution would be very simple...)
– Mico
Dec 6 at 14:50




Welcome to TeX.SE. Just out of idle curiosity: What's the purpose of the curly brace to the left of the first two rows? (Hint: Without that curly brace, a solution would be very simple...)
– Mico
Dec 6 at 14:50












Yes, without it the alignment becomes easy. The braces are used to represent the linear system, while the last line simply represents the answer.
– Lean P
Dec 6 at 15:18






Yes, without it the alignment becomes easy. The braces are used to represent the linear system, while the last line simply represents the answer.
– Lean P
Dec 6 at 15:18












1 Answer
1






active

oldest

votes

















up vote
2
down vote













You can get something like this with blkarray.



documentclass[fleqn]{article}
usepackage{blkarray}
begin{document}
[begin{blockarray}{r@{,}l}
begin{block}{{r@{,}l}
2x+y &=5\
2x-3y &=1\
BAhline
end{block}
0x+4y&=4
end{blockarray}]
end{document}


enter image description here



Without additional packages it becomes less straightforward/elegant.



documentclass[fleqn]{article}
usepackage{amsmath}
begin{document}
begin{align*}
left{
begin{array}{@{}r@{,}l}
2x + y ,&= 5 \
2x - 3y ,&= 1\
end{array} right.&\
hline
0x + 4y = 4~~&
end{align*}
end{document}


enter image description here






share|improve this answer























  • Sadly, I'm writing to a wiki that doesn't contain this package (and I can't call it as well) and couldn't make it work. However, I appreciate the effort.
    – Lean P
    Dec 6 at 15:20








  • 1




    @LeanP Could you perhaps append the information which packages you are using/loading?
    – marmot
    Dec 6 at 15:23










  • I'm working in an article for wikiHow and unfortunately don't know which packages their platform preloads by default. Even so, given that there might not be an obvious solution, I'll do my best to align them manually and move on. I'll definitely suggest adding 'blkarray' to their packages, though!
    – Lean P
    Dec 6 at 15:32










  • @LeanP I added a version without additional packages but of course it is less elegant.
    – marmot
    Dec 6 at 15:35










  • No success until I've manually added some spaces ('') to align them as much as possible. The result can be seen in [ imgur.com/a/mfgNCX6 ]. Not elegant, I know, but it'll have to do for now. Thank you for the effort!
    – Lean P
    Dec 6 at 16:11











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%2f463520%2fbraces-and-alignment%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
2
down vote













You can get something like this with blkarray.



documentclass[fleqn]{article}
usepackage{blkarray}
begin{document}
[begin{blockarray}{r@{,}l}
begin{block}{{r@{,}l}
2x+y &=5\
2x-3y &=1\
BAhline
end{block}
0x+4y&=4
end{blockarray}]
end{document}


enter image description here



Without additional packages it becomes less straightforward/elegant.



documentclass[fleqn]{article}
usepackage{amsmath}
begin{document}
begin{align*}
left{
begin{array}{@{}r@{,}l}
2x + y ,&= 5 \
2x - 3y ,&= 1\
end{array} right.&\
hline
0x + 4y = 4~~&
end{align*}
end{document}


enter image description here






share|improve this answer























  • Sadly, I'm writing to a wiki that doesn't contain this package (and I can't call it as well) and couldn't make it work. However, I appreciate the effort.
    – Lean P
    Dec 6 at 15:20








  • 1




    @LeanP Could you perhaps append the information which packages you are using/loading?
    – marmot
    Dec 6 at 15:23










  • I'm working in an article for wikiHow and unfortunately don't know which packages their platform preloads by default. Even so, given that there might not be an obvious solution, I'll do my best to align them manually and move on. I'll definitely suggest adding 'blkarray' to their packages, though!
    – Lean P
    Dec 6 at 15:32










  • @LeanP I added a version without additional packages but of course it is less elegant.
    – marmot
    Dec 6 at 15:35










  • No success until I've manually added some spaces ('') to align them as much as possible. The result can be seen in [ imgur.com/a/mfgNCX6 ]. Not elegant, I know, but it'll have to do for now. Thank you for the effort!
    – Lean P
    Dec 6 at 16:11















up vote
2
down vote













You can get something like this with blkarray.



documentclass[fleqn]{article}
usepackage{blkarray}
begin{document}
[begin{blockarray}{r@{,}l}
begin{block}{{r@{,}l}
2x+y &=5\
2x-3y &=1\
BAhline
end{block}
0x+4y&=4
end{blockarray}]
end{document}


enter image description here



Without additional packages it becomes less straightforward/elegant.



documentclass[fleqn]{article}
usepackage{amsmath}
begin{document}
begin{align*}
left{
begin{array}{@{}r@{,}l}
2x + y ,&= 5 \
2x - 3y ,&= 1\
end{array} right.&\
hline
0x + 4y = 4~~&
end{align*}
end{document}


enter image description here






share|improve this answer























  • Sadly, I'm writing to a wiki that doesn't contain this package (and I can't call it as well) and couldn't make it work. However, I appreciate the effort.
    – Lean P
    Dec 6 at 15:20








  • 1




    @LeanP Could you perhaps append the information which packages you are using/loading?
    – marmot
    Dec 6 at 15:23










  • I'm working in an article for wikiHow and unfortunately don't know which packages their platform preloads by default. Even so, given that there might not be an obvious solution, I'll do my best to align them manually and move on. I'll definitely suggest adding 'blkarray' to their packages, though!
    – Lean P
    Dec 6 at 15:32










  • @LeanP I added a version without additional packages but of course it is less elegant.
    – marmot
    Dec 6 at 15:35










  • No success until I've manually added some spaces ('') to align them as much as possible. The result can be seen in [ imgur.com/a/mfgNCX6 ]. Not elegant, I know, but it'll have to do for now. Thank you for the effort!
    – Lean P
    Dec 6 at 16:11













up vote
2
down vote










up vote
2
down vote









You can get something like this with blkarray.



documentclass[fleqn]{article}
usepackage{blkarray}
begin{document}
[begin{blockarray}{r@{,}l}
begin{block}{{r@{,}l}
2x+y &=5\
2x-3y &=1\
BAhline
end{block}
0x+4y&=4
end{blockarray}]
end{document}


enter image description here



Without additional packages it becomes less straightforward/elegant.



documentclass[fleqn]{article}
usepackage{amsmath}
begin{document}
begin{align*}
left{
begin{array}{@{}r@{,}l}
2x + y ,&= 5 \
2x - 3y ,&= 1\
end{array} right.&\
hline
0x + 4y = 4~~&
end{align*}
end{document}


enter image description here






share|improve this answer














You can get something like this with blkarray.



documentclass[fleqn]{article}
usepackage{blkarray}
begin{document}
[begin{blockarray}{r@{,}l}
begin{block}{{r@{,}l}
2x+y &=5\
2x-3y &=1\
BAhline
end{block}
0x+4y&=4
end{blockarray}]
end{document}


enter image description here



Without additional packages it becomes less straightforward/elegant.



documentclass[fleqn]{article}
usepackage{amsmath}
begin{document}
begin{align*}
left{
begin{array}{@{}r@{,}l}
2x + y ,&= 5 \
2x - 3y ,&= 1\
end{array} right.&\
hline
0x + 4y = 4~~&
end{align*}
end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 6 at 15:34

























answered Dec 6 at 15:07









marmot

82.9k493177




82.9k493177












  • Sadly, I'm writing to a wiki that doesn't contain this package (and I can't call it as well) and couldn't make it work. However, I appreciate the effort.
    – Lean P
    Dec 6 at 15:20








  • 1




    @LeanP Could you perhaps append the information which packages you are using/loading?
    – marmot
    Dec 6 at 15:23










  • I'm working in an article for wikiHow and unfortunately don't know which packages their platform preloads by default. Even so, given that there might not be an obvious solution, I'll do my best to align them manually and move on. I'll definitely suggest adding 'blkarray' to their packages, though!
    – Lean P
    Dec 6 at 15:32










  • @LeanP I added a version without additional packages but of course it is less elegant.
    – marmot
    Dec 6 at 15:35










  • No success until I've manually added some spaces ('') to align them as much as possible. The result can be seen in [ imgur.com/a/mfgNCX6 ]. Not elegant, I know, but it'll have to do for now. Thank you for the effort!
    – Lean P
    Dec 6 at 16:11


















  • Sadly, I'm writing to a wiki that doesn't contain this package (and I can't call it as well) and couldn't make it work. However, I appreciate the effort.
    – Lean P
    Dec 6 at 15:20








  • 1




    @LeanP Could you perhaps append the information which packages you are using/loading?
    – marmot
    Dec 6 at 15:23










  • I'm working in an article for wikiHow and unfortunately don't know which packages their platform preloads by default. Even so, given that there might not be an obvious solution, I'll do my best to align them manually and move on. I'll definitely suggest adding 'blkarray' to their packages, though!
    – Lean P
    Dec 6 at 15:32










  • @LeanP I added a version without additional packages but of course it is less elegant.
    – marmot
    Dec 6 at 15:35










  • No success until I've manually added some spaces ('') to align them as much as possible. The result can be seen in [ imgur.com/a/mfgNCX6 ]. Not elegant, I know, but it'll have to do for now. Thank you for the effort!
    – Lean P
    Dec 6 at 16:11
















Sadly, I'm writing to a wiki that doesn't contain this package (and I can't call it as well) and couldn't make it work. However, I appreciate the effort.
– Lean P
Dec 6 at 15:20






Sadly, I'm writing to a wiki that doesn't contain this package (and I can't call it as well) and couldn't make it work. However, I appreciate the effort.
– Lean P
Dec 6 at 15:20






1




1




@LeanP Could you perhaps append the information which packages you are using/loading?
– marmot
Dec 6 at 15:23




@LeanP Could you perhaps append the information which packages you are using/loading?
– marmot
Dec 6 at 15:23












I'm working in an article for wikiHow and unfortunately don't know which packages their platform preloads by default. Even so, given that there might not be an obvious solution, I'll do my best to align them manually and move on. I'll definitely suggest adding 'blkarray' to their packages, though!
– Lean P
Dec 6 at 15:32




I'm working in an article for wikiHow and unfortunately don't know which packages their platform preloads by default. Even so, given that there might not be an obvious solution, I'll do my best to align them manually and move on. I'll definitely suggest adding 'blkarray' to their packages, though!
– Lean P
Dec 6 at 15:32












@LeanP I added a version without additional packages but of course it is less elegant.
– marmot
Dec 6 at 15:35




@LeanP I added a version without additional packages but of course it is less elegant.
– marmot
Dec 6 at 15:35












No success until I've manually added some spaces ('') to align them as much as possible. The result can be seen in [ imgur.com/a/mfgNCX6 ]. Not elegant, I know, but it'll have to do for now. Thank you for the effort!
– Lean P
Dec 6 at 16:11




No success until I've manually added some spaces ('') to align them as much as possible. The result can be seen in [ imgur.com/a/mfgNCX6 ]. Not elegant, I know, but it'll have to do for now. Thank you for the effort!
– Lean P
Dec 6 at 16:11


















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%2f463520%2fbraces-and-alignment%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?