% \iffalse meta-comment % % resumecls.dtx % Copyright (C) 2012-2015 by huxuan % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is huxuan . % % This work consists of the files resumecls.dtx and resumecls.ins % and the derived file resumecls.cls. % % \fi % \iffalse %<*driver> \ProvidesFile{\jobname.dtx} % %\NeedsTeXFormat{LaTeX2e}[2011/06/27] %\ProvidesClass{resumecls} %<*class> [2015/09/21 v0.3.2 Welcome, contributors] % % %<*driver> \documentclass{ltxdoc} \usepackage{color} \definecolor{dkgreen}{rgb}{0,0.6,0} \definecolor{gray}{rgb}{0.5,0.5,0.5} \definecolor{mauve}{rgb}{0.58,0,0.82} \usepackage[xetex,unicode,colorlinks]{hyperref} \usepackage{listings} \lstset{ backgroundcolor=\color{white}, basicstyle=\ttfamily, columns=flexible, breakatwhitespace=false, breaklines=true, captionpos=b, frame=single, numbers=left, numbersep=5pt, showspaces=false, showstringspaces=false, showtabs=false, stepnumber=1, rulecolor=\color{black}, tabsize=2, texcl=true, title=\lstname, escapeinside={(*}{*)}, extendedchars=false, mathescape=true, xleftmargin=3em, xrightmargin=3em, numberstyle=\color{gray}, keywordstyle=\color{blue}, commentstyle=\color{dkgreen}, stringstyle=\color{mauve}, language={[LaTeX]TeX}, morekeywords={setmainfont,setCJKmainfont}, } \EnableCrossrefs \CodelineIndex \RecordChanges %\OnlyDescription \begin{document} \DocInput{\jobname.dtx} \end{document} % % \fi % % \CheckSum{124} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % \changes{v0.1}{2012/12/19}{Initial version with dtx} % \changes{v0.1.1}{2012/12/19}{Minor bug fix} % \changes{v0.1.2}{2012/12/19}{Customization part in documentation} % \changes{v0.1.3}{2012/12/19}{Add reference settings} % \changes{v0.1.4}{2012/12/20}{Use bfseries for better English support} % \changes{v0.2}{2013/03/07}{First try to upload to CTAN} % \changes{v0.2.1}{2013/03/17}{Celebrate for being included in CTAN} % \changes{v0.3}{2013/06/17}{Long time no see, resumecls} % \changes{v0.3.1}{2015/09/20}{Compatible with TeXLive 2015 now} % \changes{v0.3.2}{2015/09/21}{Welcome, contributors} % % \GetFileInfo{\jobname.dtx} % % \DoNotIndex{\\,\begin,\bfseries,\bibliographystyle,\bibsep,\colorbox} % \DoNotIndex{\CurrentOption,\DeclareOption,\def,\definecolor,\else,\end} % \DoNotIndex{\fancyfoot,\fancyhf,\fi,\footnotesize,\footrulewidth} % \DoNotIndex{\headrulewidth,\heiti,\href,\hspace,\hypersetup,\ifrclscolor} % \DoNotIndex{\LoadClass,\maketitle,\newcommand,\newif,\pagestyle,\parbox} % \DoNotIndex{\PassOptionsToClass,\ProcessOptions,\rclsaddress,\rclscolorfalse} % \DoNotIndex{\rclscolortrue,\rclshomepage,\rclsleftfooter,\rclsmail} % \DoNotIndex{\rclsmobile,\rclsname,\rclsorganization,\rclsrightfooter} % \DoNotIndex{\rightfooter,\refname,\relax,\renewcommand,\RequirePackage} % \DoNotIndex{\setlength,\textwidth,\url,\zihao} % \DoNotIndex{} % % \def\resumecls{\textsf{resumecls}\ } % % \title{The \resumecls package\thanks{This document % corresponds to \resumecls\fileversion, % dated~\filedate.}} % \author{huxuan \\ \texttt{i@huxuan.org}} % \date{\filedate} % % \maketitle % % \begin{abstract} % \resumecls is a \LaTeX cls making typeseting a resume or cv in both English % and Chinese more easily. % \end{abstract} % % \section{Introduction} % % There do exist many resume cls already. But from my experience, most of them % are too complicated or lack of flexibility. % % \resumecls make all contents consists of heading/entry based on tabularx. % You can easily design the style and many recommended ones are also listed % in example files. % % What's more, \resumecls already has ctex package imported which means it % support Chinese natively. The example-zh.tex and example-en.tex is almost % the same (in \LaTeX{} code, not the content). You need no more work % to make your resume both in English and Chinese. % % \section{Usage} % % \DescribeMacro{\heading} % The heading part for each section. % % \DescribeMacro{\entry} % All contents except for heading. % % \DescribeMacro{\name} % Your Name. % % \DescribeMacro{\organization} % Your unit, shcool or organization. % % \DescribeMacro{\address} % Your address and zip code. % % \DescribeMacro{\mobile} % Your phone number. % % \DescribeMacro{\mail} % Your mail address. % % \DescribeMacro{\homepage} % Your homepage. % % \DescribeMacro{\leftfooter} % The content you want to put at left footer. Feel free to leave it blank. % % \DescribeMacro{\rightrfooter} % The content you want to put at right footer. Feel free to leave it blank. % % \StopEventually{\PrintChanges\PrintIndex} % % \section{Implementation} % % \subsection{Options} % \begin{macrocode} \newif\ifrclscolor\rclscolorfalse \DeclareOption{color}{\rclscolortrue} % \end{macrocode} % % \subsection{Import article class} % \begin{macrocode} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} \ProcessOptions\relax \LoadClass[a4paper,12pt]{article} % \end{macrocode} % % \subsection{Import packages} % \begin{macrocode} \RequirePackage[top=.5in,bottom=.5in,left=.5in,right=.5in]{geometry} \RequirePackage[xetex,unicode]{hyperref} \RequirePackage[noindent]{ctex} \RequirePackage{tabularx} \RequirePackage{color} \RequirePackage{fancyhdr} % \end{macrocode} % % \subsection{Color Settings} % % \subsubsection{Background color for heading} % \begin{macrocode} \definecolor{heading}{gray}{0.85} % \end{macrocode} % % \subsubsection{Color for hyperlink} % \begin{macrocode} \ifrclscolor \hypersetup{colorlinks} \else \hypersetup{hidelinks} \fi % \end{macrocode} % % \subsection{Reference Settings} % % \begin{macrocode} \RequirePackage[sort&compress]{natbib} \bibliographystyle{unsrt} \setlength{\bibsep}{0pt} % \end{macrocode} % % \subsection{Content Variable} % % \begin{macro}{\name} % \begin{macrocode} \def\rclsname{} \newcommand\name[1]{\def\rclsname{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\organization} % \begin{macrocode} \def\rclsorganization{} \newcommand\organization[1]{\def\rclsorganization{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\address} % \begin{macrocode} \def\rclsaddress{} \newcommand\address[1]{\def\rclsaddress{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\mobile} % \begin{macrocode} \def\rclsmobile{} \newcommand\mobile[1]{\def\rclsmobile{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\mail} % \begin{macrocode} \def\rclsmail{} \newcommand\mail[1]{\def\rclsmail{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\homepage} % \begin{macrocode} \def\rclshomepage{} \newcommand\homepage[1]{\def\rclshomepage{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\leftfooter} % \begin{macrocode} \def\rclsleftfooter{} \newcommand\leftfooter[1]{\def\rclsleftfooter{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\rightfooter} % \begin{macrocode} \def\rclsrightfooter{} \newcommand\rightfooter[1]{\def\rclsrightfooter{#1}} % \end{macrocode} % \end{macro} % % \subsection{Custom commands} % % \begin{macro}{\heading} % \begin{macrocode} \newcommand{\heading}[1]{% \colorbox{heading}{% \parbox{.98\textwidth}{% \bfseries\zihao{4}#1 } } \\ } % \end{macrocode} % \end{macro} % % \begin{macro}{\entry} % \begin{macrocode} \newcommand{\entry}[3]{% \begin{tabularx}{\textwidth}{@{\hspace{#1}}#2} #3 \end{tabularx} } % \end{macrocode} % \end{macro} % % \subsection{Style settings} % % \subsubsection{Redefine maketitle} % \begin{macrocode} \renewcommand{\maketitle}{% \entry{0em}{Xr}{% \bfseries\zihao{4}\rclsname & \rclsmobile \\ \rclsorganization & \href{mailto:\rclsmail}{\rclsmail} \\ \rclsaddress & \url{\rclshomepage} \\ } } % \end{macrocode} % % \subsubsection{Header and footer settings} % \begin{macrocode} \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \fancyfoot[L]{\footnotesize \rclsleftfooter} \fancyfoot[R]{\footnotesize \rclsrightfooter} % \end{macrocode} % % \subsubsection{Empty refname} % % \begin{macrocode} \renewcommand{\refname}{} % \end{macrocode} % % \subsection{Customization} % % \subsubsection{Font settings} % % Cause we recommend use Xe\LaTeX{} to compile, so you can easily setting % the font to whatever you like only if it exists on you computer. % Just add something like following code before |\begin{document}|. % % \iffalse %<*lst> % \fi \begin{lstlisting} \setmainfont{Times New Roman} \setCJKmainfont[BoldFont=(*黑体*)]{(*宋体*)} \end{lstlisting} % \iffalse % % \fi % % \subsubsection{Multiple pages} % % Currently, \resumecls doesn't support multiple pages very well. Before % showing the method for customization I want you relize that only one page % for resume is enough. \resumecls use |\begin{table}| and |\end{table}| to % enclose all contents so that the whole resume will be limited in one page. % But if you really want to have multiple pages, you can set multiple table % environments in your tex file and judge the place for new page yourself. % the code within document environment for two pages resume will looks like: % % \iffalse %<*lst> % \fi \begin{lstlisting} \begin{table} Contents for Page 1 \end{table} \newpage \begin{table} Contents for Page 2 \end{table} \end{lstlisting} % \iffalse % % \fi % % \section{Contributors} % % \begin{itemize} % \item \href{https://github.com/idear1203}{IDEAR } % \end{itemize} % % \Finale \endinput