Align vector symbol with upright math letter
So basically I need to put a vector symbol (vec
) on an upright letter for which I use mathrm
in math mode. For example:
vec{mathrm{E}}
While Katex seems to get the alignment right on all the letters:
My pdfTeX version doesn't do so well (using the same code):
Clearly the vector symbol is positioned such that it would be aligned if the letters were in italic mode.
Which leads me to the following question:
- How can I get the vector symbol aligned with the upright math letter using pdfTeX?
pdfTeX version
$ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Document setup
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
Complete example
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
begin{document}
begin{equation*}
vec{mathrm{A}};vec{mathrm{B}};vec{mathrm{C}};vec{mathrm{D}};vec{mathrm{E}};vec{mathrm{F}};vec{mathrm{G}};vec{mathrm{H}};vec{mathrm{I}};vec{mathrm{J}};vec{mathrm{K}};vec{mathrm{L}};vec{mathrm{M}};vec{mathrm{N}};vec{mathrm{O}};vec{mathrm{P}};vec{mathrm{Q}};vec{mathrm{R}};vec{mathrm{S}};vec{mathrm{T}};vec{mathrm{U}};vec{mathrm{V}};vec{mathrm{W}};vec{mathrm{X}};vec{mathrm{Y}};vec{mathrm{Z}}
end{equation*}
end{document}
math-mode fonts amsmath math-operators
|
show 4 more comments
So basically I need to put a vector symbol (vec
) on an upright letter for which I use mathrm
in math mode. For example:
vec{mathrm{E}}
While Katex seems to get the alignment right on all the letters:
My pdfTeX version doesn't do so well (using the same code):
Clearly the vector symbol is positioned such that it would be aligned if the letters were in italic mode.
Which leads me to the following question:
- How can I get the vector symbol aligned with the upright math letter using pdfTeX?
pdfTeX version
$ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Document setup
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
Complete example
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
begin{document}
begin{equation*}
vec{mathrm{A}};vec{mathrm{B}};vec{mathrm{C}};vec{mathrm{D}};vec{mathrm{E}};vec{mathrm{F}};vec{mathrm{G}};vec{mathrm{H}};vec{mathrm{I}};vec{mathrm{J}};vec{mathrm{K}};vec{mathrm{L}};vec{mathrm{M}};vec{mathrm{N}};vec{mathrm{O}};vec{mathrm{P}};vec{mathrm{Q}};vec{mathrm{R}};vec{mathrm{S}};vec{mathrm{T}};vec{mathrm{U}};vec{mathrm{V}};vec{mathrm{W}};vec{mathrm{X}};vec{mathrm{Y}};vec{mathrm{Z}}
end{equation*}
end{document}
math-mode fonts amsmath math-operators
Show a complete minimal example, not only some snippets - this makes it much easier to test.
– Ulrike Fischer
Feb 4 at 8:49
2
The glyph used for thevec
accent is indeed tailored for best results with italic letters, as the shape of the arrow itself shows. Katex is not a TeX engine, so it can't be used for comparison. Beware thattextrm
is the wrong command in that context, usemathrm
.
– egreg
Feb 4 at 8:50
vec{{}<letter>}
try adding the empty group (or akern0pt
) inside the argument ofvec
.
– Manuel
Feb 4 at 8:52
2
tryvv{textrm{E}}
from theesvect
package
– Hafid Boukhoulda
Feb 4 at 8:56
@UlrikeFischer I assumed the Document setup would already contain all the necessary information. Anyway I've added the complete code that produces the posted screenshot.
– a_guest
Feb 4 at 16:36
|
show 4 more comments
So basically I need to put a vector symbol (vec
) on an upright letter for which I use mathrm
in math mode. For example:
vec{mathrm{E}}
While Katex seems to get the alignment right on all the letters:
My pdfTeX version doesn't do so well (using the same code):
Clearly the vector symbol is positioned such that it would be aligned if the letters were in italic mode.
Which leads me to the following question:
- How can I get the vector symbol aligned with the upright math letter using pdfTeX?
pdfTeX version
$ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Document setup
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
Complete example
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
begin{document}
begin{equation*}
vec{mathrm{A}};vec{mathrm{B}};vec{mathrm{C}};vec{mathrm{D}};vec{mathrm{E}};vec{mathrm{F}};vec{mathrm{G}};vec{mathrm{H}};vec{mathrm{I}};vec{mathrm{J}};vec{mathrm{K}};vec{mathrm{L}};vec{mathrm{M}};vec{mathrm{N}};vec{mathrm{O}};vec{mathrm{P}};vec{mathrm{Q}};vec{mathrm{R}};vec{mathrm{S}};vec{mathrm{T}};vec{mathrm{U}};vec{mathrm{V}};vec{mathrm{W}};vec{mathrm{X}};vec{mathrm{Y}};vec{mathrm{Z}}
end{equation*}
end{document}
math-mode fonts amsmath math-operators
So basically I need to put a vector symbol (vec
) on an upright letter for which I use mathrm
in math mode. For example:
vec{mathrm{E}}
While Katex seems to get the alignment right on all the letters:
My pdfTeX version doesn't do so well (using the same code):
Clearly the vector symbol is positioned such that it would be aligned if the letters were in italic mode.
Which leads me to the following question:
- How can I get the vector symbol aligned with the upright math letter using pdfTeX?
pdfTeX version
$ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Document setup
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
Complete example
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
begin{document}
begin{equation*}
vec{mathrm{A}};vec{mathrm{B}};vec{mathrm{C}};vec{mathrm{D}};vec{mathrm{E}};vec{mathrm{F}};vec{mathrm{G}};vec{mathrm{H}};vec{mathrm{I}};vec{mathrm{J}};vec{mathrm{K}};vec{mathrm{L}};vec{mathrm{M}};vec{mathrm{N}};vec{mathrm{O}};vec{mathrm{P}};vec{mathrm{Q}};vec{mathrm{R}};vec{mathrm{S}};vec{mathrm{T}};vec{mathrm{U}};vec{mathrm{V}};vec{mathrm{W}};vec{mathrm{X}};vec{mathrm{Y}};vec{mathrm{Z}}
end{equation*}
end{document}
math-mode fonts amsmath math-operators
math-mode fonts amsmath math-operators
edited Feb 4 at 17:06
a_guest
asked Feb 4 at 8:38
a_guesta_guest
24929
24929
Show a complete minimal example, not only some snippets - this makes it much easier to test.
– Ulrike Fischer
Feb 4 at 8:49
2
The glyph used for thevec
accent is indeed tailored for best results with italic letters, as the shape of the arrow itself shows. Katex is not a TeX engine, so it can't be used for comparison. Beware thattextrm
is the wrong command in that context, usemathrm
.
– egreg
Feb 4 at 8:50
vec{{}<letter>}
try adding the empty group (or akern0pt
) inside the argument ofvec
.
– Manuel
Feb 4 at 8:52
2
tryvv{textrm{E}}
from theesvect
package
– Hafid Boukhoulda
Feb 4 at 8:56
@UlrikeFischer I assumed the Document setup would already contain all the necessary information. Anyway I've added the complete code that produces the posted screenshot.
– a_guest
Feb 4 at 16:36
|
show 4 more comments
Show a complete minimal example, not only some snippets - this makes it much easier to test.
– Ulrike Fischer
Feb 4 at 8:49
2
The glyph used for thevec
accent is indeed tailored for best results with italic letters, as the shape of the arrow itself shows. Katex is not a TeX engine, so it can't be used for comparison. Beware thattextrm
is the wrong command in that context, usemathrm
.
– egreg
Feb 4 at 8:50
vec{{}<letter>}
try adding the empty group (or akern0pt
) inside the argument ofvec
.
– Manuel
Feb 4 at 8:52
2
tryvv{textrm{E}}
from theesvect
package
– Hafid Boukhoulda
Feb 4 at 8:56
@UlrikeFischer I assumed the Document setup would already contain all the necessary information. Anyway I've added the complete code that produces the posted screenshot.
– a_guest
Feb 4 at 16:36
Show a complete minimal example, not only some snippets - this makes it much easier to test.
– Ulrike Fischer
Feb 4 at 8:49
Show a complete minimal example, not only some snippets - this makes it much easier to test.
– Ulrike Fischer
Feb 4 at 8:49
2
2
The glyph used for the
vec
accent is indeed tailored for best results with italic letters, as the shape of the arrow itself shows. Katex is not a TeX engine, so it can't be used for comparison. Beware that textrm
is the wrong command in that context, use mathrm
.– egreg
Feb 4 at 8:50
The glyph used for the
vec
accent is indeed tailored for best results with italic letters, as the shape of the arrow itself shows. Katex is not a TeX engine, so it can't be used for comparison. Beware that textrm
is the wrong command in that context, use mathrm
.– egreg
Feb 4 at 8:50
vec{{}<letter>}
try adding the empty group (or a kern0pt
) inside the argument of vec
.– Manuel
Feb 4 at 8:52
vec{{}<letter>}
try adding the empty group (or a kern0pt
) inside the argument of vec
.– Manuel
Feb 4 at 8:52
2
2
try
vv{textrm{E}}
from the esvect
package– Hafid Boukhoulda
Feb 4 at 8:56
try
vv{textrm{E}}
from the esvect
package– Hafid Boukhoulda
Feb 4 at 8:56
@UlrikeFischer I assumed the Document setup would already contain all the necessary information. Anyway I've added the complete code that produces the posted screenshot.
– a_guest
Feb 4 at 16:36
@UlrikeFischer I assumed the Document setup would already contain all the necessary information. Anyway I've added the complete code that produces the posted screenshot.
– a_guest
Feb 4 at 16:36
|
show 4 more comments
1 Answer
1
active
oldest
votes
Before (vec
) and after (upvec
):
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
newcommandupvec[1]{!vec{,mathrm{#1}}}
begin{document}
begin{equation*}
vec{mathrm{A}};vec{mathrm{B}};vec{mathrm{C}};vec{mathrm{D}};
vec{mathrm{E}};vec{mathrm{F}};vec{mathrm{G}};vec{mathrm{H}};
vec{mathrm{I}};vec{mathrm{J}};vec{mathrm{K}};vec{mathrm{L}};
vec{mathrm{M}};vec{mathrm{N}};vec{mathrm{O}};vec{mathrm{P}};
vec{mathrm{Q}};vec{mathrm{R}};vec{mathrm{S}};vec{mathrm{T}};
vec{mathrm{U}};vec{mathrm{V}};vec{mathrm{W}};vec{mathrm{X}};
vec{mathrm{Y}};vec{mathrm{Z}}
end{equation*}
begin{equation*}
upvec A;upvec B;upvec C;upvec D;upvec E;upvec F;upvec G;
upvec H;upvec I;upvec J;upvec K;upvec L;upvec M;upvec N;
upvec O;upvec P;upvec Q;upvec R;upvec S;upvec T;upvec U;
upvec V;upvec W;upvec X;upvec Y;upvec Z
;upvec{a}
end{equation*}
[
vec Aupvec B f = upvec D vec E g
]
end{document}
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
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%2f473286%2falign-vector-symbol-with-upright-math-letter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Before (vec
) and after (upvec
):
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
newcommandupvec[1]{!vec{,mathrm{#1}}}
begin{document}
begin{equation*}
vec{mathrm{A}};vec{mathrm{B}};vec{mathrm{C}};vec{mathrm{D}};
vec{mathrm{E}};vec{mathrm{F}};vec{mathrm{G}};vec{mathrm{H}};
vec{mathrm{I}};vec{mathrm{J}};vec{mathrm{K}};vec{mathrm{L}};
vec{mathrm{M}};vec{mathrm{N}};vec{mathrm{O}};vec{mathrm{P}};
vec{mathrm{Q}};vec{mathrm{R}};vec{mathrm{S}};vec{mathrm{T}};
vec{mathrm{U}};vec{mathrm{V}};vec{mathrm{W}};vec{mathrm{X}};
vec{mathrm{Y}};vec{mathrm{Z}}
end{equation*}
begin{equation*}
upvec A;upvec B;upvec C;upvec D;upvec E;upvec F;upvec G;
upvec H;upvec I;upvec J;upvec K;upvec L;upvec M;upvec N;
upvec O;upvec P;upvec Q;upvec R;upvec S;upvec T;upvec U;
upvec V;upvec W;upvec X;upvec Y;upvec Z
;upvec{a}
end{equation*}
[
vec Aupvec B f = upvec D vec E g
]
end{document}
add a comment |
Before (vec
) and after (upvec
):
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
newcommandupvec[1]{!vec{,mathrm{#1}}}
begin{document}
begin{equation*}
vec{mathrm{A}};vec{mathrm{B}};vec{mathrm{C}};vec{mathrm{D}};
vec{mathrm{E}};vec{mathrm{F}};vec{mathrm{G}};vec{mathrm{H}};
vec{mathrm{I}};vec{mathrm{J}};vec{mathrm{K}};vec{mathrm{L}};
vec{mathrm{M}};vec{mathrm{N}};vec{mathrm{O}};vec{mathrm{P}};
vec{mathrm{Q}};vec{mathrm{R}};vec{mathrm{S}};vec{mathrm{T}};
vec{mathrm{U}};vec{mathrm{V}};vec{mathrm{W}};vec{mathrm{X}};
vec{mathrm{Y}};vec{mathrm{Z}}
end{equation*}
begin{equation*}
upvec A;upvec B;upvec C;upvec D;upvec E;upvec F;upvec G;
upvec H;upvec I;upvec J;upvec K;upvec L;upvec M;upvec N;
upvec O;upvec P;upvec Q;upvec R;upvec S;upvec T;upvec U;
upvec V;upvec W;upvec X;upvec Y;upvec Z
;upvec{a}
end{equation*}
[
vec Aupvec B f = upvec D vec E g
]
end{document}
add a comment |
Before (vec
) and after (upvec
):
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
newcommandupvec[1]{!vec{,mathrm{#1}}}
begin{document}
begin{equation*}
vec{mathrm{A}};vec{mathrm{B}};vec{mathrm{C}};vec{mathrm{D}};
vec{mathrm{E}};vec{mathrm{F}};vec{mathrm{G}};vec{mathrm{H}};
vec{mathrm{I}};vec{mathrm{J}};vec{mathrm{K}};vec{mathrm{L}};
vec{mathrm{M}};vec{mathrm{N}};vec{mathrm{O}};vec{mathrm{P}};
vec{mathrm{Q}};vec{mathrm{R}};vec{mathrm{S}};vec{mathrm{T}};
vec{mathrm{U}};vec{mathrm{V}};vec{mathrm{W}};vec{mathrm{X}};
vec{mathrm{Y}};vec{mathrm{Z}}
end{equation*}
begin{equation*}
upvec A;upvec B;upvec C;upvec D;upvec E;upvec F;upvec G;
upvec H;upvec I;upvec J;upvec K;upvec L;upvec M;upvec N;
upvec O;upvec P;upvec Q;upvec R;upvec S;upvec T;upvec U;
upvec V;upvec W;upvec X;upvec Y;upvec Z
;upvec{a}
end{equation*}
[
vec Aupvec B f = upvec D vec E g
]
end{document}
Before (vec
) and after (upvec
):
documentclass[a4paper,12pt]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{amsmath}
newcommandupvec[1]{!vec{,mathrm{#1}}}
begin{document}
begin{equation*}
vec{mathrm{A}};vec{mathrm{B}};vec{mathrm{C}};vec{mathrm{D}};
vec{mathrm{E}};vec{mathrm{F}};vec{mathrm{G}};vec{mathrm{H}};
vec{mathrm{I}};vec{mathrm{J}};vec{mathrm{K}};vec{mathrm{L}};
vec{mathrm{M}};vec{mathrm{N}};vec{mathrm{O}};vec{mathrm{P}};
vec{mathrm{Q}};vec{mathrm{R}};vec{mathrm{S}};vec{mathrm{T}};
vec{mathrm{U}};vec{mathrm{V}};vec{mathrm{W}};vec{mathrm{X}};
vec{mathrm{Y}};vec{mathrm{Z}}
end{equation*}
begin{equation*}
upvec A;upvec B;upvec C;upvec D;upvec E;upvec F;upvec G;
upvec H;upvec I;upvec J;upvec K;upvec L;upvec M;upvec N;
upvec O;upvec P;upvec Q;upvec R;upvec S;upvec T;upvec U;
upvec V;upvec W;upvec X;upvec Y;upvec Z
;upvec{a}
end{equation*}
[
vec Aupvec B f = upvec D vec E g
]
end{document}
edited Feb 4 at 18:58
answered Feb 4 at 18:46
Steven B. SegletesSteven B. Segletes
154k9198405
154k9198405
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f473286%2falign-vector-symbol-with-upright-math-letter%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
Show a complete minimal example, not only some snippets - this makes it much easier to test.
– Ulrike Fischer
Feb 4 at 8:49
2
The glyph used for the
vec
accent is indeed tailored for best results with italic letters, as the shape of the arrow itself shows. Katex is not a TeX engine, so it can't be used for comparison. Beware thattextrm
is the wrong command in that context, usemathrm
.– egreg
Feb 4 at 8:50
vec{{}<letter>}
try adding the empty group (or akern0pt
) inside the argument ofvec
.– Manuel
Feb 4 at 8:52
2
try
vv{textrm{E}}
from theesvect
package– Hafid Boukhoulda
Feb 4 at 8:56
@UlrikeFischer I assumed the Document setup would already contain all the necessary information. Anyway I've added the complete code that produces the posted screenshot.
– a_guest
Feb 4 at 16:36