LaTeX学习---字体设置

最近开始用LaTeX来做格式,感觉到方便的地方十分感人,但细节多到让人崩溃,因此准备起一个系类来做记录。

最长用的字体设置,本来是用LaTeX系统自带的字体,感觉良好。但在做格式的时候发现,其跟WORD打出来的字有点不一样,宽度总是怪怪的,特别是加粗了之后更加明显,这个虽然不见得一定要改,然而如果想做一个可以替代掉WORD的东西,起码起初还是要跟它比较像的好,因此本人又研究了一个下午,把最终的字体设置,加粗设置和字号设置直接以代码的形式放出来供大家参考。

%-*-coding:UTF-8-*-
\documentclass[UTF8]{article}
\usepackage{fontspec,xunicode,xltxtra} %字体包

%字体设置
\newfontfamily\youyuan{YouYuan}
\newfontfamily\hwcaiyun{STCaiyun}
\newfontfamily\hwhupo{STHupo}
\newfontfamily\yaoti{FZYaoTi}
\newfontfamily\kaiti{KaiTi}
\newfontfamily\xsong{NSimSun}
\newfontfamily\hwsong{STSong}
\newfontfamily\yahei{Microsoft YaHei}
\newfontfamily\fangsong{FangSong}
\newfontfamily\song{SimSun}
\newfontfamily\hwfangsong{STFangsong}
\newfontfamily\weiti{STXinwei}
\newfontfamily\heiti{SimHei}
\newfontfamily\hwxingkai{STXingkai}
\newfontfamily\hwlishu{STLiti}
\newfontfamily\zhongsong{STZhongsong}
\newfontfamily\shuti{FZShuTi}
\newfontfamily\hwhei{STXihei}
\newfontfamily\lishu{LiSu}
\newfontfamily\hwkai{STKaiti}

%加粗设置
\newfontfamily\bsong[FakeBold = 5]{SimSun} %加粗的宋体,其中FakeBold为字体的粗细

%字号设置
\newcommand{\chuhao}{\fontsize{42pt}{\baselineskip}}
\newcommand{\xiaochuhao}{\fontsize{36pt}{\baselineskip}}
\newcommand{\yihao}{\fontsize{28pt}{\baselineskip}}
\newcommand{\erhao}{\fontsize{21pt}{\baselineskip}}
\newcommand{\xiaoerhao}{\fontsize{18pt}{\baselineskip}}
\newcommand{\sanhao}{\fontsize{15.75pt}{\baselineskip}}
\newcommand{\sihao}{\fontsize{14pt}{\baselineskip}}
\newcommand{\xiaosihao}{\fontsize{12pt}{\baselineskip}}
\newcommand{\wuhao}{\fontsize{10.5pt}{\baselineskip}}
\newcommand{\xiaowuhao}{\fontsize{9pt}{\baselineskip}}
\newcommand{\liuhao}{\fontsize{7.875pt}{\baselineskip}}
\newcommand{\qihao}{\fontsize{5.25pt}{\baselineskip}}

\begin{document}
\sihao\heiti 黑体\\
\erhao\song 宋abc体\\
\chuhao\song The \xiaoerhao\bsong smart home system base on Android\\
\end{document}

这里写图片描述

  • 5
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值