alignat: removing the gap between the aligned variable and its coefficient
For the second equation, how can I remove the space between the aligned dot{x}_1
and its coefficient without abusing extra ampersands?
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - frac{d_1+d_2}{M_1} &&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= frac{d_2}{M_2} &&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
end{document}
align alignat
add a comment |
For the second equation, how can I remove the space between the aligned dot{x}_1
and its coefficient without abusing extra ampersands?
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - frac{d_1+d_2}{M_1} &&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= frac{d_2}{M_2} &&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
end{document}
align alignat
By its coefficient do you meanfrac{d_2}{M_2}
?
– Sigur
Jan 16 at 20:36
@Sigur Yes.....
– Diaa
Jan 16 at 20:37
add a comment |
For the second equation, how can I remove the space between the aligned dot{x}_1
and its coefficient without abusing extra ampersands?
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - frac{d_1+d_2}{M_1} &&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= frac{d_2}{M_2} &&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
end{document}
align alignat
For the second equation, how can I remove the space between the aligned dot{x}_1
and its coefficient without abusing extra ampersands?
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - frac{d_1+d_2}{M_1} &&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= frac{d_2}{M_2} &&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
end{document}
align alignat
align alignat
asked Jan 16 at 20:33
DiaaDiaa
2,69711750
2,69711750
By its coefficient do you meanfrac{d_2}{M_2}
?
– Sigur
Jan 16 at 20:36
@Sigur Yes.....
– Diaa
Jan 16 at 20:37
add a comment |
By its coefficient do you meanfrac{d_2}{M_2}
?
– Sigur
Jan 16 at 20:36
@Sigur Yes.....
– Diaa
Jan 16 at 20:37
By its coefficient do you mean
frac{d_2}{M_2}
?– Sigur
Jan 16 at 20:36
By its coefficient do you mean
frac{d_2}{M_2}
?– Sigur
Jan 16 at 20:36
@Sigur Yes.....
– Diaa
Jan 16 at 20:37
@Sigur Yes.....
– Diaa
Jan 16 at 20:37
add a comment |
2 Answers
2
active
oldest
votes
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - &frac{d_1+d_2}{M_1} &dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2} &dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
end{document}
I know it is a very basic question, but could you please tell me what is the difference between adding&&
and a single one&
?
– Diaa
Jan 16 at 20:44
1
@Diaa the alignments are liketabular
(it is the same texhalign
command underneath) so it is a sequence of columns andx&&
puts x in one column followed by a blank entry and&&x
has a blank entry in one cell followed by x. the alignment is likebegin{tabular}{rlrlrlrlrlrlrlrlrlr}
so entries are left or right aligned depending which column they are in.
– David Carlisle
Jan 16 at 20:47
I highly appreciate your patience and consideration.
– Diaa
Jan 16 at 20:50
@DavidCarlisle, and what is the meaning of{3}
?
– Sigur
Jan 16 at 20:51
1
@Sigur it is the number ofrl
pairs in the alignment
– David Carlisle
Jan 16 at 20:57
|
show 3 more comments
I propose one of these three variants – the last one with an extra pair of &
:
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 &{} - frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
begin{alignat*}{4}
dot{v}_1 &= -frac{k}{M_1} x_1 & &{}- {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} & & {} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
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%2f470437%2falignat-removing-the-gap-between-the-aligned-variable-and-its-coefficient%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - &frac{d_1+d_2}{M_1} &dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2} &dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
end{document}
I know it is a very basic question, but could you please tell me what is the difference between adding&&
and a single one&
?
– Diaa
Jan 16 at 20:44
1
@Diaa the alignments are liketabular
(it is the same texhalign
command underneath) so it is a sequence of columns andx&&
puts x in one column followed by a blank entry and&&x
has a blank entry in one cell followed by x. the alignment is likebegin{tabular}{rlrlrlrlrlrlrlrlrlr}
so entries are left or right aligned depending which column they are in.
– David Carlisle
Jan 16 at 20:47
I highly appreciate your patience and consideration.
– Diaa
Jan 16 at 20:50
@DavidCarlisle, and what is the meaning of{3}
?
– Sigur
Jan 16 at 20:51
1
@Sigur it is the number ofrl
pairs in the alignment
– David Carlisle
Jan 16 at 20:57
|
show 3 more comments
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - &frac{d_1+d_2}{M_1} &dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2} &dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
end{document}
I know it is a very basic question, but could you please tell me what is the difference between adding&&
and a single one&
?
– Diaa
Jan 16 at 20:44
1
@Diaa the alignments are liketabular
(it is the same texhalign
command underneath) so it is a sequence of columns andx&&
puts x in one column followed by a blank entry and&&x
has a blank entry in one cell followed by x. the alignment is likebegin{tabular}{rlrlrlrlrlrlrlrlrlr}
so entries are left or right aligned depending which column they are in.
– David Carlisle
Jan 16 at 20:47
I highly appreciate your patience and consideration.
– Diaa
Jan 16 at 20:50
@DavidCarlisle, and what is the meaning of{3}
?
– Sigur
Jan 16 at 20:51
1
@Sigur it is the number ofrl
pairs in the alignment
– David Carlisle
Jan 16 at 20:57
|
show 3 more comments
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - &frac{d_1+d_2}{M_1} &dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2} &dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
end{document}
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - &frac{d_1+d_2}{M_1} &dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2} &dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
end{document}
answered Jan 16 at 20:42
David CarlisleDavid Carlisle
487k4111231868
487k4111231868
I know it is a very basic question, but could you please tell me what is the difference between adding&&
and a single one&
?
– Diaa
Jan 16 at 20:44
1
@Diaa the alignments are liketabular
(it is the same texhalign
command underneath) so it is a sequence of columns andx&&
puts x in one column followed by a blank entry and&&x
has a blank entry in one cell followed by x. the alignment is likebegin{tabular}{rlrlrlrlrlrlrlrlrlr}
so entries are left or right aligned depending which column they are in.
– David Carlisle
Jan 16 at 20:47
I highly appreciate your patience and consideration.
– Diaa
Jan 16 at 20:50
@DavidCarlisle, and what is the meaning of{3}
?
– Sigur
Jan 16 at 20:51
1
@Sigur it is the number ofrl
pairs in the alignment
– David Carlisle
Jan 16 at 20:57
|
show 3 more comments
I know it is a very basic question, but could you please tell me what is the difference between adding&&
and a single one&
?
– Diaa
Jan 16 at 20:44
1
@Diaa the alignments are liketabular
(it is the same texhalign
command underneath) so it is a sequence of columns andx&&
puts x in one column followed by a blank entry and&&x
has a blank entry in one cell followed by x. the alignment is likebegin{tabular}{rlrlrlrlrlrlrlrlrlr}
so entries are left or right aligned depending which column they are in.
– David Carlisle
Jan 16 at 20:47
I highly appreciate your patience and consideration.
– Diaa
Jan 16 at 20:50
@DavidCarlisle, and what is the meaning of{3}
?
– Sigur
Jan 16 at 20:51
1
@Sigur it is the number ofrl
pairs in the alignment
– David Carlisle
Jan 16 at 20:57
I know it is a very basic question, but could you please tell me what is the difference between adding
&&
and a single one &
?– Diaa
Jan 16 at 20:44
I know it is a very basic question, but could you please tell me what is the difference between adding
&&
and a single one &
?– Diaa
Jan 16 at 20:44
1
1
@Diaa the alignments are like
tabular
(it is the same tex halign
command underneath) so it is a sequence of columns and x&&
puts x in one column followed by a blank entry and &&x
has a blank entry in one cell followed by x. the alignment is like begin{tabular}{rlrlrlrlrlrlrlrlrlr}
so entries are left or right aligned depending which column they are in.– David Carlisle
Jan 16 at 20:47
@Diaa the alignments are like
tabular
(it is the same tex halign
command underneath) so it is a sequence of columns and x&&
puts x in one column followed by a blank entry and &&x
has a blank entry in one cell followed by x. the alignment is like begin{tabular}{rlrlrlrlrlrlrlrlrlr}
so entries are left or right aligned depending which column they are in.– David Carlisle
Jan 16 at 20:47
I highly appreciate your patience and consideration.
– Diaa
Jan 16 at 20:50
I highly appreciate your patience and consideration.
– Diaa
Jan 16 at 20:50
@DavidCarlisle, and what is the meaning of
{3}
?– Sigur
Jan 16 at 20:51
@DavidCarlisle, and what is the meaning of
{3}
?– Sigur
Jan 16 at 20:51
1
1
@Sigur it is the number of
rl
pairs in the alignment– David Carlisle
Jan 16 at 20:57
@Sigur it is the number of
rl
pairs in the alignment– David Carlisle
Jan 16 at 20:57
|
show 3 more comments
I propose one of these three variants – the last one with an extra pair of &
:
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 &{} - frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
begin{alignat*}{4}
dot{v}_1 &= -frac{k}{M_1} x_1 & &{}- {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} & & {} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
end{document}
add a comment |
I propose one of these three variants – the last one with an extra pair of &
:
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 &{} - frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
begin{alignat*}{4}
dot{v}_1 &= -frac{k}{M_1} x_1 & &{}- {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} & & {} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
end{document}
add a comment |
I propose one of these three variants – the last one with an extra pair of &
:
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 &{} - frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
begin{alignat*}{4}
dot{v}_1 &= -frac{k}{M_1} x_1 & &{}- {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} & & {} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
end{document}
I propose one of these three variants – the last one with an extra pair of &
:
documentclass[10pt,a4paper]{article}
usepackage{mathtools}
begin{document}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 &{} - frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &= &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2 + frac{f}{M_2}
end{alignat*}
begin{alignat*}{3}
dot{v}_1 &= -frac{k}{M_1} x_1 - {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
begin{alignat*}{4}
dot{v}_1 &= -frac{k}{M_1} x_1 & &{}- {}& frac{d_1+d_2}{M_1}&dot{x}_1 + frac{d_2}{M_1} &&dot{x}_2\
%
dot{v}_2 &=phantom{-} frac{f}{M_2} & & {} +{} &frac{d_2}{M_2}&dot{x}_1 - frac{d_2}{M_2} &&dot{x}_2
end{alignat*}
end{document}
answered Jan 16 at 20:52
BernardBernard
168k770195
168k770195
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%2f470437%2falignat-removing-the-gap-between-the-aligned-variable-and-its-coefficient%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
By its coefficient do you mean
frac{d_2}{M_2}
?– Sigur
Jan 16 at 20:36
@Sigur Yes.....
– Diaa
Jan 16 at 20:37