update
This commit is contained in:
43
resume.cls
Normal file → Executable file
43
resume.cls
Normal file → Executable file
@@ -1,12 +1,11 @@
|
||||
\RequirePackage{expl3,l3keys2e}
|
||||
\ProvidesExplClass{resume}
|
||||
{2022-12-26}{0.1.0}{Another Resume Class by Feng Kaiyu}
|
||||
|
||||
% Keep Quiet
|
||||
\PassOptionsToPackage{quiet}{xeCJK}
|
||||
\ProcessOptions\relax
|
||||
\LoadClass[zihao=5,autoindent=0.5em]{ctexart}
|
||||
|
||||
% \LoadClass[zihao=5,autoindent=0.5em]{ctexart}
|
||||
\LoadClass[zihao=-4,autoindent=0.5em]{ctexart}
|
||||
% Define paper size.
|
||||
\RequirePackage{geometry}
|
||||
% Remove the default header and footer.
|
||||
@@ -20,25 +19,18 @@
|
||||
\RequirePackage{xeCJKfntef}
|
||||
% Provide colors.
|
||||
\RequirePackage{xcolor}
|
||||
|
||||
% Clean pagestyle.
|
||||
\pagestyle{empty}
|
||||
|
||||
% Adopt A4 style but with smaller margins.
|
||||
\geometry{a4paper,margin=1cm, bottom=0.5cm}
|
||||
|
||||
%%% Global Variables %%%
|
||||
|
||||
% Store all contacts info.
|
||||
\seq_new:N \g__resume_contacts_seq
|
||||
% Store title name.
|
||||
\tl_new:N \g__resume_title_name_tl
|
||||
|
||||
%%% Global Settings %%%
|
||||
|
||||
% No page number.
|
||||
\pagenumbering{gobble}
|
||||
|
||||
% Set the style of section title.
|
||||
\ctexset{
|
||||
section = {
|
||||
@@ -46,46 +38,37 @@
|
||||
number = {},
|
||||
format = \noindent \zihao{4} \heiti \__resume_section_title_format:n,
|
||||
indent = -1em,
|
||||
afterskip = 0.5em,
|
||||
beforeskip = 0.2em,
|
||||
afterskip = 0.7em, % 原 0.5em
|
||||
beforeskip = 0.4em, % 原 0.2em
|
||||
},
|
||||
}
|
||||
|
||||
% Set the style of list.
|
||||
\setlist{
|
||||
labelsep=2pt,
|
||||
labelwidth=5pt,
|
||||
leftmargin=1.3em,
|
||||
itemsep=0em,
|
||||
parsep=0.20em,
|
||||
itemsep=0.30em, % 原 0em
|
||||
parsep=0.20em, % 原 0.20em
|
||||
topsep=0em,
|
||||
}
|
||||
|
||||
% Set the line spacing.
|
||||
\linespread{1.15}
|
||||
|
||||
\linespread{1.15} % 原 1.15
|
||||
% New counter for bookmarks.
|
||||
\newcounter{resumebookmark}
|
||||
|
||||
%%% User Commands %%%
|
||||
|
||||
% Predefined commands.
|
||||
\cs_new:Npn \__resume_append_concat:n #1
|
||||
{
|
||||
\seq_put_right:Nn \g__resume_contacts_seq {#1}
|
||||
}
|
||||
|
||||
% Predefined commands.
|
||||
\cs_new:Npn \__resume_section_title_format:n #1
|
||||
{#1 \vspace{3pt} \hrule}
|
||||
|
||||
|
||||
% Add a contant info.
|
||||
\NewDocumentCommand{\ResumeContact}{m}
|
||||
{
|
||||
\__resume_append_concat:n {#1}
|
||||
}
|
||||
|
||||
% Add multiple contant info.
|
||||
% ```
|
||||
% \ResumeContacts{ itemA, itemB, itemC }
|
||||
@@ -98,13 +81,11 @@
|
||||
\__resume_append_concat:n {##1}
|
||||
}
|
||||
}
|
||||
|
||||
% Add your resume title, which generally is your name.
|
||||
\NewDocumentCommand{\ResumeName}{m}
|
||||
{
|
||||
\tl_set:Nn \g__resume_title_name_tl {#1}
|
||||
}
|
||||
|
||||
% Render the title.
|
||||
\NewDocumentCommand{\ResumeTitle}{}
|
||||
{
|
||||
@@ -114,10 +95,9 @@
|
||||
% Reduce the space.
|
||||
\vspace{-1.4em}
|
||||
\begin{center}
|
||||
\seq_use:Nnnn \g__resume_contacts_seq {~|~} {~|~} {~|~}
|
||||
{\zihao{5} \seq_use:Nnnn \g__resume_contacts_seq {~|~} {~|~} {~|~}}
|
||||
\end{center}
|
||||
}
|
||||
|
||||
% Render the section title.
|
||||
% #1(optional): This content will be used as the bookmark in PDF.
|
||||
% #2: The title of the section.
|
||||
@@ -145,9 +125,7 @@
|
||||
\IfValueT{#3}{
|
||||
\tl_if_empty:nF {#3} {
|
||||
\ |
|
||||
\textit{
|
||||
#3
|
||||
}
|
||||
}
|
||||
}
|
||||
\hfill
|
||||
@@ -157,17 +135,14 @@
|
||||
\par
|
||||
}
|
||||
}
|
||||
|
||||
% Gray out the content.
|
||||
\NewDocumentCommand{\GrayText}{m}
|
||||
{
|
||||
\textcolor{gray}{#1}
|
||||
}
|
||||
|
||||
% Render content with a hyperlink, marked with underline.
|
||||
\NewDocumentCommand{\ResumeUrl}{mm}
|
||||
{
|
||||
\href{#1}{\CJKunderline{#2}}
|
||||
}
|
||||
|
||||
\endinput
|
||||
\endinput
|
||||
Reference in New Issue
Block a user