Last active
September 9, 2015 01:09
-
-
Save blindFS/318c4d5e00b2eb06247c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% xetex/xelatex 字体设定宏包 | |
\ProvidesPackage{zhfontcfg} | |
\usepackage[utf8]{inputenc} | |
\usepackage{fontspec,xunicode} | |
\usepackage[slantfont, boldfont, CJKspace, CJKmath]{xeCJK} % 允许斜体和粗体 | |
\setCJKmainfont{WenQuanYi Micro Hei} % 设置缺省中文字体 | |
\setCJKmonofont{WenQuanYi Micro Hei Mono} % 设置等宽字体 | |
\setmainfont{Times New Roman} % 英文衬线字体 | |
\setsansfont{Arial} % 英文无衬线字体 | |
\setmonofont{Monaco} % 英文等宽字体 | |
\usepackage{indentfirst} % 首段缩进 | |
\defaultfontfeatures{Mapping=tex-text} %如果没有它,会有一些 tex 特殊字符无法正常使用,比如连字符。 | |
% 中文断行 | |
\XeTeXlinebreaklocale "zh" | |
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment