get width and height of character in the power

Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I want to create a "minus-sign" in a superscript of a letter in math mode using rulewidthheight to get control over the look of it. In principle, I get something to my liking, but I fail to make the width and height adjust to when I use it in the power of an expression.
I tried:
newlengthcharheight
newlengthcharwidth
newcommandsupmin[1]%
settoheightcharheight#1
settowidthcharwidth#1
#1^rulecharwidthcharheight
and
newcommandsupmin[1]%
#1^rule1ex1em
both failed to adjust the box in the superscript when used in the power:
documentclass[12pt,a4paper]article
usepackageamsmath, amssymb, amsthm
begindocument
beginalign
k binomNk - supmink p^supmink > 0
endalign
enddocument
To my eye, these boxes have the same size.
math-mode superscripts lengths
New contributor
user3820991 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
3
down vote
favorite
I want to create a "minus-sign" in a superscript of a letter in math mode using rulewidthheight to get control over the look of it. In principle, I get something to my liking, but I fail to make the width and height adjust to when I use it in the power of an expression.
I tried:
newlengthcharheight
newlengthcharwidth
newcommandsupmin[1]%
settoheightcharheight#1
settowidthcharwidth#1
#1^rulecharwidthcharheight
and
newcommandsupmin[1]%
#1^rule1ex1em
both failed to adjust the box in the superscript when used in the power:
documentclass[12pt,a4paper]article
usepackageamsmath, amssymb, amsthm
begindocument
beginalign
k binomNk - supmink p^supmink > 0
endalign
enddocument
To my eye, these boxes have the same size.
math-mode superscripts lengths
New contributor
user3820991 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
They have the same size becausesettoheight...kandsettowidth...keffectively measure how large akwould be in the main text. They do not take into account the fact that you are using them in math mode (or in a superscript). You could measure e.g. the height of a script stylekwithsettoheight...$scriptstyle k$.
â Circumscribe
1 hour ago
(In egreg's answer,mathpaletteis used to automatically insertdisplaystyle,textstyle,scriptstyleorscriptscriptstyle(whichever is appropriate) as#1tosup@min(and the original argument as#2).)
â Circumscribe
1 hour ago
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I want to create a "minus-sign" in a superscript of a letter in math mode using rulewidthheight to get control over the look of it. In principle, I get something to my liking, but I fail to make the width and height adjust to when I use it in the power of an expression.
I tried:
newlengthcharheight
newlengthcharwidth
newcommandsupmin[1]%
settoheightcharheight#1
settowidthcharwidth#1
#1^rulecharwidthcharheight
and
newcommandsupmin[1]%
#1^rule1ex1em
both failed to adjust the box in the superscript when used in the power:
documentclass[12pt,a4paper]article
usepackageamsmath, amssymb, amsthm
begindocument
beginalign
k binomNk - supmink p^supmink > 0
endalign
enddocument
To my eye, these boxes have the same size.
math-mode superscripts lengths
New contributor
user3820991 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I want to create a "minus-sign" in a superscript of a letter in math mode using rulewidthheight to get control over the look of it. In principle, I get something to my liking, but I fail to make the width and height adjust to when I use it in the power of an expression.
I tried:
newlengthcharheight
newlengthcharwidth
newcommandsupmin[1]%
settoheightcharheight#1
settowidthcharwidth#1
#1^rulecharwidthcharheight
and
newcommandsupmin[1]%
#1^rule1ex1em
both failed to adjust the box in the superscript when used in the power:
documentclass[12pt,a4paper]article
usepackageamsmath, amssymb, amsthm
begindocument
beginalign
k binomNk - supmink p^supmink > 0
endalign
enddocument
To my eye, these boxes have the same size.
math-mode superscripts lengths
math-mode superscripts lengths
New contributor
user3820991 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user3820991 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user3820991 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 3 hours ago
user3820991
1183
1183
New contributor
user3820991 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user3820991 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user3820991 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
They have the same size becausesettoheight...kandsettowidth...keffectively measure how large akwould be in the main text. They do not take into account the fact that you are using them in math mode (or in a superscript). You could measure e.g. the height of a script stylekwithsettoheight...$scriptstyle k$.
â Circumscribe
1 hour ago
(In egreg's answer,mathpaletteis used to automatically insertdisplaystyle,textstyle,scriptstyleorscriptscriptstyle(whichever is appropriate) as#1tosup@min(and the original argument as#2).)
â Circumscribe
1 hour ago
add a comment |Â
They have the same size becausesettoheight...kandsettowidth...keffectively measure how large akwould be in the main text. They do not take into account the fact that you are using them in math mode (or in a superscript). You could measure e.g. the height of a script stylekwithsettoheight...$scriptstyle k$.
â Circumscribe
1 hour ago
(In egreg's answer,mathpaletteis used to automatically insertdisplaystyle,textstyle,scriptstyleorscriptscriptstyle(whichever is appropriate) as#1tosup@min(and the original argument as#2).)
â Circumscribe
1 hour ago
They have the same size because
settoheight...k and settowidth...k effectively measure how large a k would be in the main text. They do not take into account the fact that you are using them in math mode (or in a superscript). You could measure e.g. the height of a script style k with settoheight...$scriptstyle k$.â Circumscribe
1 hour ago
They have the same size because
settoheight...k and settowidth...k effectively measure how large a k would be in the main text. They do not take into account the fact that you are using them in math mode (or in a superscript). You could measure e.g. the height of a script style k with settoheight...$scriptstyle k$.â Circumscribe
1 hour ago
(In egreg's answer,
mathpalette is used to automatically insert displaystyle, textstyle, scriptstyle or scriptscriptstyle (whichever is appropriate) as #1 to sup@min (and the original argument as #2).)â Circumscribe
1 hour ago
(In egreg's answer,
mathpalette is used to automatically insert displaystyle, textstyle, scriptstyle or scriptscriptstyle (whichever is appropriate) as #1 to sup@min (and the original argument as #2).)â Circumscribe
1 hour ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
This is a job for mathpalette:
documentclass[12pt,a4paper]article
usepackageamsmath
makeatletter
newcommandsupmin[1]mathpalettesup@min#1
newcommandsup@min[2]%
begingroup % <- important
sboxz@$m@th#1#2$%
#2^rulewdz@htz@%
endgroup
makeatother
begindocument
beginalign
k binomNk - supmink p^supmink > 0
endalign
enddocument

Nice, doing a bit of scaling and using offset gave me the desired result:rule[0.3htz@]0.8wdz@0.03htz@
â user3820991
16 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
This is a job for mathpalette:
documentclass[12pt,a4paper]article
usepackageamsmath
makeatletter
newcommandsupmin[1]mathpalettesup@min#1
newcommandsup@min[2]%
begingroup % <- important
sboxz@$m@th#1#2$%
#2^rulewdz@htz@%
endgroup
makeatother
begindocument
beginalign
k binomNk - supmink p^supmink > 0
endalign
enddocument

Nice, doing a bit of scaling and using offset gave me the desired result:rule[0.3htz@]0.8wdz@0.03htz@
â user3820991
16 mins ago
add a comment |Â
up vote
2
down vote
accepted
This is a job for mathpalette:
documentclass[12pt,a4paper]article
usepackageamsmath
makeatletter
newcommandsupmin[1]mathpalettesup@min#1
newcommandsup@min[2]%
begingroup % <- important
sboxz@$m@th#1#2$%
#2^rulewdz@htz@%
endgroup
makeatother
begindocument
beginalign
k binomNk - supmink p^supmink > 0
endalign
enddocument

Nice, doing a bit of scaling and using offset gave me the desired result:rule[0.3htz@]0.8wdz@0.03htz@
â user3820991
16 mins ago
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
This is a job for mathpalette:
documentclass[12pt,a4paper]article
usepackageamsmath
makeatletter
newcommandsupmin[1]mathpalettesup@min#1
newcommandsup@min[2]%
begingroup % <- important
sboxz@$m@th#1#2$%
#2^rulewdz@htz@%
endgroup
makeatother
begindocument
beginalign
k binomNk - supmink p^supmink > 0
endalign
enddocument

This is a job for mathpalette:
documentclass[12pt,a4paper]article
usepackageamsmath
makeatletter
newcommandsupmin[1]mathpalettesup@min#1
newcommandsup@min[2]%
begingroup % <- important
sboxz@$m@th#1#2$%
#2^rulewdz@htz@%
endgroup
makeatother
begindocument
beginalign
k binomNk - supmink p^supmink > 0
endalign
enddocument

answered 2 hours ago
egreg
694k8518443099
694k8518443099
Nice, doing a bit of scaling and using offset gave me the desired result:rule[0.3htz@]0.8wdz@0.03htz@
â user3820991
16 mins ago
add a comment |Â
Nice, doing a bit of scaling and using offset gave me the desired result:rule[0.3htz@]0.8wdz@0.03htz@
â user3820991
16 mins ago
Nice, doing a bit of scaling and using offset gave me the desired result:
rule[0.3htz@]0.8wdz@0.03htz@â user3820991
16 mins ago
Nice, doing a bit of scaling and using offset gave me the desired result:
rule[0.3htz@]0.8wdz@0.03htz@â user3820991
16 mins ago
add a comment |Â
user3820991 is a new contributor. Be nice, and check out our Code of Conduct.
user3820991 is a new contributor. Be nice, and check out our Code of Conduct.
user3820991 is a new contributor. Be nice, and check out our Code of Conduct.
user3820991 is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458311%2fget-width-and-height-of-character-in-the-power%23new-answer', 'question_page');
);
Post as a guest
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
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
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

They have the same size because
settoheight...kandsettowidth...keffectively measure how large akwould be in the main text. They do not take into account the fact that you are using them in math mode (or in a superscript). You could measure e.g. the height of a script stylekwithsettoheight...$scriptstyle k$.â Circumscribe
1 hour ago
(In egreg's answer,
mathpaletteis used to automatically insertdisplaystyle,textstyle,scriptstyleorscriptscriptstyle(whichever is appropriate) as#1tosup@min(and the original argument as#2).)â Circumscribe
1 hour ago