Skip to content

Commit

Permalink
Merge pull request #73 from chirsz-ever/fix-tablecap
Browse files Browse the repository at this point in the history
改进图表标题的配置
  • Loading branch information
tanukihee authored Jun 15, 2021
2 parents 7f81a76 + 9234ecb commit 2410c0e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions whu-thesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,18 @@
% 图表标题设置
\RequirePackage [ labelsep = quad ] { caption } % 序号之后空一格写标题
% 设置表格标题字体为黑体, 设置图标题字体为宋体
\DeclareCaptionFont { tablecap } { \bfseries \tablecap }
\captionsetup [ table ] { textfont = tablecap }
\tl_set:Nn \figurename { \zihao { -4 } 图 }
\tl_set:Nn \tablename { \bfseries \tablecap \zihao { -4 } 表 }
\DeclareCaptionFont { whutablecap } { \heiti \addCJKfontfeatures { BoldFont = * } \bfseries \zihao { -4 } }
\DeclareCaptionFont { whufigurecap } { \songti \zihao { -4 } }
\captionsetup [ table ]
{
name = 表,
font = whutablecap
}
\captionsetup [ figure ]
{
name = 图,
font = whufigurecap
}

\RequirePackage { graphicx }
\AtEndPreamble
Expand Down Expand Up @@ -517,7 +525,6 @@
{
\setCJKsansfont {#1} [#2]
\newCJKfontfamily { \heiti } {#1} [#2]
\newCJKfontfamily { \tablecap } {#1} [ BoldFont = #1 ]
}
\cs_new_protected:Npn \__whu_set_cjk_font_fang:nn #1#2
{
Expand Down

0 comments on commit 2410c0e

Please sign in to comment.