Change the font used in the Latex's math mode

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.