refactor source files

This commit is contained in:
Posquit0.BJ 2016-01-08 23:46:10 +09:00
parent 4425ffa19a
commit e4e9d1731c
4 changed files with 97 additions and 114 deletions

View file

@ -36,7 +36,7 @@
\DeclareOption{draft}{\setlength\overfullrule{5pt}} \DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}} \DeclareOption{final}{\setlength\overfullrule{0pt}}
% Inherit options of article % Inherit options of article
\DeclareOption*{ \DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article} \PassOptionsToClass{\CurrentOption}{article}
} }
\ProcessOptions\relax \ProcessOptions\relax
@ -67,15 +67,9 @@
% Needed to change line spacing in specific environment % Needed to change line spacing in specific environment
\RequirePackage{setspace} \RequirePackage{setspace}
% Needed to manage fonts % Needed to manage fonts
\ifxetex
\RequirePackage[quiet]{fontspec} \RequirePackage[quiet]{fontspec}
% To support LaTeX quoting style % To support LaTeX quoting style
\defaultfontfeatures{Ligatures=TeX} \defaultfontfeatures{Ligatures=TeX}
\else
\RequirePackage[T1]{fontenc}
% Replace by the encoding you are using
\RequirePackage[utf8]{inputenc}
\fi
% Needed to manage math fonts % Needed to manage math fonts
\RequirePackage[math-style=TeX,vargreek-shape=unicode]{unicode-math} \RequirePackage[math-style=TeX,vargreek-shape=unicode]{unicode-math}
% Needed to use icons from font-awesome % Needed to use icons from font-awesome
@ -85,7 +79,7 @@
\RequirePackage{parskip} \RequirePackage{parskip}
% Needed to deal hyperlink % Needed to deal hyperlink
\RequirePackage[hidelinks]{hyperref} \RequirePackage[hidelinks]{hyperref}
\hypersetup{ \hypersetup{%
pdftitle={}, pdftitle={},
pdfauthor={}, pdfauthor={},
pdfsubject={}, pdfsubject={},
@ -352,7 +346,7 @@
% Defines an enclosure for letter (cover letter only, optional) % Defines an enclosure for letter (cover letter only, optional)
% Usage: \letterenclosure[<enclosure name>]{<enclosure>} % Usage: \letterenclosure[<enclosure name>]{<enclosure>}
\newcommand*{\letterenclname}[1][Enclosure]{\def\@letterenclname{#1}} \newcommand*{\letterenclname}[1][Enclosure]{\def\@letterenclname{#1}}
\newcommand*{\letterenclosure}[2][]{ \newcommand*{\letterenclosure}[2][]{%
% if an optional argument is provided, use it to redefine \enclname % if an optional argument is provided, use it to redefine \enclname
\ifthenelse{\equal{#1}{}}{}{\def\@letterenclname{#1}} \ifthenelse{\equal{#1}{}}{}{\def\@letterenclname{#1}}
\def\@letterenclosure{#2} \def\@letterenclosure{#2}
@ -362,22 +356,15 @@
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% Commands for extra % Commands for extra
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% Define separator for social informations in header % Define helper macros a user can change easily in header
% Usage: \headersocialsep{<separator>} \newcommand{\acvHeaderNameDelim}{\space}
% Default: \quad\textbar\quad \newcommand{\acvHeaderAfterNameSkip}{.4mm}
\newcommand*{\headersocialsep}[1][\quad\textbar\quad]{\def\@headersocialsep{#1}} \newcommand{\acvHeaderAfterPositionSkip}{.4mm}
\headersocialsep \newcommand{\acvHeaderAfterAddressSkip}{-.5mm}
\newcommand{\acvHeaderIconSep}{\space}
\newcommand{\acvNamedelim}{\space} \newcommand{\acvHeaderSocialSep}{\quad\textbar\quad}
\newcommand{\acvAfternameskip}{.4mm} \newcommand{\acvHeaderAfterSocialSkip}{6mm}
\newcommand{\acvAfterpositionskip}{.4mm} \newcommand{\acvHeaderAfterQuoteSkip}{5mm}
\newcommand{\acvwAfteraddressskip}{-.5mm}
\newcommand{\acvIconsep}{\space}
\newcommand{\acvAfterSocialskip}{0mm}
\newcommand{\acvBeforequoteskip}{6mm}
\newcommand{\acvAfterquoteskip}{5mm}
\newcommand*{\makecvheader}{%
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% Commands for utilities % Commands for utilities
@ -397,26 +384,21 @@
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% Commands for elements of CV structure % Commands for elements of CV structure
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% define helper macros a user can change easily
% Define a header for CV % Define a header for CV
% Usage: \makecvheader % Usage: \makecvheader
\newcommand*{\makecvheader}{%
\begin{center} \begin{center}
\headerfirstnamestyle{% \headerfirstnamestyle{\@firstname}\headerlastnamestyle{{}\acvHeaderNameDelim\@lastname}%
\@firstname% \\[\acvHeaderAfterNameSkip]%
}\headerlastnamestyle{% \ifthenelse{\isundefined{\@position}}{}{\headerpositionstyle{\@position\\[\acvHeaderAfterPositionSkip]}}%
{}\acvNamedelim% \ifthenelse{\isundefined{\@address}}{}{\headeraddressstyle{\@address\\[\acvHeaderAfterAddressSkip]}}%
\@lastname%
}%
\\[\acvAfternameskip]%
\ifthenelse{\isundefined{\@position}}{}{\headerpositionstyle{\@position\\[\acvAfterpositionskip]}}%
\ifthenelse{\isundefined{\@address}}{}{\headeraddressstyle{\@address\\[\acvwAfteraddressskip]}}%
\headersocialstyle{% \headersocialstyle{%
\newbool{isstart}% \newbool{isstart}%
\setbool{isstart}{true}% \setbool{isstart}{true}%
\ifthenelse{\isundefined{\@mobile}}% \ifthenelse{\isundefined{\@mobile}}%
{}% {}%
{% {%
\faMobile\acvIconsep\@mobile% \faMobile\acvHeaderIconSep\@mobile%
\setbool{isstart}{false}% \setbool{isstart}{false}%
}% }%
\ifthenelse{\isundefined{\@email}}% \ifthenelse{\isundefined{\@email}}%
@ -426,8 +408,8 @@
{% {%
\setbool{istart}{false}% \setbool{istart}{false}%
}% }%
{\@headersocialsep}% {\acvHeaderSocialSep}%
\href{mailto:\@email}{\faEnvelope\acvIconsep\@email}% \href{mailto:\@email}{\faEnvelope\acvHeaderIconSep\@email}%
}% }%
\ifthenelse{\isundefined{\@homepage}}% \ifthenelse{\isundefined{\@homepage}}%
{}% {}%
@ -436,8 +418,8 @@
{% {%
\setbool{istart}{false}% \setbool{istart}{false}%
}% }%
{\@headersocialsep}% {\acvHeaderSocialSep}%
\href{http://\@homepage}{\faHome\acvIconsep\@homepage}% \href{http://\@homepage}{\faHome\acvHeaderIconSep\@homepage}%
}% }%
\ifthenelse{\isundefined{\@github}}% \ifthenelse{\isundefined{\@github}}%
{}% {}%
@ -446,8 +428,8 @@
{% {%
\setbool{istart}{false}% \setbool{istart}{false}%
}% }%
{\@headersocialsep}% {\acvHeaderSocialSep}%
\href{https://github.com/\@github}{\faGithubSquare\acvIconsep\@github}% \href{https://github.com/\@github}{\faGithubSquare\acvHeaderIconSep\@github}%
}% }%
\ifthenelse{\isundefined{\@stackoverflowid}}% \ifthenelse{\isundefined{\@stackoverflowid}}%
{}% {}%
@ -456,8 +438,8 @@
{% {%
\setbool{istart}{false} % \setbool{istart}{false} %
}% }%
{\@headersocialsep}% {\acvHeaderSocialSep}%
\href{https://stackoverflow.com/users/\@stackoverflowid}{\faStackOverflow\acvIconsep\@stackoverflowname}% \href{https://stackoverflow.com/users/\@stackoverflowid}{\faStackOverflow\acvHeaderIconSep\@stackoverflowname}%
}% }%
\ifthenelse{\isundefined{\@linkedin}}% \ifthenelse{\isundefined{\@linkedin}}%
{}% {}%
@ -466,8 +448,8 @@
{% {%
\setbool{istart}{false}% \setbool{istart}{false}%
}% }%
{\@headersocialsep}% {\acvHeaderSocialSep}%
\href{https://www.linkedin.com/in/\@linkedin}{\faLinkedinSquare\acvIconsep\@linkedin}% \href{https://www.linkedin.com/in/\@linkedin}{\faLinkedinSquare\acvHeaderIconSep\@linkedin}%
}% }%
\ifthenelse{\isundefined{\@twitter}}% \ifthenelse{\isundefined{\@twitter}}%
{}% {}%
@ -476,8 +458,8 @@
{% {%
\setbool{istart}{false} % \setbool{istart}{false} %
}% }%
{\@headersocialsep}% {\acvHeaderSocialSep}%
\href{https://twitter.com/\@twitter}{\faTwitter\acvIconsep\@twitter}% \href{https://twitter.com/\@twitter}{\faTwitter\acvHeaderIconSep\@twitter}%
}% }%
\ifthenelse{\isundefined{\@skype}}% \ifthenelse{\isundefined{\@skype}}%
{}% {}%
@ -486,34 +468,28 @@
{% {%
\setbool{istart}{false} % \setbool{istart}{false} %
}% }%
{\@headersocialsep}% {\acvHeaderSocialSep}%
\faSkype\acvIconsep\@skype% \faSkype\acvHeaderIconSep\@skype%
}% }%
} \\[\acvAfterSocialskip]% } \\[\acvHeaderAfterSocialSkip]%
\ifthenelse{\isundefined{\@quote}}% \ifthenelse{\isundefined{\@quote}}%
{}% {}%
{\vspace{\acvBeforequoteskip}\headerquotestyle{\@quote\\}\vspace{\acvAfterquoteskip}}% {\headerquotestyle{\@quote\\}\vspace{\acvHeaderAfterQuoteSkip}}%
\end{center}% \end{center}%
} }
% Define a footer for CV % Define a footer for CV
% Usage: \makecvfooter{<left>}{<center>}{<right>} % Usage: \makecvfooter{<left>}{<center>}{<right>}
\newcommand*{\makecvfooter}[3]{ \newcommand*{\makecvfooter}[3]{%
\fancyfoot{} \fancyfoot{}
\fancyfoot[L]{ \fancyfoot[L]{\footerstyle{#1}}
\footerstyle{#1} \fancyfoot[C]{\footerstyle{#2}}
} \fancyfoot[R]{\footerstyle{#3}}
\fancyfoot[C]{
\footerstyle{#2}
}
\fancyfoot[R]{
\footerstyle{#3}
}
} }
% Define a section for CV % Define a section for CV
% Usage: \cvsection{<section-title>} % Usage: \cvsection{<section-title>}
\newcommand{\cvsection}[1]{ \newcommand{\cvsection}[1]{%
\par\addvspace{1.5ex} \par\addvspace{1.5ex}
\phantomsection{} \phantomsection{}
\sectionstyle{#1} \sectionstyle{#1}
@ -523,29 +499,29 @@
% Define a subsection for CV % Define a subsection for CV
% Usage: \cvsubsection{<subsection-title>} % Usage: \cvsubsection{<subsection-title>}
\newcommand{\cvsubsection}[1]{ \newcommand{\cvsubsection}[1]{%
\phantomsection{} \phantomsection{}
\subsectionstyle{#1} \subsectionstyle{#1}
} }
% Define a paragraph for CV % Define a paragraph for CV
\newenvironment{cvparagraph}{ \newenvironment{cvparagraph}{%
\vspace{-3mm} \vspace{-3mm}
\paragraphstyle \paragraphstyle
}{ }{%
\vspace{1mm} \vspace{1mm}
} }
% Define an environment for cventry % Define an environment for cventry
\newenvironment{cventries}{ \newenvironment{cventries}{%
\begin{center} \begin{center}
}{ }{%
\end{center} \end{center}
} }
% Define an entry of cv information % Define an entry of cv information
% Usage: \cventry{<position>}{<title>}{<location>}{<date>}{<description>} % Usage: \cventry{<position>}{<title>}{<location>}{<date>}{<description>}
\newcommand*{\cventry}[5]{ \newcommand*{\cventry}[5]{%
\setlength\tabcolsep{0pt} \setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt} \setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}}
@ -558,14 +534,14 @@
} }
% Define an environment for cvsubentry % Define an environment for cvsubentry
\newenvironment{cvsubentries}{ \newenvironment{cvsubentries}{%
\begin{center} \begin{center}
}{ }{%
\end{center} \end{center}
} }
% Define a subentry of cv information % Define a subentry of cv information
% Usage: \cvsubentry{<position>}{<title>}{<date>}{<description>} % Usage: \cvsubentry{<position>}{<title>}{<date>}{<description>}
\newcommand*{\cvsubentry}[4]{ \newcommand*{\cvsubentry}[4]{%
\setlength\tabcolsep{0pt} \setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt} \setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}}
@ -582,47 +558,45 @@
} }
% Define an environment for cvhonor % Define an environment for cvhonor
\newenvironment{cvhonors}{ \newenvironment{cvhonors}{%
\begin{center} \begin{center}
\setlength\tabcolsep{0pt} \setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt} \setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} C{1.5cm} L{\textwidth - 4.0cm} R{2.5cm}} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} C{1.5cm} L{\textwidth - 4.0cm} R{2.5cm}}
}{ }{%
\end{tabular*} \end{tabular*}
\end{center} \end{center}
} }
% Define a line of cv information(honor, award or something else) % Define a line of cv information(honor, award or something else)
% Usage: \cvhonor{<position>}{<title>}{<location>}{<date>} % Usage: \cvhonor{<position>}{<title>}{<location>}{<date>}
\newcommand*{\cvhonor}[4]{ \newcommand*{\cvhonor}[4]{%
\honordatestyle{#4} & \honorpositionstyle{#1}, \honortitlestyle{#2} & \honorlocationstyle{#3} \honordatestyle{#4} & \honorpositionstyle{#1}, \honortitlestyle{#2} & \honorlocationstyle{#3} \\
\\
} }
% Define an environment for cvskill % Define an environment for cvskill
\newenvironment{cvskills}{ \newenvironment{cvskills}{%
\begin{center} \begin{center}
\setlength\tabcolsep{1ex} \setlength\tabcolsep{1ex}
\setlength{\extrarowheight}{0pt} \setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} r L{\textwidth * \real{0.9}}} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} r L{\textwidth * \real{0.9}}}
}{ }{%
\end{tabular*} \end{tabular*}
\end{center} \end{center}
} }
% Define a line of cv information(skill) % Define a line of cv information(skill)
% Usage: \cvskill{<type>}{<skillset>} % Usage: \cvskill{<type>}{<skillset>}
\newcommand*{\cvskill}[2]{ \newcommand*{\cvskill}[2]{%
\skilltypestyle{#1} & \skillsetstyle{#2} \skilltypestyle{#1} & \skillsetstyle{#2} \\
\\
} }
% Define an environment for cvitems(for cventry) % Define an environment for cvitems(for cventry)
\newenvironment{cvitems}{ \newenvironment{cvitems}{%
\vspace{-4mm} \vspace{-4mm}
\begin{justify} \begin{justify}
\begin{itemize}[leftmargin=2ex, nosep, noitemsep] \begin{itemize}[leftmargin=2ex, nosep, noitemsep]
\setlength{\parskip}{0pt} \setlength{\parskip}{0pt}
\renewcommand{\labelitemi}{\bullet} \renewcommand{\labelitemi}{\bullet}
}{ }{%
\end{itemize} \end{itemize}
\end{justify} \end{justify}
\vspace{-2mm} \vspace{-2mm}
@ -633,14 +607,14 @@
% Commands for elements of Cover Letter % Commands for elements of Cover Letter
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% Define an environment for cvletter % Define an environment for cvletter
\newenvironment{cvletter}{ \newenvironment{cvletter}{%
\lettertextstyle \lettertextstyle
}{ }{%
} }
% Define a section for the cover letter % Define a section for the cover letter
% Usage: \lettersection{<section-title>} % Usage: \lettersection{<section-title>}
\newcommand{\lettersection}[1]{ \newcommand{\lettersection}[1]{%
\par\addvspace{2.5ex} \par\addvspace{2.5ex}
\phantomsection{} \phantomsection{}
\lettersectionstyle{#1} \lettersectionstyle{#1}
@ -650,7 +624,7 @@
% Define a title of the cover letter % Define a title of the cover letter
% Usage: \makelettertitle % Usage: \makelettertitle
\newcommand*{\makelettertitle}{ \newcommand*{\makelettertitle}{%
\vspace{8.4mm} \vspace{8.4mm}
\setlength\tabcolsep{0pt} \setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt} \setlength{\extrarowheight}{0pt}
@ -668,13 +642,13 @@
% Define a closing of the cover letter % Define a closing of the cover letter
% Usage: \makeletterclosing % Usage: \makeletterclosing
\newcommand*{\makeletterclosing}{ \newcommand*{\makeletterclosing}{%
\vspace{3.4mm} \vspace{3.4mm}
\lettertextstyle{\@letterclosing} \\\\ \lettertextstyle{\@letterclosing} \\\\
\letternamestyle{\@firstname\ \@lastname} \letternamestyle{\@firstname\ \@lastname}
\ifthenelse{\isundefined{\@letterenclosure}} \ifthenelse{\isundefined{\@letterenclosure}}
{\\} {\\}
{ {%
\\\\\\ \\\\\\
\letterenclosurestyle{\@letterenclname: \@letterenclosure} \\ \letterenclosurestyle{\@letterenclname: \@letterenclosure} \\
} }

View file

@ -20,12 +20,13 @@
%%% Themes: Awesome-CV %%% Themes: Awesome-CV
\documentclass[11pt, a4paper]{awesome-cv} \documentclass[11pt, a4paper]{awesome-cv}
%% Page Layout
% Configure page margins with geometry
\geometry{left=1.4cm, top=.8cm, right=1.4cm, bottom=1.8cm, footskip=.5cm}
%%% Override a directory location for fonts(default: 'fonts/') %%% Override a directory location for fonts(default: 'fonts/')
\fontdir[fonts/] \fontdir[fonts/]
%%% Configure a directory location for sections
\newcommand*{\sectiondir}{cv/}
%%% Override color %%% Override color
% Awesome Colors: awesome-emerald, awesome-skyblue, awesome-red, awesome-pink, awesome-orange % Awesome Colors: awesome-emerald, awesome-skyblue, awesome-red, awesome-pink, awesome-orange
% awesome-nephritis, awesome-concrete, awesome-darknight % awesome-nephritis, awesome-concrete, awesome-darknight
@ -40,7 +41,7 @@
% \definecolor{lighttext}{HTML}{414141} % \definecolor{lighttext}{HTML}{414141}
%%% Override a separator for social informations in header(default: ' | ') %%% Override a separator for social informations in header(default: ' | ')
%\headersocialsep[\quad\textbar\quad] % \renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View file

@ -20,6 +20,10 @@
%%% Themes: Awesome-CV %%% Themes: Awesome-CV
\documentclass[11pt, a4paper]{awesome-cv} \documentclass[11pt, a4paper]{awesome-cv}
%% Page Layout
% Configure page margins with geometry
\geometry{left=1.4cm, top=.8cm, right=1.4cm, bottom=1.8cm, footskip=.5cm}
%%% Override a directory location for fonts(default: 'fonts/') %%% Override a directory location for fonts(default: 'fonts/')
\fontdir[fonts/] \fontdir[fonts/]
@ -40,7 +44,7 @@
% \definecolor{lighttext}{HTML}{414141} % \definecolor{lighttext}{HTML}{414141}
%%% Override a separator for social informations in header(default: ' | ') %%% Override a separator for social informations in header(default: ' | ')
%\headersocialsep[\quad\textbar\quad] % \renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View file

@ -20,6 +20,10 @@
%%% Themes: Awesome-CV %%% Themes: Awesome-CV
\documentclass[11pt, a4paper]{awesome-cv} \documentclass[11pt, a4paper]{awesome-cv}
%% Page Layout
% Configure page margins with geometry
\geometry{left=1.4cm, top=.8cm, right=1.4cm, bottom=1.8cm, footskip=.5cm}
%%% Override a directory location for fonts(default: 'fonts/') %%% Override a directory location for fonts(default: 'fonts/')
\fontdir[fonts/] \fontdir[fonts/]
@ -40,7 +44,7 @@
% \definecolor{lighttext}{HTML}{414141} % \definecolor{lighttext}{HTML}{414141}
%%% Override a separator for social informations in header(default: ' | ') %%% Override a separator for social informations in header(default: ' | ')
%\headersocialsep[\quad\textbar\quad] % \renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%