Force placement of sum operands over index
up vote
7
down vote
favorite
I want to force the operands of a sum to be placed above an "extended" (longer than usual) index, instead of increasing the width of the sum (in the example, see the sums in (2), which are much wider than in (1), because of the different index). I need this for space reasons, the formula is bigger than in the MWE. Do you have any ideas how to achieve this?

documentclass[12pt]{article}
usepackage{amsmath}
begin{document}
begin{align}
text{textbf{Total Cost }}
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{i in {m | Z_m = 1}} 10,000 + sum_{j in {k | K_m = 1}}
7,000
end{align}
end{document}
amsmath
add a comment |
up vote
7
down vote
favorite
I want to force the operands of a sum to be placed above an "extended" (longer than usual) index, instead of increasing the width of the sum (in the example, see the sums in (2), which are much wider than in (1), because of the different index). I need this for space reasons, the formula is bigger than in the MWE. Do you have any ideas how to achieve this?

documentclass[12pt]{article}
usepackage{amsmath}
begin{document}
begin{align}
text{textbf{Total Cost }}
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{i in {m | Z_m = 1}} 10,000 + sum_{j in {k | K_m = 1}}
7,000
end{align}
end{document}
amsmath
Did you trymathclapfrommathtools?
– nidhin
2 days ago
add a comment |
up vote
7
down vote
favorite
up vote
7
down vote
favorite
I want to force the operands of a sum to be placed above an "extended" (longer than usual) index, instead of increasing the width of the sum (in the example, see the sums in (2), which are much wider than in (1), because of the different index). I need this for space reasons, the formula is bigger than in the MWE. Do you have any ideas how to achieve this?

documentclass[12pt]{article}
usepackage{amsmath}
begin{document}
begin{align}
text{textbf{Total Cost }}
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{i in {m | Z_m = 1}} 10,000 + sum_{j in {k | K_m = 1}}
7,000
end{align}
end{document}
amsmath
I want to force the operands of a sum to be placed above an "extended" (longer than usual) index, instead of increasing the width of the sum (in the example, see the sums in (2), which are much wider than in (1), because of the different index). I need this for space reasons, the formula is bigger than in the MWE. Do you have any ideas how to achieve this?

documentclass[12pt]{article}
usepackage{amsmath}
begin{document}
begin{align}
text{textbf{Total Cost }}
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{i in {m | Z_m = 1}} 10,000 + sum_{j in {k | K_m = 1}}
7,000
end{align}
end{document}
amsmath
amsmath
asked 2 days ago
ncw
1704
1704
Did you trymathclapfrommathtools?
– nidhin
2 days ago
add a comment |
Did you trymathclapfrommathtools?
– nidhin
2 days ago
Did you try
mathclap from mathtools?– nidhin
2 days ago
Did you try
mathclap from mathtools?– nidhin
2 days ago
add a comment |
3 Answers
3
active
oldest
votes
up vote
8
down vote
accepted
Use mathclap from mathtools package.
documentclass[12pt]{article}
%usepackage{amsmath}
usepackage{mathtools}
begin{document}
begin{align}
text{textbf{Total Cost }}
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m | Z_m = 1}}} 10,000 + sum_{mathclap{j in {k | K_m = 1}} }
7,000
end{align}
end{document}

add a comment |
up vote
8
down vote
mathtools loads amsmath.

documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m, | , Z_m = 1}}} 10,000 + sum_{mathclap{j in {k, | , K_m = 1}}} 7,000
end{align}
end{document}
1
few seconds .. :)
– nidhin
2 days ago
Hi Sigur, I accepted @nidhin's answer, since he commented 3 minutes before posting his own answer and thus was a little faster. Thanks very much though for the quick and helpful answer, I appreciate the effort!
– ncw
2 days ago
1
@ncw, no problem. Just pay attention in my comments on trailing spaces. Also, onlytextbfis enough.
– Sigur
2 days ago
add a comment |
up vote
7
down vote
A variant, with the smashoperator command from mathtools – and some improvements with siunitx, so the comma separator in numbers doesn't add a space.
smashoperator can take an optional argument, [l] or [r] which are equivalent to mathlap or mathrlap respectively. I demonstrate it in a $3$rd equation:
documentclass[12pt]{article}
usepackage{mathtools}
usepackage{siunitx}
begin{document}
sisetup{group-digits = integer, group-separator={,}, group-minimum-digits = 4}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} num{10000} cdot Z_m + num{7000} cdot K_m \
&= smashoperator{sum_{i in {mmid Z_m = 1}}}num{10000} + smashoperator{sum_{j in {kmid K_m = 1}}} num{7000} \
&= smashoperator[r]{sum_{i in {mmid Z_m = 1}}} num{10000} + smashoperator[l]{sum_{j in {kmid K_m = 1}}} num{7000}
end{align}
end{document}

add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
accepted
Use mathclap from mathtools package.
documentclass[12pt]{article}
%usepackage{amsmath}
usepackage{mathtools}
begin{document}
begin{align}
text{textbf{Total Cost }}
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m | Z_m = 1}}} 10,000 + sum_{mathclap{j in {k | K_m = 1}} }
7,000
end{align}
end{document}

add a comment |
up vote
8
down vote
accepted
Use mathclap from mathtools package.
documentclass[12pt]{article}
%usepackage{amsmath}
usepackage{mathtools}
begin{document}
begin{align}
text{textbf{Total Cost }}
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m | Z_m = 1}}} 10,000 + sum_{mathclap{j in {k | K_m = 1}} }
7,000
end{align}
end{document}

add a comment |
up vote
8
down vote
accepted
up vote
8
down vote
accepted
Use mathclap from mathtools package.
documentclass[12pt]{article}
%usepackage{amsmath}
usepackage{mathtools}
begin{document}
begin{align}
text{textbf{Total Cost }}
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m | Z_m = 1}}} 10,000 + sum_{mathclap{j in {k | K_m = 1}} }
7,000
end{align}
end{document}

Use mathclap from mathtools package.
documentclass[12pt]{article}
%usepackage{amsmath}
usepackage{mathtools}
begin{document}
begin{align}
text{textbf{Total Cost }}
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m | Z_m = 1}}} 10,000 + sum_{mathclap{j in {k | K_m = 1}} }
7,000
end{align}
end{document}

edited 2 days ago
answered 2 days ago
nidhin
1,430820
1,430820
add a comment |
add a comment |
up vote
8
down vote
mathtools loads amsmath.

documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m, | , Z_m = 1}}} 10,000 + sum_{mathclap{j in {k, | , K_m = 1}}} 7,000
end{align}
end{document}
1
few seconds .. :)
– nidhin
2 days ago
Hi Sigur, I accepted @nidhin's answer, since he commented 3 minutes before posting his own answer and thus was a little faster. Thanks very much though for the quick and helpful answer, I appreciate the effort!
– ncw
2 days ago
1
@ncw, no problem. Just pay attention in my comments on trailing spaces. Also, onlytextbfis enough.
– Sigur
2 days ago
add a comment |
up vote
8
down vote
mathtools loads amsmath.

documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m, | , Z_m = 1}}} 10,000 + sum_{mathclap{j in {k, | , K_m = 1}}} 7,000
end{align}
end{document}
1
few seconds .. :)
– nidhin
2 days ago
Hi Sigur, I accepted @nidhin's answer, since he commented 3 minutes before posting his own answer and thus was a little faster. Thanks very much though for the quick and helpful answer, I appreciate the effort!
– ncw
2 days ago
1
@ncw, no problem. Just pay attention in my comments on trailing spaces. Also, onlytextbfis enough.
– Sigur
2 days ago
add a comment |
up vote
8
down vote
up vote
8
down vote
mathtools loads amsmath.

documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m, | , Z_m = 1}}} 10,000 + sum_{mathclap{j in {k, | , K_m = 1}}} 7,000
end{align}
end{document}
mathtools loads amsmath.

documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} 10,000 cdot Z_m + 7,000 cdot K_m \
&= sum_{mathclap{i in {m, | , Z_m = 1}}} 10,000 + sum_{mathclap{j in {k, | , K_m = 1}}} 7,000
end{align}
end{document}
edited 2 days ago
answered 2 days ago
Sigur
23.1k353134
23.1k353134
1
few seconds .. :)
– nidhin
2 days ago
Hi Sigur, I accepted @nidhin's answer, since he commented 3 minutes before posting his own answer and thus was a little faster. Thanks very much though for the quick and helpful answer, I appreciate the effort!
– ncw
2 days ago
1
@ncw, no problem. Just pay attention in my comments on trailing spaces. Also, onlytextbfis enough.
– Sigur
2 days ago
add a comment |
1
few seconds .. :)
– nidhin
2 days ago
Hi Sigur, I accepted @nidhin's answer, since he commented 3 minutes before posting his own answer and thus was a little faster. Thanks very much though for the quick and helpful answer, I appreciate the effort!
– ncw
2 days ago
1
@ncw, no problem. Just pay attention in my comments on trailing spaces. Also, onlytextbfis enough.
– Sigur
2 days ago
1
1
few seconds .. :)
– nidhin
2 days ago
few seconds .. :)
– nidhin
2 days ago
Hi Sigur, I accepted @nidhin's answer, since he commented 3 minutes before posting his own answer and thus was a little faster. Thanks very much though for the quick and helpful answer, I appreciate the effort!
– ncw
2 days ago
Hi Sigur, I accepted @nidhin's answer, since he commented 3 minutes before posting his own answer and thus was a little faster. Thanks very much though for the quick and helpful answer, I appreciate the effort!
– ncw
2 days ago
1
1
@ncw, no problem. Just pay attention in my comments on trailing spaces. Also, only
textbf is enough.– Sigur
2 days ago
@ncw, no problem. Just pay attention in my comments on trailing spaces. Also, only
textbf is enough.– Sigur
2 days ago
add a comment |
up vote
7
down vote
A variant, with the smashoperator command from mathtools – and some improvements with siunitx, so the comma separator in numbers doesn't add a space.
smashoperator can take an optional argument, [l] or [r] which are equivalent to mathlap or mathrlap respectively. I demonstrate it in a $3$rd equation:
documentclass[12pt]{article}
usepackage{mathtools}
usepackage{siunitx}
begin{document}
sisetup{group-digits = integer, group-separator={,}, group-minimum-digits = 4}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} num{10000} cdot Z_m + num{7000} cdot K_m \
&= smashoperator{sum_{i in {mmid Z_m = 1}}}num{10000} + smashoperator{sum_{j in {kmid K_m = 1}}} num{7000} \
&= smashoperator[r]{sum_{i in {mmid Z_m = 1}}} num{10000} + smashoperator[l]{sum_{j in {kmid K_m = 1}}} num{7000}
end{align}
end{document}

add a comment |
up vote
7
down vote
A variant, with the smashoperator command from mathtools – and some improvements with siunitx, so the comma separator in numbers doesn't add a space.
smashoperator can take an optional argument, [l] or [r] which are equivalent to mathlap or mathrlap respectively. I demonstrate it in a $3$rd equation:
documentclass[12pt]{article}
usepackage{mathtools}
usepackage{siunitx}
begin{document}
sisetup{group-digits = integer, group-separator={,}, group-minimum-digits = 4}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} num{10000} cdot Z_m + num{7000} cdot K_m \
&= smashoperator{sum_{i in {mmid Z_m = 1}}}num{10000} + smashoperator{sum_{j in {kmid K_m = 1}}} num{7000} \
&= smashoperator[r]{sum_{i in {mmid Z_m = 1}}} num{10000} + smashoperator[l]{sum_{j in {kmid K_m = 1}}} num{7000}
end{align}
end{document}

add a comment |
up vote
7
down vote
up vote
7
down vote
A variant, with the smashoperator command from mathtools – and some improvements with siunitx, so the comma separator in numbers doesn't add a space.
smashoperator can take an optional argument, [l] or [r] which are equivalent to mathlap or mathrlap respectively. I demonstrate it in a $3$rd equation:
documentclass[12pt]{article}
usepackage{mathtools}
usepackage{siunitx}
begin{document}
sisetup{group-digits = integer, group-separator={,}, group-minimum-digits = 4}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} num{10000} cdot Z_m + num{7000} cdot K_m \
&= smashoperator{sum_{i in {mmid Z_m = 1}}}num{10000} + smashoperator{sum_{j in {kmid K_m = 1}}} num{7000} \
&= smashoperator[r]{sum_{i in {mmid Z_m = 1}}} num{10000} + smashoperator[l]{sum_{j in {kmid K_m = 1}}} num{7000}
end{align}
end{document}

A variant, with the smashoperator command from mathtools – and some improvements with siunitx, so the comma separator in numbers doesn't add a space.
smashoperator can take an optional argument, [l] or [r] which are equivalent to mathlap or mathrlap respectively. I demonstrate it in a $3$rd equation:
documentclass[12pt]{article}
usepackage{mathtools}
usepackage{siunitx}
begin{document}
sisetup{group-digits = integer, group-separator={,}, group-minimum-digits = 4}
begin{align}
textbf{Total Cost} % no trailing space inside braces
&= sum_{m=1}^{55} num{10000} cdot Z_m + num{7000} cdot K_m \
&= smashoperator{sum_{i in {mmid Z_m = 1}}}num{10000} + smashoperator{sum_{j in {kmid K_m = 1}}} num{7000} \
&= smashoperator[r]{sum_{i in {mmid Z_m = 1}}} num{10000} + smashoperator[l]{sum_{j in {kmid K_m = 1}}} num{7000}
end{align}
end{document}

edited 2 days ago
answered 2 days ago
Bernard
162k767192
162k767192
add a comment |
add a comment |
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%2f460496%2fforce-placement-of-sum-operands-over-index%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
Did you try
mathclapfrommathtools?– nidhin
2 days ago