get width and height of character in the power

The name of the pictureThe name of the pictureThe name of the pictureClash 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.
enter image description here










share|improve this question







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 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














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.
enter image description here










share|improve this question







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 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












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.
enter image description here










share|improve this question







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.
enter image description here







math-mode superscripts lengths






share|improve this question







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.











share|improve this question







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.









share|improve this question




share|improve this question






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 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
















  • 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















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










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


enter image description here






share|improve this answer




















  • 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











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',
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
);



);






user3820991 is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















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






























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


enter image description here






share|improve this answer




















  • 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















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


enter image description here






share|improve this answer




















  • 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













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


enter image description here






share|improve this answer












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


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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











user3820991 is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















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.













 


draft saved


draft discarded














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













































































Comments

Popular posts from this blog

White Anglo-Saxon Protestant

BuddyTV

Conflict (narrative)