TeX - LaTeX Asked by M. Logic on December 6, 2020
First, a minimal working example is as following:
documentclass{article}
usepackage{amsmath,amsfonts,amssymb,mathrsfs}
usepackage{mathspec}
setallmainfonts(Digits,Latin){Times}%a replacement of the font that I am using now
title{Test}
begin{document}
maketitle
$a'+b=c^prime$ and $(f),[f],{f}$.
end{document}
And its output by xelatex
is
So my questions are:
- The primes in the picture produced by the codes
'
andprime
are both from the defaultComputer Modern
font. Then how to change'
andprime
into the symbols in the settingTimes
font? Hope a global setting but not a local one.- The space at the both side of the italic
f
in math mode is so small that the parenthesis andf
are too close. Then how to add spacing to the both side of the italicf
in math mode only (but not in text mode)? Hope a global setting but not a local one too.
Question 2 has been solved as following, then for question 1 who can help me?
You should use "f
(and similarly for other letters) as mentioned in the manual of mathspec
.
Note that '
is the same as ^{prime}
.
documentclass{article}
usepackage{amsmath,amsfonts,amssymb,mathrsfs}
usepackage{mathspec}
setallmainfonts(Digits,Latin){Times}%a replacement of the font that I am using now
title{Test}
begin{document}
maketitle
$a'+b="f^prime$ and $("f),["f],{"f}$.
end{document}
Correct answer by egreg on December 6, 2020
For question 2, I get an answer which coms from the link with the help of @egreg. I post the answer here:
makeatletter
AtBeginDocument{%
Umathcharnumdefmath@fUmathcodenum`f
mathcode`f=string"8000}
begingrouplccode`~=`f
lowercase{endgroup
def~{%
mkern3mumath@f
ifnummathgroup=m@ne
expandafter@firstofone
else
expandafter@gobble
fi
{@ifnextchar_{relax}{mkern3mu}}%
}
}
makeatother
And the following is the output for the revision:
Answered by M. Logic on December 6, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP