Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
andy123t committed Apr 20, 2023
1 parent 1c54b9b commit 446048d
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 14 deletions.
Binary file modified example.pdf
Binary file not shown.
18 changes: 10 additions & 8 deletions example.tex
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
\advisor{某~~某~~某~~~~教~~授} % 导师姓名


%----- 设置英文字体 -----
\usepackage{newtxtext}
%\setmainfont{Times New Roman}
\setsansfont{Arial}
%\setmonofont{Courier New}

%----- 设置数学字体 -----
%\usepackage{newtxmath}
%\usepackage{mathptmx}

%----- 添加其他宏包 -----
\usepackage{listings}
\usepackage{subfig}
Expand All @@ -41,14 +51,6 @@
%----- 调整列表项的间距 -----
%\setlength{\itemsep}{3pt}

%----- 设置英文字体 -----
\usepackage{newtxtext}
%\setmainfont{Times New Roman}

%----- 设置数学字体 -----
%\usepackage{newtxmath}
%\usepackage{mathptmx}

%----- 定义符号描述命令 -----
\newcommand{\nameditem}[3][]{
\noindent\hspace{2em}\makebox[0.2\textwidth][l]{#2}{{#3}
Expand Down
15 changes: 9 additions & 6 deletions shnuthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
%% This is file `shnuthesis.cls',
%%
%% @author andy123t
%% @date 2023/04/11
%% @date 2023/04/20
%% @version v4.4
%% @address https://github.com/andy123t/shnuthesis
%% LaTeX thesis template for Shanghai Normal University
%%

%---------- 定义的新的Class ----------
\ProvidesClass{shnuthesis}[2023/04/11 v4.4]
\ProvidesClass{shnuthesis}[2023/04/20 v4.4]
\NeedsTeXFormat{LaTeX2e}

%---------- 载入学校logo ----------
Expand Down Expand Up @@ -140,13 +140,16 @@
%---------- 设置图片的路径 ----------
\graphicspath{{./figure/}{./figures/}{./image/}{./images/}}

%---------- 定义章节的编号格式 ----------
\newcommand{\chapfont}{\fontsize{20pt}{28pt}\selectfont}

%---------- 设置章节目录的深度 ----------
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

%---------- 定义章节字号 ----------
\newcommand{\chapfont}{\fontsize{20bp}{28bp}\selectfont}
\newcommand{\secfont}{\fontsize{15bp}{20bp}\selectfont}
\newcommand{\subsecfont}{\fontsize{14bp}{20bp}\selectfont}
\newcommand{\ssubsecfont}{\fontsize{12bp}{18bp}\selectfont}

%---------- 定义章节标题格式 ----------
%---------- 理科论文章节格式 ----------
\ifshnu@science
Expand Down Expand Up @@ -431,7 +434,7 @@

\vspace*{1.0\baselineskip}

{\fontsize{40}{40}\selectfont\shnu@thesisname}
{\fontsize{40bp}{40bp}\selectfont\shnu@thesisname}

\vspace*{2.5\baselineskip}

Expand Down
42 changes: 42 additions & 0 deletions 字体说明.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

字体设置说明

一般情况 windows 系统会直接调用中文字体
特殊情况 (比如 mac 系统等) 可能需要本地路径调用字体
文件夹下建一个 fonts 文件夹, 放置宋体, 楷体, 黑体和仿宋字体文件
SimSun.ttf, KaiTi.ttf, SimHei.ttf, FangSong.ttf
注意: 这些字体版权属于北京中易公司, 请自行下载
字体下载网站: https://www.fonts.net.cn/

%----- 设置 fontset=none 后调用本地路径字体 -----
\documentclass[master,fontset=none]{shnuthesis}

%----- 本地路径调用字体 -----
\setCJKfamilyfont{zhsong}[Path=fonts/]{SimSun}%
\setCJKfamilyfont{zhhei}[Path=fonts/]{SimHei}%
\setCJKfamilyfont{zhkai}[Path=fonts/]{KaiTi}%
\setCJKfamilyfont{zhfang}[Path=fonts/]{FangSong}%
\setCJKmainfont{SimSun}[Path=fonts/,BoldFont=SimHei,ItalicFont=KaiTi]%
\setCJKmonofont[Path=fonts/]{FangSong}%
\makeatletter
\providecommand\songti{\CJKfamily{zhsong}}
\providecommand\heiti{\CJKfamily{zhhei}}
\providecommand\kaishu{\CJKfamily{zhkai}}
\providecommand\fangsong{\CJKfamily{zhfang}}
\makeatother


% 英文字体建议使用 newtxtext 宏包设置字体
% 也可以设置 Times New Roman 字体
% 无衬线字体可使用 Arial, 也可以使用默认

%----- 设置英文字体 -----
\usepackage{newtxtext}
%\setmainfont{Times New Roman}
\setsansfont{Arial}
%\setmonofont{Courier New}

%----- 设置数学字体 -----
%\usepackage{newtxmath}
%\usepackage{mathptmx}

0 comments on commit 446048d

Please sign in to comment.