How to keep alignment across multiple align environments?
documentclass[letterpaper,10pt]{article}
usepackage{amsmath}
begin{document}
begin{align}
w &z &t
end{align}
begin{align}
w+w+w+w &z+z+z+z &t+t+t+t
end{align}
end{document}
On their own, these are going to have differently aligned columns. Is there a way to keep at least some of the alignment across different align environments the same?
horizontal-alignment align
New contributor
user14554 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
|
show 1 more comment
documentclass[letterpaper,10pt]{article}
usepackage{amsmath}
begin{document}
begin{align}
w &z &t
end{align}
begin{align}
w+w+w+w &z+z+z+z &t+t+t+t
end{align}
end{document}
On their own, these are going to have differently aligned columns. Is there a way to keep at least some of the alignment across different align environments the same?
horizontal-alignment align
New contributor
user14554 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
You can useintertext{<text>}to interrupt analignenvironment. Is this what you want or do you want to align equations that are very far apart?
– Circumscribe
2 hours ago
I have already used for some text, but I want different align environments for completely different text sections, though I want the equation alignment to remain consistent.
– user14554
2 hours ago
@user14554: So you have a "big piece of text" between the twoalignments?
– Werner
2 hours ago
I have two large and distinct text sections with their own titles and such yes. I do not want them altered and intertext will not solve anything. As far as I know there is possibly some way to use fleqn.
– user14554
2 hours ago
I'm sure there's a way to use fleqn and subequations, I just haven't found it yet.
– user14554
1 hour ago
|
show 1 more comment
documentclass[letterpaper,10pt]{article}
usepackage{amsmath}
begin{document}
begin{align}
w &z &t
end{align}
begin{align}
w+w+w+w &z+z+z+z &t+t+t+t
end{align}
end{document}
On their own, these are going to have differently aligned columns. Is there a way to keep at least some of the alignment across different align environments the same?
horizontal-alignment align
New contributor
user14554 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
documentclass[letterpaper,10pt]{article}
usepackage{amsmath}
begin{document}
begin{align}
w &z &t
end{align}
begin{align}
w+w+w+w &z+z+z+z &t+t+t+t
end{align}
end{document}
On their own, these are going to have differently aligned columns. Is there a way to keep at least some of the alignment across different align environments the same?
horizontal-alignment align
horizontal-alignment align
New contributor
user14554 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user14554 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user14554 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 hours ago
user14554
62
62
New contributor
user14554 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user14554 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user14554 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
You can useintertext{<text>}to interrupt analignenvironment. Is this what you want or do you want to align equations that are very far apart?
– Circumscribe
2 hours ago
I have already used for some text, but I want different align environments for completely different text sections, though I want the equation alignment to remain consistent.
– user14554
2 hours ago
@user14554: So you have a "big piece of text" between the twoalignments?
– Werner
2 hours ago
I have two large and distinct text sections with their own titles and such yes. I do not want them altered and intertext will not solve anything. As far as I know there is possibly some way to use fleqn.
– user14554
2 hours ago
I'm sure there's a way to use fleqn and subequations, I just haven't found it yet.
– user14554
1 hour ago
|
show 1 more comment
2
You can useintertext{<text>}to interrupt analignenvironment. Is this what you want or do you want to align equations that are very far apart?
– Circumscribe
2 hours ago
I have already used for some text, but I want different align environments for completely different text sections, though I want the equation alignment to remain consistent.
– user14554
2 hours ago
@user14554: So you have a "big piece of text" between the twoalignments?
– Werner
2 hours ago
I have two large and distinct text sections with their own titles and such yes. I do not want them altered and intertext will not solve anything. As far as I know there is possibly some way to use fleqn.
– user14554
2 hours ago
I'm sure there's a way to use fleqn and subequations, I just haven't found it yet.
– user14554
1 hour ago
2
2
You can use
intertext{<text>} to interrupt an align environment. Is this what you want or do you want to align equations that are very far apart?– Circumscribe
2 hours ago
You can use
intertext{<text>} to interrupt an align environment. Is this what you want or do you want to align equations that are very far apart?– Circumscribe
2 hours ago
I have already used for some text, but I want different align environments for completely different text sections, though I want the equation alignment to remain consistent.
– user14554
2 hours ago
I have already used for some text, but I want different align environments for completely different text sections, though I want the equation alignment to remain consistent.
– user14554
2 hours ago
@user14554: So you have a "big piece of text" between the two
alignments?– Werner
2 hours ago
@user14554: So you have a "big piece of text" between the two
alignments?– Werner
2 hours ago
I have two large and distinct text sections with their own titles and such yes. I do not want them altered and intertext will not solve anything. As far as I know there is possibly some way to use fleqn.
– user14554
2 hours ago
I have two large and distinct text sections with their own titles and such yes. I do not want them altered and intertext will not solve anything. As far as I know there is possibly some way to use fleqn.
– user14554
2 hours ago
I'm sure there's a way to use fleqn and subequations, I just haven't found it yet.
– user14554
1 hour ago
I'm sure there's a way to use fleqn and subequations, I just haven't found it yet.
– user14554
1 hour ago
|
show 1 more comment
1 Answer
1
active
oldest
votes
If you're unable to use intertext, you need to identify the widest element around each alignment. And the easiest way to capture these "widest elements" is using eqparbox. Below I define eqmathbox[<tag>][<align>]{<stuff>} that puts its contents <stuff> in a box of widest width across all of the same <tag> with a specific <align>ment.

documentclass{article}
usepackage{amsmath,eqparbox,xparse}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
usepackage{lipsum}
begin{document}
lipsum*[1]
begin{align}
eqmathbox[left][r]{w} &eqmathbox[centre][l]{z} & eqmathbox[right][r]{t}
end{align}
lipsum*[2]
begin{align}
eqmathbox[left][r]{w+w+w+w} & eqmathbox[centre][l]{z+z+z+z} & eqmathbox[right][l]{t+t+t+t}
end{align}
lipsum*[3]
end{document}
The alignment choice matches that of the R&L & R&L ... style of align.
Since eqparbox uses TeX's label-ref-like system in order to manage the lengths, you'll need to compile at least twice with every change in the widest element per <tag>.
add a comment |
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
});
}
});
user14554 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468347%2fhow-to-keep-alignment-across-multiple-align-environments%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
If you're unable to use intertext, you need to identify the widest element around each alignment. And the easiest way to capture these "widest elements" is using eqparbox. Below I define eqmathbox[<tag>][<align>]{<stuff>} that puts its contents <stuff> in a box of widest width across all of the same <tag> with a specific <align>ment.

documentclass{article}
usepackage{amsmath,eqparbox,xparse}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
usepackage{lipsum}
begin{document}
lipsum*[1]
begin{align}
eqmathbox[left][r]{w} &eqmathbox[centre][l]{z} & eqmathbox[right][r]{t}
end{align}
lipsum*[2]
begin{align}
eqmathbox[left][r]{w+w+w+w} & eqmathbox[centre][l]{z+z+z+z} & eqmathbox[right][l]{t+t+t+t}
end{align}
lipsum*[3]
end{document}
The alignment choice matches that of the R&L & R&L ... style of align.
Since eqparbox uses TeX's label-ref-like system in order to manage the lengths, you'll need to compile at least twice with every change in the widest element per <tag>.
add a comment |
If you're unable to use intertext, you need to identify the widest element around each alignment. And the easiest way to capture these "widest elements" is using eqparbox. Below I define eqmathbox[<tag>][<align>]{<stuff>} that puts its contents <stuff> in a box of widest width across all of the same <tag> with a specific <align>ment.

documentclass{article}
usepackage{amsmath,eqparbox,xparse}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
usepackage{lipsum}
begin{document}
lipsum*[1]
begin{align}
eqmathbox[left][r]{w} &eqmathbox[centre][l]{z} & eqmathbox[right][r]{t}
end{align}
lipsum*[2]
begin{align}
eqmathbox[left][r]{w+w+w+w} & eqmathbox[centre][l]{z+z+z+z} & eqmathbox[right][l]{t+t+t+t}
end{align}
lipsum*[3]
end{document}
The alignment choice matches that of the R&L & R&L ... style of align.
Since eqparbox uses TeX's label-ref-like system in order to manage the lengths, you'll need to compile at least twice with every change in the widest element per <tag>.
add a comment |
If you're unable to use intertext, you need to identify the widest element around each alignment. And the easiest way to capture these "widest elements" is using eqparbox. Below I define eqmathbox[<tag>][<align>]{<stuff>} that puts its contents <stuff> in a box of widest width across all of the same <tag> with a specific <align>ment.

documentclass{article}
usepackage{amsmath,eqparbox,xparse}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
usepackage{lipsum}
begin{document}
lipsum*[1]
begin{align}
eqmathbox[left][r]{w} &eqmathbox[centre][l]{z} & eqmathbox[right][r]{t}
end{align}
lipsum*[2]
begin{align}
eqmathbox[left][r]{w+w+w+w} & eqmathbox[centre][l]{z+z+z+z} & eqmathbox[right][l]{t+t+t+t}
end{align}
lipsum*[3]
end{document}
The alignment choice matches that of the R&L & R&L ... style of align.
Since eqparbox uses TeX's label-ref-like system in order to manage the lengths, you'll need to compile at least twice with every change in the widest element per <tag>.
If you're unable to use intertext, you need to identify the widest element around each alignment. And the easiest way to capture these "widest elements" is using eqparbox. Below I define eqmathbox[<tag>][<align>]{<stuff>} that puts its contents <stuff> in a box of widest width across all of the same <tag> with a specific <align>ment.

documentclass{article}
usepackage{amsmath,eqparbox,xparse}
% https://tex.stackexchange.com/a/34412/5764
makeatletter
NewDocumentCommand{eqmathbox}{o O{c} m}{%
IfValueTF{#1}
{defeqmathbox@##1##2{eqmakebox[#1][#2]{$##1##2$}}}
{defeqmathbox@##1##2{eqmakebox{$##1##2$}}}
mathpaletteeqmathbox@{#3}
}
makeatother
usepackage{lipsum}
begin{document}
lipsum*[1]
begin{align}
eqmathbox[left][r]{w} &eqmathbox[centre][l]{z} & eqmathbox[right][r]{t}
end{align}
lipsum*[2]
begin{align}
eqmathbox[left][r]{w+w+w+w} & eqmathbox[centre][l]{z+z+z+z} & eqmathbox[right][l]{t+t+t+t}
end{align}
lipsum*[3]
end{document}
The alignment choice matches that of the R&L & R&L ... style of align.
Since eqparbox uses TeX's label-ref-like system in order to manage the lengths, you'll need to compile at least twice with every change in the widest element per <tag>.
answered 1 hour ago
Werner
437k649601650
437k649601650
add a comment |
add a comment |
user14554 is a new contributor. Be nice, and check out our Code of Conduct.
user14554 is a new contributor. Be nice, and check out our Code of Conduct.
user14554 is a new contributor. Be nice, and check out our Code of Conduct.
user14554 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468347%2fhow-to-keep-alignment-across-multiple-align-environments%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
2
You can use
intertext{<text>}to interrupt analignenvironment. Is this what you want or do you want to align equations that are very far apart?– Circumscribe
2 hours ago
I have already used for some text, but I want different align environments for completely different text sections, though I want the equation alignment to remain consistent.
– user14554
2 hours ago
@user14554: So you have a "big piece of text" between the two
alignments?– Werner
2 hours ago
I have two large and distinct text sections with their own titles and such yes. I do not want them altered and intertext will not solve anything. As far as I know there is possibly some way to use fleqn.
– user14554
2 hours ago
I'm sure there's a way to use fleqn and subequations, I just haven't found it yet.
– user14554
1 hour ago