Centring characters and, if needed, enlarging parenthesis to contain accented characters in them











up vote
0
down vote

favorite












I would like to centre characters and, if needed, enlarge parenthesis, in such a way that they fully contain accented characters and characters with symbols upon them, like a vector arrow for example.



The following code



documentclass[12pt]{article}

usepackage{stackengine}
newlengthshlength
newcommandcvec[2][0]{setlengthshlength{#1pt}%
stackengine{-5.1pt}{$#2$}{smash{$kernshlength%
stackengine{7.225pt}{$mathchar"017E$}%
{rule{widthof{$#2$}}{.3pt}kern.4pt}{O}{r}{F}{F}{L}kern-shlength$}}%
{O}{c}{F}{T}{S}}

begin{document}
${grave{E}} {E} {grave{a}} {a} {cvec{ell}} {ell}$
end{document}


Produces the following (the characters shown are only examples)



enter image description here



I'm using a custom vector arrow so that it extends to all characters below it and that I can manually centre over them.



As it can be seen there are two things that puzzle me. Namely:




  • Why the characters aren't centred but shifted vertically in respect to the centre of the parenthesis, how can this be adjusted?

  • How to enlarge the parenthesis, if needed, such that they contain the accent or the vector symbol (or any other symbol)?


I've used the curly braces only because with them it's easy to see where the centre is, but I'd like the whole thing to be applicable to all three types of parenthesis.



I know that to enlarge parenthesis I could use commands like big and similar but it would be nice to have them of the specific size needed, not just a generic bigger size. Additionally, it would be nice not to have to do it manually all the time too.



Thank you for your time, it is very appreciated.










share|improve this question




















  • 1




    The braces' vertical center is on the formula axis, basically where fraction lines sit or the vertical center of =. Letters don't obey this, because they sit on the baseline.
    – egreg
    Nov 9 at 21:48















up vote
0
down vote

favorite












I would like to centre characters and, if needed, enlarge parenthesis, in such a way that they fully contain accented characters and characters with symbols upon them, like a vector arrow for example.



The following code



documentclass[12pt]{article}

usepackage{stackengine}
newlengthshlength
newcommandcvec[2][0]{setlengthshlength{#1pt}%
stackengine{-5.1pt}{$#2$}{smash{$kernshlength%
stackengine{7.225pt}{$mathchar"017E$}%
{rule{widthof{$#2$}}{.3pt}kern.4pt}{O}{r}{F}{F}{L}kern-shlength$}}%
{O}{c}{F}{T}{S}}

begin{document}
${grave{E}} {E} {grave{a}} {a} {cvec{ell}} {ell}$
end{document}


Produces the following (the characters shown are only examples)



enter image description here



I'm using a custom vector arrow so that it extends to all characters below it and that I can manually centre over them.



As it can be seen there are two things that puzzle me. Namely:




  • Why the characters aren't centred but shifted vertically in respect to the centre of the parenthesis, how can this be adjusted?

  • How to enlarge the parenthesis, if needed, such that they contain the accent or the vector symbol (or any other symbol)?


I've used the curly braces only because with them it's easy to see where the centre is, but I'd like the whole thing to be applicable to all three types of parenthesis.



I know that to enlarge parenthesis I could use commands like big and similar but it would be nice to have them of the specific size needed, not just a generic bigger size. Additionally, it would be nice not to have to do it manually all the time too.



Thank you for your time, it is very appreciated.










share|improve this question




















  • 1




    The braces' vertical center is on the formula axis, basically where fraction lines sit or the vertical center of =. Letters don't obey this, because they sit on the baseline.
    – egreg
    Nov 9 at 21:48













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I would like to centre characters and, if needed, enlarge parenthesis, in such a way that they fully contain accented characters and characters with symbols upon them, like a vector arrow for example.



The following code



documentclass[12pt]{article}

usepackage{stackengine}
newlengthshlength
newcommandcvec[2][0]{setlengthshlength{#1pt}%
stackengine{-5.1pt}{$#2$}{smash{$kernshlength%
stackengine{7.225pt}{$mathchar"017E$}%
{rule{widthof{$#2$}}{.3pt}kern.4pt}{O}{r}{F}{F}{L}kern-shlength$}}%
{O}{c}{F}{T}{S}}

begin{document}
${grave{E}} {E} {grave{a}} {a} {cvec{ell}} {ell}$
end{document}


Produces the following (the characters shown are only examples)



enter image description here



I'm using a custom vector arrow so that it extends to all characters below it and that I can manually centre over them.



As it can be seen there are two things that puzzle me. Namely:




  • Why the characters aren't centred but shifted vertically in respect to the centre of the parenthesis, how can this be adjusted?

  • How to enlarge the parenthesis, if needed, such that they contain the accent or the vector symbol (or any other symbol)?


I've used the curly braces only because with them it's easy to see where the centre is, but I'd like the whole thing to be applicable to all three types of parenthesis.



I know that to enlarge parenthesis I could use commands like big and similar but it would be nice to have them of the specific size needed, not just a generic bigger size. Additionally, it would be nice not to have to do it manually all the time too.



Thank you for your time, it is very appreciated.










share|improve this question















I would like to centre characters and, if needed, enlarge parenthesis, in such a way that they fully contain accented characters and characters with symbols upon them, like a vector arrow for example.



The following code



documentclass[12pt]{article}

usepackage{stackengine}
newlengthshlength
newcommandcvec[2][0]{setlengthshlength{#1pt}%
stackengine{-5.1pt}{$#2$}{smash{$kernshlength%
stackengine{7.225pt}{$mathchar"017E$}%
{rule{widthof{$#2$}}{.3pt}kern.4pt}{O}{r}{F}{F}{L}kern-shlength$}}%
{O}{c}{F}{T}{S}}

begin{document}
${grave{E}} {E} {grave{a}} {a} {cvec{ell}} {ell}$
end{document}


Produces the following (the characters shown are only examples)



enter image description here



I'm using a custom vector arrow so that it extends to all characters below it and that I can manually centre over them.



As it can be seen there are two things that puzzle me. Namely:




  • Why the characters aren't centred but shifted vertically in respect to the centre of the parenthesis, how can this be adjusted?

  • How to enlarge the parenthesis, if needed, such that they contain the accent or the vector symbol (or any other symbol)?


I've used the curly braces only because with them it's easy to see where the centre is, but I'd like the whole thing to be applicable to all three types of parenthesis.



I know that to enlarge parenthesis I could use commands like big and similar but it would be nice to have them of the specific size needed, not just a generic bigger size. Additionally, it would be nice not to have to do it manually all the time too.



Thank you for your time, it is very appreciated.







math-mode vertical-alignment scaling characters parentheses






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 at 23:00

























asked Nov 9 at 21:26









Edoardo Serra

138110




138110








  • 1




    The braces' vertical center is on the formula axis, basically where fraction lines sit or the vertical center of =. Letters don't obey this, because they sit on the baseline.
    – egreg
    Nov 9 at 21:48














  • 1




    The braces' vertical center is on the formula axis, basically where fraction lines sit or the vertical center of =. Letters don't obey this, because they sit on the baseline.
    – egreg
    Nov 9 at 21:48








1




1




The braces' vertical center is on the formula axis, basically where fraction lines sit or the vertical center of =. Letters don't obey this, because they sit on the baseline.
– egreg
Nov 9 at 21:48




The braces' vertical center is on the formula axis, basically where fraction lines sit or the vertical center of =. Letters don't obey this, because they sit on the baseline.
– egreg
Nov 9 at 21:48















active

oldest

votes











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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459214%2fcentring-characters-and-if-needed-enlarging-parenthesis-to-contain-accented-ch%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459214%2fcentring-characters-and-if-needed-enlarging-parenthesis-to-contain-accented-ch%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?