LaTeX技巧006:使用不同的英文字体

效果展示



  可以看到文章的主体部分使用的Times New Roman字体,局部可以使用其他的字体。要使用不同的英文字体,首先需要知道有哪些可以使用的英文字体,得到它们的名称,然后使用fontspec设置即可。对于我来说,偷懒的方法就是在Word中去找那些字体,然后得到字体的名称。当然也可以使用命令

fc-list >>c:\fonts.txt

来获取,我更喜欢前者(看个人)。得到字体的名称之后,然后使用fontspec来设置新的命令在正文使用即可。

代码

\documentclass[UTF8]{article}
\usepackage{fontspec}
\newcommand{\tnewroman}{\fontspec{Times New Roman}}
\newcommand{\adobegothicstdb}{\fontspec{Adobe Gothic Std B}}
\newcommand{\Centaur}{\fontspec{Centaur}}
\setmainfont{Times New Roman}%fontspec下这个命令设置全局默认字体
\begin{document}

Anne Boleyn was the second wife of King Henry VIII, with their marriage changing the course of english history. King Henry was already married to Catherine of aragon and could not obtain a divorce from the roman catholic church. In order to obtain his divorce he therefore created a reformed version of the church, putting himself at the head - a direct challenge of authority to the pope.

\vspace{1cm}

%这也是一种调用方式,无须fontspec宏包
\font\rm="Stencil Std" at 14pt \rm This is Stencil Std

{\tnewroman This is <Times New Roman>}

{\adobegothicstdb This is <Adobe Gothic Std B>}

{\Centaur This is <Centaur>}

\end{document}

参考

XeTex字体设置指南

  • 3
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值