From ae05563a06943a111d98c937ff4945c746d62f78 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 17 Apr 2018 16:14:00 +0800 Subject: resume.cls: cleanup, add position/location, bump to version v2.1.0 * Move 'a4paper' option to 'gemoetry' package * Enhance 'geometry' options to drop the 'fullpage' package * Do not use 'ulem' package (underline is not recommended in general) * Do not setup xeCJK when 'zh' option not specified * Add position & location support * Bump to version 2.1.0 --- resume.cls | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/resume.cls b/resume.cls index 753e472..9ab786f 100644 --- a/resume.cls +++ b/resume.cls @@ -12,8 +12,8 @@ %% https://www.latextemplates.com/template/plasmati-graduate-cv %% -\ProvidesClass{resume}[2018/04/11 v2.0.0 'Resume' Class] -\LoadClass[a4paper]{article} +\ProvidesClass{resume}[2018/04/17 v2.1.0 Resume Class] +\LoadClass{article} %% %% Class options @@ -28,13 +28,16 @@ %% Packages %% +\RequirePackage[% + a4paper,% + margin=1.5cm,% + includefoot, +]{geometry} \RequirePackage{xparse} \RequirePackage{etoolbox} \RequirePackage{fontspec} \RequirePackage{fontawesome} -\RequirePackage{parskip} -\RequirePackage{fullpage} -\RequirePackage[margin=1.5cm]{geometry} +\RequirePackage{parskip} % auto adjust parskip and items skip \RequirePackage{titlesec} \RequirePackage{enumitem} \RequirePackage{setspace} @@ -43,14 +46,13 @@ \RequirePackage{makecell} % multirowcell \RequirePackage{longtable} \RequirePackage[usenames,dvipsnames]{xcolor} -\RequirePackage[skins]{tcolorbox} \RequirePackage{tikz} -\RequirePackage{ulem} -%\ifdef{\@zh}{ +\RequirePackage[skins]{tcolorbox} % required by tikz to make the header +\RequirePackage{csquotes} +\RequirePackage{microtype} +\ifdef{\@zh}{ \RequirePackage{xeCJK} - \RequirePackage{CJKulem} - \RequirePackage{csquotes} -%}{} +}{} % % Hyperref @@ -91,12 +93,12 @@ \setmonofont{M+ 1mn} % Chinese setup -%\ifdef{\@zh}{ +\ifdef{\@zh}{ \xeCJKsetup{PunctStyle=hangmobanjiao} \setCJKmainfont{Noto Serif CJK SC}[BoldFont=Noto Sans CJK SC] \setCJKsansfont{Noto Sans CJK SC} \setCJKmonofont{Noto Sans Mono CJK SC} -%}{} +}{} % Color setup \ifdef{\@monochrome}% @@ -215,6 +217,15 @@ \foreach \n in {#1}{\tag{\n}\hspace{0.1em}} } +%% +%% Position and location +%% + +\newcommand*{\setposition}[1]{\def\@position{#1}} +\newcommand*{\getposition}{\@position} +\newcommand*{\setlocation}[1]{\def\@location{#1}} +\newcommand*{\getlocation}{\@location} + %% %% Header %% -- cgit v1.2.2