forked from wenweili/Modulform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
font-setup-open.tex
100 lines (81 loc) · 2.86 KB
/
font-setup-open.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
% Copyright 2020 李文威 (Wen-Wei Li).
% Permission is granted to copy, distribute and/or modify this
% document under the terms of the Creative Commons
% Attribution 4.0 International (CC BY 4.0)
% http://creativecommons.org/licenses/by/4.0/
% 目的: 字体相关设置, 呼叫相关宏包.
% 将由 AJbook.cls 引入
% 必须提供 \kaishu, \songti, \heiti, \thmheiti, \fangsong 几种字型切换命令, 在文档类中使用.
\ProvidesFile{font-setup-open.tex}[2018/03/04]
% 设置 xeCJK 字体及中文数字
%\setmainfont{TeX Gyre Pagella} % 设置西文衬线字体
\setmainfont[
BoldFont={TeX Gyre Termes Bold},
ItalicFont={TeX Gyre Termes Italic},
BoldItalicFont={TeX Gyre Termes Bold Italic},
PunctuationSpace=2
]{TeX Gyre Termes}
\setsansfont[
BoldFont=FiraSans-Bold.otf, ItalicFont=FiraSans-Italic.otf]{FiraSans-Regular.otf}
\RequirePackage{unicode-math}
%\setmathfont{Asana-Math.otf}
\setmathfont
[Extension = .otf,
math-style= TeX,
% BoldFont = texgyrepagella-bold,
% BoldItalicFont = texgyrepagella-bolditalic,
% ItalicFont = texgyrepagella-italic,
%]{xits-math}
BoldFont = XITSMath-Bold.otf,
BoldItalicFont = XITS-BoldItalic.otf
]{XITSMath-Regular}
\setmathfont[version=bold]{XITSMath-Bold.otf} % Set the "bold version", for use in emphasized situations.
\setCJKmainfont[
BoldFont=FandolSong-Bold.otf,
ItalicFont=FandolKai-Regular.otf,
]{FandolSong-Regular.otf}
\setCJKsansfont[
BoldFont=FandolHei-Bold.otf,
]{FandolHei-Regular.otf}
\setCJKmonofont[
BoldFont=FandolHei-Bold.otf,
]{FandolHei-Regular.otf}
\setCJKfamilyfont{kai}[
BoldFont=FandolKai-Regular.otf, ItalicFont=FandolKai-Regular.otf
]{FandolKai-Regular.otf}
\setCJKfamilyfont{song}[
BoldFont=FandolSong-Bold.otf,
ItalicFont=FandolKai-Regular.otf
]{FandolSong-Regular.otf}
\setCJKfamilyfont{fangsong}[
BoldFont=FandolSong-Bold.otf,
ItalicFont=FandolKai-Regular.otf
]{FandolFang-Regular.otf}
\setCJKfamilyfont{hei}[
BoldFont=FandolHei-Bold.otf,
ItalicFont=FandolHei-Regular.otf
]{FandolHei-Regular.otf}
\setCJKfamilyfont{hei2}[
]{Noto Sans CJK SC}
\setCJKfamilyfont{sectionfont}[
BoldFont=* Black
]{Noto Sans CJK SC}
\setCJKfamilyfont{chapterfont}[
BoldFont=* Black]
{Noto Serif CJK SC} % 各章章名字体
\setCJKfamilyfont{pffont}[
BoldFont=* Medium]
{Noto Sans CJK SC} % 证明用的字体
\setCJKfamilyfont{emfont}[
BoldFont=FandolHei-Regular.otf]
{FandolHei-Regular.otf} % 强调用的字体
\defaultfontfeatures{Ligatures=TeX}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt
% 以下设置字体相关命令, 用于定理等环境中.
\newcommand\kaishu{\CJKfamily{kai}} % 楷体
\newcommand\songti{\CJKfamily{song}} % 宋体
\newcommand\heiti{\CJKfamily{hei}} % 黑体
\newcommand\thmheiti{\CJKfamily{hei2}} % 用于定理名称的黑体
\newcommand\fangsong{\CJKfamily{fangsong}} % 仿宋
\renewcommand{\em}{\bfseries\mathversion{bold}\CJKfamily{emfont}} % 强调