Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

标题的黑体可以通过安装方正粗黑来实现 #34

Open
HadynYang opened this issue Mar 7, 2018 · 3 comments
Open

标题的黑体可以通过安装方正粗黑来实现 #34

HadynYang opened this issue Mar 7, 2018 · 3 comments

Comments

@HadynYang
Copy link

先下载ttf字体安装在系统中

粗黑,以及粗宋(目录需要):

% 设置粗宋体和粗黑体

\RequirePackage{xeCJK}
 \setCJKfamilyfont{cusong}{方正粗宋简体}
 \newcommand{\cusongti }{\CJKfamily{cusong}}
 \setCJKfamilyfont{cuhei}{方正粗黑简体}
 \newcommand{\cuheiti }{\CJKfamily{cuhei}}

章节和目录格式:

学校要求目录里的章标题用宋体四号,不加粗,我个人觉得不太好看,就把章标题也加粗了。

%% 设置章节格式

\ctexset{chapter={
      name = {第,章},
      number = {\arabic{chapter}},
      format = {\bfseries \cuheiti \centering \zihao{3}},
      pagestyle = {BIT@headings},
      beforeskip = 16bp,
      afterskip = 28bp,
      fixskip = true,
  }
}
%% 设置一级章节格式
\ctexset{section={
  format={\bfseries \raggedright \cuheiti \zihao{4}},
  beforeskip = 28bp plus 1ex minus .2ex,
  afterskip = 24bp plus .2ex,
  fixskip = true,
  }
}

% 设置二级标题格式

%黑体小四加粗顶左,单倍行距,序号与题目间空一个汉字符

\ctexset{subsection={
   format = {\bfseries \cuheiti \raggedright \zihao{-4}},
   beforeskip =28bp plus 1ex minus .2ex,
   afterskip = 24bp plus .2ex,
   fixskip = true,
   }
}

% 设置三节标题格式:黑体小四居左书写,单倍行距,序号与题目间空一个汉字符

\ctexset{subsubsection={
      format={\bfseries \heiti \raggedright \zihao{-4}},
      beforeskip=28bp plus 1ex minus .2ex,
      afterskip=24bp plus .2ex,
      fixskip=true,
  }
}

%% 设定目录格式。目录颜色更改黑色
\addtocontents{toc}{\protect\hypersetup{hidelinks}}
\addtocontents{lot}{\protect\hypersetup{hidelinks}}
\addtocontents{lof}{\protect\hypersetup{hidelinks}}


@qiuzhu
Copy link
Member

qiuzhu commented Mar 7, 2018

标题黑体加粗,这个我不建议安装第三方字体,很少有人找到你推荐的方正系列,其次,黑体,推荐采用思源黑体系列,无版权问题,系列全,字库全。\ssfamly只是个折中的方法,要按学校要求来设置字体。目录加粗的问题,个人感觉学校二级目录标题是弄错了,不应该加粗。

@HadynYang
Copy link
Author

嗯嗯,对的,需要第三方字体的话还是要购买,谢谢提醒!

@YBENS
Copy link

YBENS commented Apr 16, 2019

Readme中的宋体下载链接应该是 https://fontzone.net/font-download/simsun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants