How to align numbers in parentheses
This code aligns the 4 and the -3 roughly centered, i.e., the 4 is centered above the -3. I would like the 4 and the 3 to be perfectly vertically aligned, with the negative sign out to the left and the left parenthesis accommodating. How can I do this?
begin{align*}
x = begin{pmatrix}
4 \
-3 \
end{pmatrix}
end{align*}
horizontal-alignment parentheses
add a comment |
This code aligns the 4 and the -3 roughly centered, i.e., the 4 is centered above the -3. I would like the 4 and the 3 to be perfectly vertically aligned, with the negative sign out to the left and the left parenthesis accommodating. How can I do this?
begin{align*}
x = begin{pmatrix}
4 \
-3 \
end{pmatrix}
end{align*}
horizontal-alignment parentheses
1
usearray
and a r-aligned column (note this is horizontal alignment rather than vertical alignment, vertical alignment refers to aligning to the top or the bottom of a box)
– David Carlisle
Jan 27 at 21:28
add a comment |
This code aligns the 4 and the -3 roughly centered, i.e., the 4 is centered above the -3. I would like the 4 and the 3 to be perfectly vertically aligned, with the negative sign out to the left and the left parenthesis accommodating. How can I do this?
begin{align*}
x = begin{pmatrix}
4 \
-3 \
end{pmatrix}
end{align*}
horizontal-alignment parentheses
This code aligns the 4 and the -3 roughly centered, i.e., the 4 is centered above the -3. I would like the 4 and the 3 to be perfectly vertically aligned, with the negative sign out to the left and the left parenthesis accommodating. How can I do this?
begin{align*}
x = begin{pmatrix}
4 \
-3 \
end{pmatrix}
end{align*}
horizontal-alignment parentheses
horizontal-alignment parentheses
edited Jan 27 at 21:34
David Carlisle
496k4111421889
496k4111421889
asked Jan 27 at 21:27
147pm147pm
4771510
4771510
1
usearray
and a r-aligned column (note this is horizontal alignment rather than vertical alignment, vertical alignment refers to aligning to the top or the bottom of a box)
– David Carlisle
Jan 27 at 21:28
add a comment |
1
usearray
and a r-aligned column (note this is horizontal alignment rather than vertical alignment, vertical alignment refers to aligning to the top or the bottom of a box)
– David Carlisle
Jan 27 at 21:28
1
1
use
array
and a r-aligned column (note this is horizontal alignment rather than vertical alignment, vertical alignment refers to aligning to the top or the bottom of a box)– David Carlisle
Jan 27 at 21:28
use
array
and a r-aligned column (note this is horizontal alignment rather than vertical alignment, vertical alignment refers to aligning to the top or the bottom of a box)– David Carlisle
Jan 27 at 21:28
add a comment |
3 Answers
3
active
oldest
votes
Here are two ways: either use a phantom{-}
for the number without a –
(to be used for each such number), or load mathtools
and use its pmatrix*
environment, which allows for an optional alignment specifier:
begin{equation*}
x = begin{pmatrix*}[r]
4 \
-3 \
end{pmatrix*}
qquad
x = begin{pmatrix}
phantom{-} 4 \
-3 \
end{pmatrix}
end{equation*}
add a comment |
documentclass{article}
usepackage{amsmath}
begin{document}
[
left( begin{array}{@{}r@{}}
4\-3
end{array}right)
]
end{document}
add a comment |
documentclass[12pt]{article}
usepackage{stackengine}
setstackEOL{\}
begin{document}
[
x=parenVectorstack[r]{4\-3}
]
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%2f472153%2fhow-to-align-numbers-in-parentheses%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
Here are two ways: either use a phantom{-}
for the number without a –
(to be used for each such number), or load mathtools
and use its pmatrix*
environment, which allows for an optional alignment specifier:
begin{equation*}
x = begin{pmatrix*}[r]
4 \
-3 \
end{pmatrix*}
qquad
x = begin{pmatrix}
phantom{-} 4 \
-3 \
end{pmatrix}
end{equation*}
add a comment |
Here are two ways: either use a phantom{-}
for the number without a –
(to be used for each such number), or load mathtools
and use its pmatrix*
environment, which allows for an optional alignment specifier:
begin{equation*}
x = begin{pmatrix*}[r]
4 \
-3 \
end{pmatrix*}
qquad
x = begin{pmatrix}
phantom{-} 4 \
-3 \
end{pmatrix}
end{equation*}
add a comment |
Here are two ways: either use a phantom{-}
for the number without a –
(to be used for each such number), or load mathtools
and use its pmatrix*
environment, which allows for an optional alignment specifier:
begin{equation*}
x = begin{pmatrix*}[r]
4 \
-3 \
end{pmatrix*}
qquad
x = begin{pmatrix}
phantom{-} 4 \
-3 \
end{pmatrix}
end{equation*}
Here are two ways: either use a phantom{-}
for the number without a –
(to be used for each such number), or load mathtools
and use its pmatrix*
environment, which allows for an optional alignment specifier:
begin{equation*}
x = begin{pmatrix*}[r]
4 \
-3 \
end{pmatrix*}
qquad
x = begin{pmatrix}
phantom{-} 4 \
-3 \
end{pmatrix}
end{equation*}
answered Jan 27 at 21:40
BernardBernard
174k776207
174k776207
add a comment |
add a comment |
documentclass{article}
usepackage{amsmath}
begin{document}
[
left( begin{array}{@{}r@{}}
4\-3
end{array}right)
]
end{document}
add a comment |
documentclass{article}
usepackage{amsmath}
begin{document}
[
left( begin{array}{@{}r@{}}
4\-3
end{array}right)
]
end{document}
add a comment |
documentclass{article}
usepackage{amsmath}
begin{document}
[
left( begin{array}{@{}r@{}}
4\-3
end{array}right)
]
end{document}
documentclass{article}
usepackage{amsmath}
begin{document}
[
left( begin{array}{@{}r@{}}
4\-3
end{array}right)
]
end{document}
answered Jan 27 at 21:33
David CarlisleDavid Carlisle
496k4111421889
496k4111421889
add a comment |
add a comment |
documentclass[12pt]{article}
usepackage{stackengine}
setstackEOL{\}
begin{document}
[
x=parenVectorstack[r]{4\-3}
]
end{document}
add a comment |
documentclass[12pt]{article}
usepackage{stackengine}
setstackEOL{\}
begin{document}
[
x=parenVectorstack[r]{4\-3}
]
end{document}
add a comment |
documentclass[12pt]{article}
usepackage{stackengine}
setstackEOL{\}
begin{document}
[
x=parenVectorstack[r]{4\-3}
]
end{document}
documentclass[12pt]{article}
usepackage{stackengine}
setstackEOL{\}
begin{document}
[
x=parenVectorstack[r]{4\-3}
]
end{document}
answered Jan 27 at 21:48
Steven B. SegletesSteven B. Segletes
159k9204413
159k9204413
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%2f472153%2fhow-to-align-numbers-in-parentheses%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
1
use
array
and a r-aligned column (note this is horizontal alignment rather than vertical alignment, vertical alignment refers to aligning to the top or the bottom of a box)– David Carlisle
Jan 27 at 21:28