Skip to content

Commit

Permalink
feat: add Chinese support. (#11)
Browse files Browse the repository at this point in the history
* add Chinese support

* fix: remove redundant space
  • Loading branch information
niltok authored Mar 30, 2023
1 parent 1659e7f commit 252e47e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions chicv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@
}
}

% add CJK fonts and use zh line break
% usage: \useChinese{<normal font weight>}{<bold font weight>}
\newcommand{\useChinese}[2]{
\RequirePackage{xeCJK}
\setCJKmainfont{SourceHanSerifCN}[
Path = ./fonts/,
Extension = .otf,
UprightFont = *-#1,
BoldFont = *-#2,
]
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
}

% format for section title
\titleformat{\section}
{\headingfont\Large} % shape
Expand Down
Binary file added fonts/SourceHanSerifCN-Bold.otf
Binary file not shown.
Binary file added fonts/SourceHanSerifCN-Heavy.otf
Binary file not shown.
Binary file added fonts/SourceHanSerifCN-Medium.otf
Binary file not shown.
Binary file added fonts/SourceHanSerifCN-Regular.otf
Binary file not shown.
5 changes: 5 additions & 0 deletions resume.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
% optionally suppress printing the page number
\pagenumbering{gobble}

% optional Chinese support
% \useChinese{Medium}{Heavy}
% \useChinese{Regular}{Bold}

\begin{document}

%% basic personal info
Expand All @@ -29,6 +33,7 @@ \section{Education}
\begin{itemize}
\item GPA 93.58/100, Rank 1/149, National Scholarship 2019 (Top 0.2\% national-wide)
\item A+ Courses: Operating Systems, Computer Architecture, Computer Networks, and 28 others
% \item 长中文段落测试:「于是我们奋力前进,却如同逆水行舟,注定要不停地退回过去。」——《了不起的盖茨比》菲茨杰拉德
\end{itemize}

\section{Internship Experience}
Expand Down

0 comments on commit 252e47e

Please sign in to comment.