If you want to achieve the purpose of the topic, you will generally use some macro packages, such as txfonts. However, if the font you want to change is not within the scope of the macro package, such as changing the font to Times New Roman, we need to do this manually. This method has not been tried, temporarily as a note down, if you have tried or more understanding of this topic please be sure to comment below, pointing twos.
One thing that needs to be declared is that I'm using MacTeX, and if it's a Windows environment, I'm going to look for the corresponding directory.
The first thing to be sure is whether the font file you want to change is in "/library/fonts/" or not, which means that there is no such font in the system, and it is not within the scope of this discussion. You can use the following command to confirm. Enter the contents after the $ symbol.
$ls/library/fonts/times\ new\ Roman
If a font (. ttf file) that includes Times New Roman and so on is included in the output, the following steps can be used to indicate that the operating system contains these fonts.
Because these fonts are in TrueType form, they need to be converted to a font file of PS Type 1 binary form (. pfb file). This step can be accomplished using the "ttf2pt1" command.
$ttf 2pt1---b times\ new\ roman\ bold\ Italic.ttf pnsrbi8a
and put the resulting file in the Latex font folder (presumably .../texmf/fonts/this). and download the configuration file. Timesnewx.dmg. or this file. Timesnewx.zip.
Place the configuration files in the following folder, respectively.
Pns.map put into .../texmf/dvips/timesnew/
. tfm files into .../texmf/fonts/tfm/adobe/timesnew/
The. fd file and the Timesnew.sty file are placed in the .../texmf/tex/latex/timesnew/
Use the "updmap" command to update the Latex font map.
$sudo Updmap--enable Map
/opt/local/share/texmf//dvips/timesnew/pns.map
Finally, write down the instructions in latex.
1 \USEPACKAGE{MATHPTMX} 2 \usepackage[ly1]{fontenc} 3 \usepackage{timesnewx}
Reference to this website.
Change the font used in the Latex's math mode