Why are there no dint or dsum like dfrac?

Clash Royale CLAN TAG#URR8PPP
up vote
10
down vote
favorite
This was inspired by How to have nice-looking symbols within an itemize environment? and Sigur's comment which remind me about the display style of math formulas and the fractions.
I know that, in the amsmath package there is already dfrac for us to have display-style fractions (as well as tfrac for in-line fraction).

Then why don't dsum, dprod, dint, etc. exist?
If they are not to exist, then why does dfrac exist?
Actually, we can define, for example, dint as
DeclareMathOperatordintdisplaystyleint
but I want to know the reason why there are no dint, etc. Or can you tell me the packages in which these d- are in?
macros amsmath inline displaystyle
add a comment |
up vote
10
down vote
favorite
This was inspired by How to have nice-looking symbols within an itemize environment? and Sigur's comment which remind me about the display style of math formulas and the fractions.
I know that, in the amsmath package there is already dfrac for us to have display-style fractions (as well as tfrac for in-line fraction).

Then why don't dsum, dprod, dint, etc. exist?
If they are not to exist, then why does dfrac exist?
Actually, we can define, for example, dint as
DeclareMathOperatordintdisplaystyleint
but I want to know the reason why there are no dint, etc. Or can you tell me the packages in which these d- are in?
macros amsmath inline displaystyle
Essentially becausedisplaystyleintwill make everything in the formula in display style. Or not work as you intend.
– egreg
Nov 17 at 15:38
@egreg If they saydisplaystyleintis okay, they should also saydisplaystylefracis okay :))
– Dũng Vũ
Nov 17 at 15:41
1
Of coursedfracis not defined asdisplaystylefrac.
– egreg
Nov 17 at 15:43
@egreg I agree. But they are the same, or nearly. If developers can find a way to definedfracnot asdisplaystylefrac, I think they can do the same for the rest :))
– Dũng Vũ
Nov 17 at 15:48
add a comment |
up vote
10
down vote
favorite
up vote
10
down vote
favorite
This was inspired by How to have nice-looking symbols within an itemize environment? and Sigur's comment which remind me about the display style of math formulas and the fractions.
I know that, in the amsmath package there is already dfrac for us to have display-style fractions (as well as tfrac for in-line fraction).

Then why don't dsum, dprod, dint, etc. exist?
If they are not to exist, then why does dfrac exist?
Actually, we can define, for example, dint as
DeclareMathOperatordintdisplaystyleint
but I want to know the reason why there are no dint, etc. Or can you tell me the packages in which these d- are in?
macros amsmath inline displaystyle
This was inspired by How to have nice-looking symbols within an itemize environment? and Sigur's comment which remind me about the display style of math formulas and the fractions.
I know that, in the amsmath package there is already dfrac for us to have display-style fractions (as well as tfrac for in-line fraction).

Then why don't dsum, dprod, dint, etc. exist?
If they are not to exist, then why does dfrac exist?
Actually, we can define, for example, dint as
DeclareMathOperatordintdisplaystyleint
but I want to know the reason why there are no dint, etc. Or can you tell me the packages in which these d- are in?
macros amsmath inline displaystyle
macros amsmath inline displaystyle
edited 2 days ago
Peter Mortensen
52736
52736
asked Nov 17 at 15:26
Dũng Vũ
1,09920
1,09920
Essentially becausedisplaystyleintwill make everything in the formula in display style. Or not work as you intend.
– egreg
Nov 17 at 15:38
@egreg If they saydisplaystyleintis okay, they should also saydisplaystylefracis okay :))
– Dũng Vũ
Nov 17 at 15:41
1
Of coursedfracis not defined asdisplaystylefrac.
– egreg
Nov 17 at 15:43
@egreg I agree. But they are the same, or nearly. If developers can find a way to definedfracnot asdisplaystylefrac, I think they can do the same for the rest :))
– Dũng Vũ
Nov 17 at 15:48
add a comment |
Essentially becausedisplaystyleintwill make everything in the formula in display style. Or not work as you intend.
– egreg
Nov 17 at 15:38
@egreg If they saydisplaystyleintis okay, they should also saydisplaystylefracis okay :))
– Dũng Vũ
Nov 17 at 15:41
1
Of coursedfracis not defined asdisplaystylefrac.
– egreg
Nov 17 at 15:43
@egreg I agree. But they are the same, or nearly. If developers can find a way to definedfracnot asdisplaystylefrac, I think they can do the same for the rest :))
– Dũng Vũ
Nov 17 at 15:48
Essentially because
displaystyleint will make everything in the formula in display style. Or not work as you intend.– egreg
Nov 17 at 15:38
Essentially because
displaystyleint will make everything in the formula in display style. Or not work as you intend.– egreg
Nov 17 at 15:38
@egreg If they say
displaystyleint is okay, they should also say displaystylefrac is okay :))– Dũng Vũ
Nov 17 at 15:41
@egreg If they say
displaystyleint is okay, they should also say displaystylefrac is okay :))– Dũng Vũ
Nov 17 at 15:41
1
1
Of course
dfrac is not defined as displaystylefrac.– egreg
Nov 17 at 15:43
Of course
dfrac is not defined as displaystylefrac.– egreg
Nov 17 at 15:43
@egreg I agree. But they are the same, or nearly. If developers can find a way to define
dfrac not as displaystylefrac, I think they can do the same for the rest :))– Dũng Vũ
Nov 17 at 15:48
@egreg I agree. But they are the same, or nearly. If developers can find a way to define
dfrac not as displaystylefrac, I think they can do the same for the rest :))– Dũng Vũ
Nov 17 at 15:48
add a comment |
1 Answer
1
active
oldest
votes
up vote
13
down vote
accepted
The command dfrac exists for rendering multistory fractions, say
[
fracdfracab-dfraccd{dfracab+dfraccd
]
and is not generally intended for usage in an inline formula. It is not defined using the simplistic format displaystylefrac, but rather
% amsmath.sty, line 214:
newcommanddfracgenfrac0
where genfrac is
% amsmath.sty, line 221:
DeclareRobustCommandgenfrac[4]%
def@tempa#1#2%
edef@tempb@nx@genfrac@mathstyle#4%
csname @@ifx @#3@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempb#1#2#3
% amsmath.sty, line 289:
def@genfrac#1#2#3#4#5#1begingroup#4endgroup#2#3relax#5
def@mathstyle#1%
ifx@empty#1@emptyrelax
elseifcase#1displaystyle % case 0
ortextstyleorscriptstyleelsescriptscriptstylefifi
What happens with dfracab? By definition this becomes genfrac0ab, so
def@tempa%
edef@tempb@nx@genfrac@mathstyle0%
csname @@ifx @@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempbab
By definition of @mathstyle, @tempb is defined to be @genfracdisplaystyle@@over, so we're left with
@genfracdisplaystyle@@overab
which in turn becomes
displaystylebegingroup aendgroup@@overrelax b
and @@over is the primitive over. Note the braces around the whole construction. You may enjoy chasing the expansion of frac, binom and dbinom.
With int one cannot do displaystyleint, because this wouldn't confine the scope of displaystyle, nor displaystyleint, because this would not place correctly the limits. Indeed, the test file
documentclassarticle
usepackageamsmath
DeclareMathOperatordintdisplaystyleint
newcommandddintdisplaystyleint
begindocument
$dint_0^1fracx2,dx$
$ddint_0^1fracx2,dx$
enddocument
produces wrong output in either case:

Can one do something about this? Yes, but I don't think it's worth the pain. Anyway, here it is:
documentclassarticle
usepackageamsmath
usepackagexparse
NewDocumentCommanddinttlimits e_^%
mathop
displaystyleint
IfBooleanT#1limits
IfValueT#2_#2
IfValueT#3^#3
%
begindocument
$dint_0^1fracx2,dx$
$dintlimits_0^1fracx2,dx$
$dintfracx2,dx$
enddocument

Oh I see! Thank you very much!
– Dũng Vũ
Nov 17 at 16:03
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
13
down vote
accepted
The command dfrac exists for rendering multistory fractions, say
[
fracdfracab-dfraccd{dfracab+dfraccd
]
and is not generally intended for usage in an inline formula. It is not defined using the simplistic format displaystylefrac, but rather
% amsmath.sty, line 214:
newcommanddfracgenfrac0
where genfrac is
% amsmath.sty, line 221:
DeclareRobustCommandgenfrac[4]%
def@tempa#1#2%
edef@tempb@nx@genfrac@mathstyle#4%
csname @@ifx @#3@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempb#1#2#3
% amsmath.sty, line 289:
def@genfrac#1#2#3#4#5#1begingroup#4endgroup#2#3relax#5
def@mathstyle#1%
ifx@empty#1@emptyrelax
elseifcase#1displaystyle % case 0
ortextstyleorscriptstyleelsescriptscriptstylefifi
What happens with dfracab? By definition this becomes genfrac0ab, so
def@tempa%
edef@tempb@nx@genfrac@mathstyle0%
csname @@ifx @@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempbab
By definition of @mathstyle, @tempb is defined to be @genfracdisplaystyle@@over, so we're left with
@genfracdisplaystyle@@overab
which in turn becomes
displaystylebegingroup aendgroup@@overrelax b
and @@over is the primitive over. Note the braces around the whole construction. You may enjoy chasing the expansion of frac, binom and dbinom.
With int one cannot do displaystyleint, because this wouldn't confine the scope of displaystyle, nor displaystyleint, because this would not place correctly the limits. Indeed, the test file
documentclassarticle
usepackageamsmath
DeclareMathOperatordintdisplaystyleint
newcommandddintdisplaystyleint
begindocument
$dint_0^1fracx2,dx$
$ddint_0^1fracx2,dx$
enddocument
produces wrong output in either case:

Can one do something about this? Yes, but I don't think it's worth the pain. Anyway, here it is:
documentclassarticle
usepackageamsmath
usepackagexparse
NewDocumentCommanddinttlimits e_^%
mathop
displaystyleint
IfBooleanT#1limits
IfValueT#2_#2
IfValueT#3^#3
%
begindocument
$dint_0^1fracx2,dx$
$dintlimits_0^1fracx2,dx$
$dintfracx2,dx$
enddocument

Oh I see! Thank you very much!
– Dũng Vũ
Nov 17 at 16:03
add a comment |
up vote
13
down vote
accepted
The command dfrac exists for rendering multistory fractions, say
[
fracdfracab-dfraccd{dfracab+dfraccd
]
and is not generally intended for usage in an inline formula. It is not defined using the simplistic format displaystylefrac, but rather
% amsmath.sty, line 214:
newcommanddfracgenfrac0
where genfrac is
% amsmath.sty, line 221:
DeclareRobustCommandgenfrac[4]%
def@tempa#1#2%
edef@tempb@nx@genfrac@mathstyle#4%
csname @@ifx @#3@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempb#1#2#3
% amsmath.sty, line 289:
def@genfrac#1#2#3#4#5#1begingroup#4endgroup#2#3relax#5
def@mathstyle#1%
ifx@empty#1@emptyrelax
elseifcase#1displaystyle % case 0
ortextstyleorscriptstyleelsescriptscriptstylefifi
What happens with dfracab? By definition this becomes genfrac0ab, so
def@tempa%
edef@tempb@nx@genfrac@mathstyle0%
csname @@ifx @@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempbab
By definition of @mathstyle, @tempb is defined to be @genfracdisplaystyle@@over, so we're left with
@genfracdisplaystyle@@overab
which in turn becomes
displaystylebegingroup aendgroup@@overrelax b
and @@over is the primitive over. Note the braces around the whole construction. You may enjoy chasing the expansion of frac, binom and dbinom.
With int one cannot do displaystyleint, because this wouldn't confine the scope of displaystyle, nor displaystyleint, because this would not place correctly the limits. Indeed, the test file
documentclassarticle
usepackageamsmath
DeclareMathOperatordintdisplaystyleint
newcommandddintdisplaystyleint
begindocument
$dint_0^1fracx2,dx$
$ddint_0^1fracx2,dx$
enddocument
produces wrong output in either case:

Can one do something about this? Yes, but I don't think it's worth the pain. Anyway, here it is:
documentclassarticle
usepackageamsmath
usepackagexparse
NewDocumentCommanddinttlimits e_^%
mathop
displaystyleint
IfBooleanT#1limits
IfValueT#2_#2
IfValueT#3^#3
%
begindocument
$dint_0^1fracx2,dx$
$dintlimits_0^1fracx2,dx$
$dintfracx2,dx$
enddocument

Oh I see! Thank you very much!
– Dũng Vũ
Nov 17 at 16:03
add a comment |
up vote
13
down vote
accepted
up vote
13
down vote
accepted
The command dfrac exists for rendering multistory fractions, say
[
fracdfracab-dfraccd{dfracab+dfraccd
]
and is not generally intended for usage in an inline formula. It is not defined using the simplistic format displaystylefrac, but rather
% amsmath.sty, line 214:
newcommanddfracgenfrac0
where genfrac is
% amsmath.sty, line 221:
DeclareRobustCommandgenfrac[4]%
def@tempa#1#2%
edef@tempb@nx@genfrac@mathstyle#4%
csname @@ifx @#3@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempb#1#2#3
% amsmath.sty, line 289:
def@genfrac#1#2#3#4#5#1begingroup#4endgroup#2#3relax#5
def@mathstyle#1%
ifx@empty#1@emptyrelax
elseifcase#1displaystyle % case 0
ortextstyleorscriptstyleelsescriptscriptstylefifi
What happens with dfracab? By definition this becomes genfrac0ab, so
def@tempa%
edef@tempb@nx@genfrac@mathstyle0%
csname @@ifx @@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempbab
By definition of @mathstyle, @tempb is defined to be @genfracdisplaystyle@@over, so we're left with
@genfracdisplaystyle@@overab
which in turn becomes
displaystylebegingroup aendgroup@@overrelax b
and @@over is the primitive over. Note the braces around the whole construction. You may enjoy chasing the expansion of frac, binom and dbinom.
With int one cannot do displaystyleint, because this wouldn't confine the scope of displaystyle, nor displaystyleint, because this would not place correctly the limits. Indeed, the test file
documentclassarticle
usepackageamsmath
DeclareMathOperatordintdisplaystyleint
newcommandddintdisplaystyleint
begindocument
$dint_0^1fracx2,dx$
$ddint_0^1fracx2,dx$
enddocument
produces wrong output in either case:

Can one do something about this? Yes, but I don't think it's worth the pain. Anyway, here it is:
documentclassarticle
usepackageamsmath
usepackagexparse
NewDocumentCommanddinttlimits e_^%
mathop
displaystyleint
IfBooleanT#1limits
IfValueT#2_#2
IfValueT#3^#3
%
begindocument
$dint_0^1fracx2,dx$
$dintlimits_0^1fracx2,dx$
$dintfracx2,dx$
enddocument

The command dfrac exists for rendering multistory fractions, say
[
fracdfracab-dfraccd{dfracab+dfraccd
]
and is not generally intended for usage in an inline formula. It is not defined using the simplistic format displaystylefrac, but rather
% amsmath.sty, line 214:
newcommanddfracgenfrac0
where genfrac is
% amsmath.sty, line 221:
DeclareRobustCommandgenfrac[4]%
def@tempa#1#2%
edef@tempb@nx@genfrac@mathstyle#4%
csname @@ifx @#3@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempb#1#2#3
% amsmath.sty, line 289:
def@genfrac#1#2#3#4#5#1begingroup#4endgroup#2#3relax#5
def@mathstyle#1%
ifx@empty#1@emptyrelax
elseifcase#1displaystyle % case 0
ortextstyleorscriptstyleelsescriptscriptstylefifi
What happens with dfracab? By definition this becomes genfrac0ab, so
def@tempa%
edef@tempb@nx@genfrac@mathstyle0%
csname @@ifx @@overelse abovefi
ifx@tempa@empty else withdelimsfiendcsname
@tempbab
By definition of @mathstyle, @tempb is defined to be @genfracdisplaystyle@@over, so we're left with
@genfracdisplaystyle@@overab
which in turn becomes
displaystylebegingroup aendgroup@@overrelax b
and @@over is the primitive over. Note the braces around the whole construction. You may enjoy chasing the expansion of frac, binom and dbinom.
With int one cannot do displaystyleint, because this wouldn't confine the scope of displaystyle, nor displaystyleint, because this would not place correctly the limits. Indeed, the test file
documentclassarticle
usepackageamsmath
DeclareMathOperatordintdisplaystyleint
newcommandddintdisplaystyleint
begindocument
$dint_0^1fracx2,dx$
$ddint_0^1fracx2,dx$
enddocument
produces wrong output in either case:

Can one do something about this? Yes, but I don't think it's worth the pain. Anyway, here it is:
documentclassarticle
usepackageamsmath
usepackagexparse
NewDocumentCommanddinttlimits e_^%
mathop
displaystyleint
IfBooleanT#1limits
IfValueT#2_#2
IfValueT#3^#3
%
begindocument
$dint_0^1fracx2,dx$
$dintlimits_0^1fracx2,dx$
$dintfracx2,dx$
enddocument

edited Nov 17 at 16:19
answered Nov 17 at 16:01
egreg
698k8518573125
698k8518573125
Oh I see! Thank you very much!
– Dũng Vũ
Nov 17 at 16:03
add a comment |
Oh I see! Thank you very much!
– Dũng Vũ
Nov 17 at 16:03
Oh I see! Thank you very much!
– Dũng Vũ
Nov 17 at 16:03
Oh I see! Thank you very much!
– Dũng Vũ
Nov 17 at 16:03
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%2f460464%2fwhy-are-there-no-dint-or-dsum-like-dfrac%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
Essentially because
displaystyleintwill make everything in the formula in display style. Or not work as you intend.– egreg
Nov 17 at 15:38
@egreg If they say
displaystyleintis okay, they should also saydisplaystylefracis okay :))– Dũng Vũ
Nov 17 at 15:41
1
Of course
dfracis not defined asdisplaystylefrac.– egreg
Nov 17 at 15:43
@egreg I agree. But they are the same, or nearly. If developers can find a way to define
dfracnot asdisplaystylefrac, I think they can do the same for the rest :))– Dũng Vũ
Nov 17 at 15:48