Align horizontal cdots in an alignat environment
I am using alignat
environment to align a set of equations which practically describe the same thing, but for different quantities. Therefore I decided to skip the common things and replace them with cdots
, however I don't seem to be able to align them in the center.
Any idea to center the dots?
A sample code follows
documentclass{article}
usepackage{amsmath}
begin{document}
begin{alignat*}{4}
&sigma(E) &=& vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big} &=& big{sigma_1, sigma_2, cdots, sigma_nbig}&\
&C(E) &=&{cdots}&=& big{C_1, C_2, cdots, C_nbig}&\
end{alignat*}
end{document}
horizontal-alignment equations alignat
add a comment |
I am using alignat
environment to align a set of equations which practically describe the same thing, but for different quantities. Therefore I decided to skip the common things and replace them with cdots
, however I don't seem to be able to align them in the center.
Any idea to center the dots?
A sample code follows
documentclass{article}
usepackage{amsmath}
begin{document}
begin{alignat*}{4}
&sigma(E) &=& vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big} &=& big{sigma_1, sigma_2, cdots, sigma_nbig}&\
&C(E) &=&{cdots}&=& big{C_1, C_2, cdots, C_nbig}&\
end{alignat*}
end{document}
horizontal-alignment equations alignat
not directly releated, but don't use&=&
in AMS environments, just&=
– David Carlisle
11 hours ago
@DavidCarlisle : Thank you very much for your comment and advice! But why not?
– Thanos
11 hours ago
it doesn't work, as you see in the image you posted the=
has lost its relation spacing as the&=&
has made it lose the expression on the right.
– David Carlisle
11 hours ago
@DavidCarlisle Oh, I see! Thank you very much for the explanation!
– Thanos
11 hours ago
Are you sure aboutvec{sigma(E)}
?
– egreg
11 hours ago
add a comment |
I am using alignat
environment to align a set of equations which practically describe the same thing, but for different quantities. Therefore I decided to skip the common things and replace them with cdots
, however I don't seem to be able to align them in the center.
Any idea to center the dots?
A sample code follows
documentclass{article}
usepackage{amsmath}
begin{document}
begin{alignat*}{4}
&sigma(E) &=& vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big} &=& big{sigma_1, sigma_2, cdots, sigma_nbig}&\
&C(E) &=&{cdots}&=& big{C_1, C_2, cdots, C_nbig}&\
end{alignat*}
end{document}
horizontal-alignment equations alignat
I am using alignat
environment to align a set of equations which practically describe the same thing, but for different quantities. Therefore I decided to skip the common things and replace them with cdots
, however I don't seem to be able to align them in the center.
Any idea to center the dots?
A sample code follows
documentclass{article}
usepackage{amsmath}
begin{document}
begin{alignat*}{4}
&sigma(E) &=& vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big} &=& big{sigma_1, sigma_2, cdots, sigma_nbig}&\
&C(E) &=&{cdots}&=& big{C_1, C_2, cdots, C_nbig}&\
end{alignat*}
end{document}
horizontal-alignment equations alignat
horizontal-alignment equations alignat
asked 11 hours ago
ThanosThanos
6,1211454107
6,1211454107
not directly releated, but don't use&=&
in AMS environments, just&=
– David Carlisle
11 hours ago
@DavidCarlisle : Thank you very much for your comment and advice! But why not?
– Thanos
11 hours ago
it doesn't work, as you see in the image you posted the=
has lost its relation spacing as the&=&
has made it lose the expression on the right.
– David Carlisle
11 hours ago
@DavidCarlisle Oh, I see! Thank you very much for the explanation!
– Thanos
11 hours ago
Are you sure aboutvec{sigma(E)}
?
– egreg
11 hours ago
add a comment |
not directly releated, but don't use&=&
in AMS environments, just&=
– David Carlisle
11 hours ago
@DavidCarlisle : Thank you very much for your comment and advice! But why not?
– Thanos
11 hours ago
it doesn't work, as you see in the image you posted the=
has lost its relation spacing as the&=&
has made it lose the expression on the right.
– David Carlisle
11 hours ago
@DavidCarlisle Oh, I see! Thank you very much for the explanation!
– Thanos
11 hours ago
Are you sure aboutvec{sigma(E)}
?
– egreg
11 hours ago
not directly releated, but don't use
&=&
in AMS environments, just &=
– David Carlisle
11 hours ago
not directly releated, but don't use
&=&
in AMS environments, just &=
– David Carlisle
11 hours ago
@DavidCarlisle : Thank you very much for your comment and advice! But why not?
– Thanos
11 hours ago
@DavidCarlisle : Thank you very much for your comment and advice! But why not?
– Thanos
11 hours ago
it doesn't work, as you see in the image you posted the
=
has lost its relation spacing as the &=&
has made it lose the expression on the right.– David Carlisle
11 hours ago
it doesn't work, as you see in the image you posted the
=
has lost its relation spacing as the &=&
has made it lose the expression on the right.– David Carlisle
11 hours ago
@DavidCarlisle Oh, I see! Thank you very much for the explanation!
– Thanos
11 hours ago
@DavidCarlisle Oh, I see! Thank you very much for the explanation!
– Thanos
11 hours ago
Are you sure about
vec{sigma(E)}
?– egreg
11 hours ago
Are you sure about
vec{sigma(E)}
?– egreg
11 hours ago
add a comment |
3 Answers
3
active
oldest
votes
You can result to low level TeX with the omit
to break out of the current formatting:
documentclass{article}
usepackage{amsmath}
begin{document}
begin{alignat*}{2}
sigma(E) &={}& vec{sigma(E)}
= bigl{sigma(E_1), sigma(E_2), dots, sigma(E_n)bigr}
&= bigl{sigma_1, sigma_2, dots, sigma_nbigr}\
C(E) &={}&omithfill$cdots$hfill
&= bigl{C_1, C_2, dots, C_nbigr}
end{alignat*}
end{document}
Note I have also added groups {}
to get correct spacing at the equals signs, and use bigl...bigr
instead of big
. Also between commas you should just use dots
(or dotsc
).
Be careful here with the use of the ampersands &
. In alignat
, the alignment is implicitly rlrl...
with the first group right aligned, the second left aligned, etc.
Thank you very much for your help!
– Thanos
11 hours ago
omit
doesn't take an argument
– egreg
11 hours ago
add a comment |
A solution with the eqparbox
package. Note that 2 alignment columns are enough.
documentclass{article}
usepackage{amsmath}
usepackage{eqparbox}
newcommand{eqmathbox}[2][M]{eqmakebox[#1]{$displaystyle#2$}}
begin{document}
begin{alignat*}{2}
sigma(E) &= {}& eqmathbox{vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big}} &= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) &= {}& eqmathbox{cdotscdots}&= big{C_1, C_2, cdots, C_nbig}\
end{alignat*}
end{document}
add a comment |
array
is not made for aligning equations, but in this case, with a couple of tricks (@{}
and {}
where we want a correct spacing after/before the first/last equal sign), it may be convenient.
documentclass{article}
usepackage{amsmath}
usepackage{array}
begin{document}
[
begin{array}{r@{}c@{}l}
sigma(E) ={} & vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big} & {}= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) ={} &cdots& {}= big{C_1, C_2, cdots, C_nbig}\
end{array}
]
end{document}
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
});
}
});
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%2f478591%2falign-horizontal-cdots-in-an-alignat-environment%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
You can result to low level TeX with the omit
to break out of the current formatting:
documentclass{article}
usepackage{amsmath}
begin{document}
begin{alignat*}{2}
sigma(E) &={}& vec{sigma(E)}
= bigl{sigma(E_1), sigma(E_2), dots, sigma(E_n)bigr}
&= bigl{sigma_1, sigma_2, dots, sigma_nbigr}\
C(E) &={}&omithfill$cdots$hfill
&= bigl{C_1, C_2, dots, C_nbigr}
end{alignat*}
end{document}
Note I have also added groups {}
to get correct spacing at the equals signs, and use bigl...bigr
instead of big
. Also between commas you should just use dots
(or dotsc
).
Be careful here with the use of the ampersands &
. In alignat
, the alignment is implicitly rlrl...
with the first group right aligned, the second left aligned, etc.
Thank you very much for your help!
– Thanos
11 hours ago
omit
doesn't take an argument
– egreg
11 hours ago
add a comment |
You can result to low level TeX with the omit
to break out of the current formatting:
documentclass{article}
usepackage{amsmath}
begin{document}
begin{alignat*}{2}
sigma(E) &={}& vec{sigma(E)}
= bigl{sigma(E_1), sigma(E_2), dots, sigma(E_n)bigr}
&= bigl{sigma_1, sigma_2, dots, sigma_nbigr}\
C(E) &={}&omithfill$cdots$hfill
&= bigl{C_1, C_2, dots, C_nbigr}
end{alignat*}
end{document}
Note I have also added groups {}
to get correct spacing at the equals signs, and use bigl...bigr
instead of big
. Also between commas you should just use dots
(or dotsc
).
Be careful here with the use of the ampersands &
. In alignat
, the alignment is implicitly rlrl...
with the first group right aligned, the second left aligned, etc.
Thank you very much for your help!
– Thanos
11 hours ago
omit
doesn't take an argument
– egreg
11 hours ago
add a comment |
You can result to low level TeX with the omit
to break out of the current formatting:
documentclass{article}
usepackage{amsmath}
begin{document}
begin{alignat*}{2}
sigma(E) &={}& vec{sigma(E)}
= bigl{sigma(E_1), sigma(E_2), dots, sigma(E_n)bigr}
&= bigl{sigma_1, sigma_2, dots, sigma_nbigr}\
C(E) &={}&omithfill$cdots$hfill
&= bigl{C_1, C_2, dots, C_nbigr}
end{alignat*}
end{document}
Note I have also added groups {}
to get correct spacing at the equals signs, and use bigl...bigr
instead of big
. Also between commas you should just use dots
(or dotsc
).
Be careful here with the use of the ampersands &
. In alignat
, the alignment is implicitly rlrl...
with the first group right aligned, the second left aligned, etc.
You can result to low level TeX with the omit
to break out of the current formatting:
documentclass{article}
usepackage{amsmath}
begin{document}
begin{alignat*}{2}
sigma(E) &={}& vec{sigma(E)}
= bigl{sigma(E_1), sigma(E_2), dots, sigma(E_n)bigr}
&= bigl{sigma_1, sigma_2, dots, sigma_nbigr}\
C(E) &={}&omithfill$cdots$hfill
&= bigl{C_1, C_2, dots, C_nbigr}
end{alignat*}
end{document}
Note I have also added groups {}
to get correct spacing at the equals signs, and use bigl...bigr
instead of big
. Also between commas you should just use dots
(or dotsc
).
Be careful here with the use of the ampersands &
. In alignat
, the alignment is implicitly rlrl...
with the first group right aligned, the second left aligned, etc.
edited 10 hours ago
answered 11 hours ago
Andrew SwannAndrew Swann
77.4k9130330
77.4k9130330
Thank you very much for your help!
– Thanos
11 hours ago
omit
doesn't take an argument
– egreg
11 hours ago
add a comment |
Thank you very much for your help!
– Thanos
11 hours ago
omit
doesn't take an argument
– egreg
11 hours ago
Thank you very much for your help!
– Thanos
11 hours ago
Thank you very much for your help!
– Thanos
11 hours ago
omit
doesn't take an argument– egreg
11 hours ago
omit
doesn't take an argument– egreg
11 hours ago
add a comment |
A solution with the eqparbox
package. Note that 2 alignment columns are enough.
documentclass{article}
usepackage{amsmath}
usepackage{eqparbox}
newcommand{eqmathbox}[2][M]{eqmakebox[#1]{$displaystyle#2$}}
begin{document}
begin{alignat*}{2}
sigma(E) &= {}& eqmathbox{vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big}} &= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) &= {}& eqmathbox{cdotscdots}&= big{C_1, C_2, cdots, C_nbig}\
end{alignat*}
end{document}
add a comment |
A solution with the eqparbox
package. Note that 2 alignment columns are enough.
documentclass{article}
usepackage{amsmath}
usepackage{eqparbox}
newcommand{eqmathbox}[2][M]{eqmakebox[#1]{$displaystyle#2$}}
begin{document}
begin{alignat*}{2}
sigma(E) &= {}& eqmathbox{vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big}} &= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) &= {}& eqmathbox{cdotscdots}&= big{C_1, C_2, cdots, C_nbig}\
end{alignat*}
end{document}
add a comment |
A solution with the eqparbox
package. Note that 2 alignment columns are enough.
documentclass{article}
usepackage{amsmath}
usepackage{eqparbox}
newcommand{eqmathbox}[2][M]{eqmakebox[#1]{$displaystyle#2$}}
begin{document}
begin{alignat*}{2}
sigma(E) &= {}& eqmathbox{vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big}} &= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) &= {}& eqmathbox{cdotscdots}&= big{C_1, C_2, cdots, C_nbig}\
end{alignat*}
end{document}
A solution with the eqparbox
package. Note that 2 alignment columns are enough.
documentclass{article}
usepackage{amsmath}
usepackage{eqparbox}
newcommand{eqmathbox}[2][M]{eqmakebox[#1]{$displaystyle#2$}}
begin{document}
begin{alignat*}{2}
sigma(E) &= {}& eqmathbox{vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big}} &= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) &= {}& eqmathbox{cdotscdots}&= big{C_1, C_2, cdots, C_nbig}\
end{alignat*}
end{document}
answered 10 hours ago
BernardBernard
172k776204
172k776204
add a comment |
add a comment |
array
is not made for aligning equations, but in this case, with a couple of tricks (@{}
and {}
where we want a correct spacing after/before the first/last equal sign), it may be convenient.
documentclass{article}
usepackage{amsmath}
usepackage{array}
begin{document}
[
begin{array}{r@{}c@{}l}
sigma(E) ={} & vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big} & {}= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) ={} &cdots& {}= big{C_1, C_2, cdots, C_nbig}\
end{array}
]
end{document}
add a comment |
array
is not made for aligning equations, but in this case, with a couple of tricks (@{}
and {}
where we want a correct spacing after/before the first/last equal sign), it may be convenient.
documentclass{article}
usepackage{amsmath}
usepackage{array}
begin{document}
[
begin{array}{r@{}c@{}l}
sigma(E) ={} & vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big} & {}= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) ={} &cdots& {}= big{C_1, C_2, cdots, C_nbig}\
end{array}
]
end{document}
add a comment |
array
is not made for aligning equations, but in this case, with a couple of tricks (@{}
and {}
where we want a correct spacing after/before the first/last equal sign), it may be convenient.
documentclass{article}
usepackage{amsmath}
usepackage{array}
begin{document}
[
begin{array}{r@{}c@{}l}
sigma(E) ={} & vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big} & {}= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) ={} &cdots& {}= big{C_1, C_2, cdots, C_nbig}\
end{array}
]
end{document}
array
is not made for aligning equations, but in this case, with a couple of tricks (@{}
and {}
where we want a correct spacing after/before the first/last equal sign), it may be convenient.
documentclass{article}
usepackage{amsmath}
usepackage{array}
begin{document}
[
begin{array}{r@{}c@{}l}
sigma(E) ={} & vec{sigma(E)} = big{sigma(E_1), sigma(E_2), cdots, sigma(E_n)big} & {}= big{sigma_1, sigma_2, cdots, sigma_nbig}\
C(E) ={} &cdots& {}= big{C_1, C_2, cdots, C_nbig}\
end{array}
]
end{document}
edited 6 hours ago
answered 7 hours ago
CarLaTeXCarLaTeX
32.9k551136
32.9k551136
add a comment |
add a comment |
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.
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%2f478591%2falign-horizontal-cdots-in-an-alignat-environment%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
not directly releated, but don't use
&=&
in AMS environments, just&=
– David Carlisle
11 hours ago
@DavidCarlisle : Thank you very much for your comment and advice! But why not?
– Thanos
11 hours ago
it doesn't work, as you see in the image you posted the
=
has lost its relation spacing as the&=&
has made it lose the expression on the right.– David Carlisle
11 hours ago
@DavidCarlisle Oh, I see! Thank you very much for the explanation!
– Thanos
11 hours ago
Are you sure about
vec{sigma(E)}
?– egreg
11 hours ago