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)
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
add a comment |
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)
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
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
add a comment |
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)
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
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)
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
math-mode vertical-alignment scaling characters parentheses
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f459214%2fcentring-characters-and-if-needed-enlarging-parenthesis-to-contain-accented-ch%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
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