Redefining math symbols in `mathspec`
I'm using the Skolar font for a work and I'm experimenting with mathspec
just to match the fonts in regular and math text.
There's a latin character called "f with hook" (unicode 0192; ALT+131 on Windows) that I want instead of the italic f in math mode. The difference between the regular f, italic f and f with hook is shown in the next image.
I tried this
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{`ƒ}
makeatother
but prints nothing. I can write symbol{"0192}
and get ƒ in the pdf, so, I also tried
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{"0192}
makeatother
but does not print anything; and
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{symbol{"0192}}
makeatother
crashes. In this site is pointed that the command DeclareMathSymbol
must be invoked like this
DeclareMathSymbol {<symbol>} {<type>} {<sym-font>} {<slot>}
and I think the problem is in the way I'm writing the <slot>
with a wrong format. So, my question is how I can solve this whithout defining f
as symbol{"0192}
cuz I will need to replace every single f (in a math environment) in my code by f
.
A MWE would be like this.
documentclass{article}
usepackage{mathspec}
defaultfontfeatures{Ligatures=TeX}
setmainfont{Times New Roman}
setmathfont(Digits,Latin,Greek){Times New Roman}
setmathrm{Times New Roman}
begin{document}
ftextit{f}symbol{"0192} $f(x)=f(x).$
end{document}
I don't know if Times New Roman is installed on Linux distributions but you can change Times New Roman
for Ubuntu
or anything else.
xetex mathspec
add a comment |
I'm using the Skolar font for a work and I'm experimenting with mathspec
just to match the fonts in regular and math text.
There's a latin character called "f with hook" (unicode 0192; ALT+131 on Windows) that I want instead of the italic f in math mode. The difference between the regular f, italic f and f with hook is shown in the next image.
I tried this
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{`ƒ}
makeatother
but prints nothing. I can write symbol{"0192}
and get ƒ in the pdf, so, I also tried
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{"0192}
makeatother
but does not print anything; and
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{symbol{"0192}}
makeatother
crashes. In this site is pointed that the command DeclareMathSymbol
must be invoked like this
DeclareMathSymbol {<symbol>} {<type>} {<sym-font>} {<slot>}
and I think the problem is in the way I'm writing the <slot>
with a wrong format. So, my question is how I can solve this whithout defining f
as symbol{"0192}
cuz I will need to replace every single f (in a math environment) in my code by f
.
A MWE would be like this.
documentclass{article}
usepackage{mathspec}
defaultfontfeatures{Ligatures=TeX}
setmainfont{Times New Roman}
setmathfont(Digits,Latin,Greek){Times New Roman}
setmathrm{Times New Roman}
begin{document}
ftextit{f}symbol{"0192} $f(x)=f(x).$
end{document}
I don't know if Times New Roman is installed on Linux distributions but you can change Times New Roman
for Ubuntu
or anything else.
xetex mathspec
add a comment |
I'm using the Skolar font for a work and I'm experimenting with mathspec
just to match the fonts in regular and math text.
There's a latin character called "f with hook" (unicode 0192; ALT+131 on Windows) that I want instead of the italic f in math mode. The difference between the regular f, italic f and f with hook is shown in the next image.
I tried this
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{`ƒ}
makeatother
but prints nothing. I can write symbol{"0192}
and get ƒ in the pdf, so, I also tried
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{"0192}
makeatother
but does not print anything; and
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{symbol{"0192}}
makeatother
crashes. In this site is pointed that the command DeclareMathSymbol
must be invoked like this
DeclareMathSymbol {<symbol>} {<type>} {<sym-font>} {<slot>}
and I think the problem is in the way I'm writing the <slot>
with a wrong format. So, my question is how I can solve this whithout defining f
as symbol{"0192}
cuz I will need to replace every single f (in a math environment) in my code by f
.
A MWE would be like this.
documentclass{article}
usepackage{mathspec}
defaultfontfeatures{Ligatures=TeX}
setmainfont{Times New Roman}
setmathfont(Digits,Latin,Greek){Times New Roman}
setmathrm{Times New Roman}
begin{document}
ftextit{f}symbol{"0192} $f(x)=f(x).$
end{document}
I don't know if Times New Roman is installed on Linux distributions but you can change Times New Roman
for Ubuntu
or anything else.
xetex mathspec
I'm using the Skolar font for a work and I'm experimenting with mathspec
just to match the fonts in regular and math text.
There's a latin character called "f with hook" (unicode 0192; ALT+131 on Windows) that I want instead of the italic f in math mode. The difference between the regular f, italic f and f with hook is shown in the next image.
I tried this
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{`ƒ}
makeatother
but prints nothing. I can write symbol{"0192}
and get ƒ in the pdf, so, I also tried
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{"0192}
makeatother
but does not print anything; and
makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{symbol{"0192}}
makeatother
crashes. In this site is pointed that the command DeclareMathSymbol
must be invoked like this
DeclareMathSymbol {<symbol>} {<type>} {<sym-font>} {<slot>}
and I think the problem is in the way I'm writing the <slot>
with a wrong format. So, my question is how I can solve this whithout defining f
as symbol{"0192}
cuz I will need to replace every single f (in a math environment) in my code by f
.
A MWE would be like this.
documentclass{article}
usepackage{mathspec}
defaultfontfeatures{Ligatures=TeX}
setmainfont{Times New Roman}
setmathfont(Digits,Latin,Greek){Times New Roman}
setmathrm{Times New Roman}
begin{document}
ftextit{f}symbol{"0192} $f(x)=f(x).$
end{document}
I don't know if Times New Roman is installed on Linux distributions but you can change Times New Roman
for Ubuntu
or anything else.
xetex mathspec
xetex mathspec
asked 4 hours ago
Diego D. R. RiveraDiego D. R. Rivera
175
175
add a comment |
add a comment |
0
active
oldest
votes
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%2f482655%2fredefining-math-symbols-in-mathspec%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f482655%2fredefining-math-symbols-in-mathspec%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