forked from Timozer/CUGThesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcugthesisfont.sty
70 lines (60 loc) · 2.2 KB
/
cugthesisfont.sty
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
% !TEX TS-program xelatex
% !TEX encoding = UTF-8 Unicode
% -*- coding: UTF-8; -*-
% vim: set fenc=utf-8
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FileName: cugthesisfont.sty
%% Author: Timozer
%% E-mail: zhenyuwang94@gmail.com
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{cugthesisfont}[2018/03/13 Provide Chinese Environment]
\RequirePackage{fontspec}
\RequirePackage{xeCJK}
%------------- Fonts Settings -------------
%\defaultfontfeatures{Path = fonts/cn/, Mapping = tex-text}
%\defaultfontfeatures{Mapping = tex-text}
%------------- Fonts Define ---------------
% if you want to use more fonts, please do it like blow
%\newCJKfontfamily[family]\cmd{font.file}
%\newCJKfontfamily[SmallCaps]\SCF{SmallCaps.otf}
%%------------- Chinese Fonts -------------
%\setCJKmainfont[
%BoldFont = SourceHanSerifSC-Bold,
%ItalicFont = STKaiti,
%%BoldItalicFont = STKaiti-SC-Bold,
%]{SourceHanSerifSC-Regular}
%\setCJKsansfont[
%BoldFont = SourceHanSansSC-Bold,
%]{SourceHanSansSC-Regular}
%\setCJKmonofont[
%BoldFont = SourceHanSansSC-Bold,
%]{SourceHanSansSC-Regular}
%%%%------------- English Fonts -------------
%\setmainfont[
%ItalicFont = {Times New Roman Italic},
%BoldFont = {Times New Roman Bold},
%BoldItalicFont = {Times New Roman Bold Italic},
%SmallCapsFont = {Bodoni 72 Smallcaps},
%%SmallCapsFeatures={Letters=SmallCaps},
%]{Times New Roman}
%\setsansfont{Optima}
%\setmonofont[BoldFont=Source Code Pro Semibold]{Source Code Pro}
\def\cug@define@fontsize#1#2{%
\expandafter\newcommand\csname #1\endcsname[1][\baselinestretch]{%
\fontsize{#2}{##1\dimexpr #2}\selectfont}}
\cug@define@fontsize{cug@chuhao}{42bp}
\cug@define@fontsize{cug@xiaochu}{36bp}
\cug@define@fontsize{cug@yihao}{26bp}
\cug@define@fontsize{cug@xiaoyi}{24bp}
\cug@define@fontsize{cug@erhao}{22bp}
\cug@define@fontsize{cug@xiaoer}{18bp}
\cug@define@fontsize{cug@sanhao}{16bp}
\cug@define@fontsize{cug@xiaosan}{15bp}
\cug@define@fontsize{cug@sihao}{14bp}
\cug@define@fontsize{cug@xiaosi}{12bp}
\cug@define@fontsize{cug@wuhao}{10.5bp}
\cug@define@fontsize{cug@xiaowu}{9bp}
%\setlength{\parindent}{2em}
\endinput