update dwcv

This commit is contained in:
Ming Su 2025-08-12 22:36:56 +08:00
parent aefeacae74
commit 2fa5940ba7
1 changed files with 190 additions and 181 deletions

View File

@ -82,7 +82,7 @@
% use to vertically center content % use to vertically center content
% credits to: http://tex.stackexchange.com/questions/7219/how-to-vertically-center-two-images-next-to-each-other % credits to: http://tex.stackexchange.com/questions/7219/how-to-vertically-center-two-images-next-to-each-other
\newcommand{\vcenteredinclude}[1]{\begingroup \newcommand{\vcenteredinclude}[1]{\begingroup
\setbox0=\hbox{\includegraphics{#1}}% \setbox0=\hbox{\includegraphics{#1}}%
\parbox{\wd0}{\box0}\endgroup} \parbox{\wd0}{\box0}\endgroup}
\newcommand{\tab}[1]{\hspace{.2\textwidth}\rlap{#1}} \newcommand{\tab}[1]{\hspace{.2\textwidth}\rlap{#1}}
% use to vertically center content % use to vertically center content
@ -92,23 +92,23 @@
% icon shortcut % icon shortcut
\newcommand{\icon}[2] { \newcommand{\icon}[2] {
\makebox(#2, #2){\textcolor{maincol}{\textcolor{maincol}{\faIcon{#1}}}} \makebox(#2, #2){\textcolor{maincol}{\textcolor{maincol}{\faIcon{#1}}}}
} }
% icon with text shortcut % icon with text shortcut
\newcommand{\icontext}[3]{ \newcommand{\icontext}[3]{
\vcenteredhbox{\icon{#1}{#2}} \hspace{2pt} \parbox{0.9\mpwidth}{\textcolor{black}{#3}} \vcenteredhbox{\icon{#1}{#2}} \hspace{2pt} \parbox{0.9\mpwidth}{\textcolor{black}{#3}}
} }
% icon with website url % icon with website url
\newcommand{\iconhref}[4]{ \newcommand{\iconhref}[4]{
\vcenteredhbox{\icon{#1}{#2}} \hspace{2pt} \href{#4}{\textcolor{black}{#3}} \vcenteredhbox{\icon{#1}{#2}} \hspace{2pt} \href{#4}{\textcolor{black}{#3}}
} }
% icon with email link % icon with email link
\newcommand{\iconemail}[5]{ \newcommand{\iconemail}[5]{
\vcenteredhbox{\icon{#1}{#2}{#5}} \hspace{2pt} \href{mailto:#4}{\textcolor{#5}{#3}} \vcenteredhbox{\icon{#1}{#2}{#5}} \hspace{2pt} \href{mailto:#4}{\textcolor{#5}{#3}}
} }
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
@ -183,17 +183,17 @@ $if(csl-refs)$
\newlength{\cslentryspacingunit} % times entry-spacing \newlength{\cslentryspacingunit} % times entry-spacing
\setlength{\cslentryspacingunit}{\parskip} \setlength{\cslentryspacingunit}{\parskip}
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing \newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
{% don't indent paragraphs {% don't indent paragraphs
\setlength{\parindent}{0pt} \setlength{\parindent}{0pt}
% turn on hanging indent if param 1 is 1 % turn on hanging indent if param 1 is 1
\ifodd #1 \ifodd #1
\let\oldpar\par \let\oldpar\par
\def\par{\hangindent=\cslhangindent\oldpar} \def\par{\hangindent=\cslhangindent\oldpar}
\fi \fi
% set entry spacing % set entry spacing
\setlength{\parskip}{#2\cslentryspacingunit} \setlength{\parskip}{#2\cslentryspacingunit}
}% }%
{} {}
\usepackage{calc} \usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break} \newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} \newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
@ -260,7 +260,7 @@ $endif$
% renders a standard latex list but abstracts away the environment definition (begin/end) % renders a standard latex list but abstracts away the environment definition (begin/end)
\newcommand{\cvlist}[1] { \newcommand{\cvlist}[1] {
\begin{itemize}{#1}\end{itemize} \begin{itemize}{#1}\end{itemize}
} }
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
@ -271,14 +271,14 @@ $endif$
% Allows complex commands to be passed, too. % Allows complex commands to be passed, too.
% param 1: *any % param 1: *any
\newcommand{\cvtext}[1] { \newcommand{\cvtext}[1] {
\begin{tabular*}{1\mpwidth}{p{0.98\mpwidth}} \begin{tabular*}{1\mpwidth}{p{0.98\mpwidth}}
\parbox{1\mpwidth}{#1} \parbox{1\mpwidth}{#1}
\end{tabular*} \end{tabular*}
} }
\newcommand{\cvtextsmall}[1] { \newcommand{\cvtextsmall}[1] {
\begin{tabular*}{0.8\mpwidth}{p{0.8\mpwidth}} \begin{tabular*}{0.8\mpwidth}{p{0.8\mpwidth}}
\parbox{0.8\mpwidth}{#1} \parbox{0.8\mpwidth}{#1}
\end{tabular*} \end{tabular*}
} }
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% CV SECTION % CV SECTION
@ -288,37 +288,37 @@ $endif$
% param 1: section title % param 1: section title
\newlength{\barw} \newlength{\barw}
\newcommand{\cvsection}[1] { \newcommand{\cvsection}[1] {
\vspace{14pt} \vspace{14pt}
\settowidth{\barw}{\textbf{\LARGE #1}} \settowidth{\barw}{\textbf{\LARGE #1}}
\cvtext{ \cvtext{
\textbf{\LARGE{\textcolor{darkcol}{#1}}}\\[-4pt] \textbf{\LARGE{\textcolor{darkcol}{#1}}}\\[-4pt]
\textcolor{accentcol}{ \rule{\barw}{1.5pt} } \\ \textcolor{accentcol}{ \rule{\barw}{1.5pt} } \\
} }
} }
\newcommand{\cvsubsection}[1] { \newcommand{\cvsubsection}[1] {
\vspace{14pt} \vspace{14pt}
\settowidth{\barw}{\textbf{\Large #1}} \settowidth{\barw}{\textbf{\Large #1}}
\cvtext{ \cvtext{
\textbf{\Large{\textcolor{darkcol}{#1}}}\\[-4pt] \textbf{\Large{\textcolor{darkcol}{#1}}}\\[-4pt]
\textcolor{accentcol}{ \rule{\barw}{1.5pt} } \\ \textcolor{accentcol}{ \rule{\barw}{1.5pt} } \\
} }
} }
\newcommand{\cvheadline}[1] { \newcommand{\cvheadline}[1] {
\vspace{16pt} \vspace{16pt}
\cvtext{ \cvtext{
\textbf{\Huge{\textcolor{accentcol}{#1}}}\\[-4pt] \textbf{\Huge{\textcolor{accentcol}{#1}}}\\[-4pt]
} }
} }
\newcommand{\cvsubheadline}[1] { \newcommand{\cvsubheadline}[1] {
\vspace{16pt} \vspace{16pt}
\cvtext{ \cvtext{
\textbf{\huge{\textcolor{darkcol}{#1}}}\\[-4pt] \textbf{\huge{\textcolor{darkcol}{#1}}}\\[-4pt]
} }
} }
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% META KEYWORDS % META KEYWORDS
@ -329,15 +329,15 @@ $endif$
% param 2: level (for example in years) % param 2: level (for example in years)
% param 3: percent, values range from 0 to 1 % param 3: percent, values range from 0 to 1
\newcommand{\cvkeywords}[3] { \newcommand{\cvkeywords}[3] {
\begin{tabular*}{1\mpwidth}{p{0.72\mpwidth} r} \begin{tabular*}{1\mpwidth}{p{0.72\mpwidth} r}
\textcolor{black}{\textbf{#1}} & \textcolor{maincol}{#2}\\ \textcolor{black}{\textbf{#1}} & \textcolor{maincol}{#2}\\
\end{tabular*}% \end{tabular*}%
\hspace{4pt} \hspace{4pt}
\begin{tikzpicture}[scale=1,rounded corners=2pt,very thin] \begin{tikzpicture}[scale=1,rounded corners=2pt,very thin]
\fill [lightcol] (0,0) rectangle (1\mpwidth, 0.15); \fill [lightcol] (0,0) rectangle (1\mpwidth, 0.15);
\fill [accentcol] (0,0) rectangle (#3\mpwidth, 0.15); \fill [accentcol] (0,0) rectangle (#3\mpwidth, 0.15);
\end{tikzpicture}% \end{tikzpicture}%
} }
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
@ -349,15 +349,15 @@ $endif$
% param 2: level (for example in years) % param 2: level (for example in years)
% param 3: percent, values range from 0 to 1 % param 3: percent, values range from 0 to 1
\newcommand{\cvskill}[3] { \newcommand{\cvskill}[3] {
\begin{tabular*}{1\mpwidth}{p{0.72\mpwidth} r} \begin{tabular*}{1\mpwidth}{p{0.72\mpwidth} r}
\textcolor{black}{\textbf{#1}} & \textcolor{maincol}{#2}\\ \textcolor{black}{\textbf{#1}} & \textcolor{maincol}{#2}\\
\end{tabular*}% \end{tabular*}%
\hspace{4pt} \hspace{4pt}
\begin{tikzpicture}[scale=1,rounded corners=2pt,very thin] \begin{tikzpicture}[scale=1,rounded corners=2pt,very thin]
\fill [lightcol] (0,0) rectangle (1\mpwidth, 0.15); \fill [lightcol] (0,0) rectangle (1\mpwidth, 0.15);
\fill [accentcol] (0,0) rectangle (#3\mpwidth, 0.15); \fill [accentcol] (0,0) rectangle (#3\mpwidth, 0.15);
\end{tikzpicture}% \end{tikzpicture}%
} }
@ -378,46 +378,46 @@ $endif$
% param 7: achievements (optional) % param 7: achievements (optional)
\newcommand{\cvevent}[4] { \newcommand{\cvevent}[4] {
% we wrap this part in a parbox, so title and description are not separated on a pagebreak % we wrap this part in a parbox, so title and description are not separated on a pagebreak
% if you need more control on page breaks, remove the parbox % if you need more control on page breaks, remove the parbox
\parbox{\mpwidth}{ \parbox{\mpwidth}{
\begin{tabular*}{1\mpwidth}{p{0.66\mpwidth} r} \begin{tabular*}{1\mpwidth}{p{0.66\mpwidth} r}
\textcolor{black}{\textbf{#2}} & \colorbox{accentcol}{\makebox[0.32\mpwidth]{\textcolor{white}{\textbf{#1}}}} \\ \textcolor{black}{\textbf{#2}} & \colorbox{accentcol}{\makebox[0.32\mpwidth]{\textcolor{white}{\textbf{#1}}}} \\
\textcolor{maincol}{#3} & \\ \textcolor{maincol}{#3} & \\
\end{tabular*}\\[1pt] \end{tabular*}\\[1pt]
\ifthenelse{\isempty{#4}}{}{ \ifthenelse{\isempty{#4}}{}{
\cvtext{#4}\\ \cvtext{#4}\\
} }
} }
\vspace{14pt} \vspace{14pt}
} }
\newcommand{\cvproj}[4] { \newcommand{\cvproj}[4] {
% we wrap this part in a parbox, so title and description are not separated on a pagebreak % we wrap this part in a parbox, so title and description are not separated on a pagebreak
% if you need more control on page breaks, remove the parbox % if you need more control on page breaks, remove the parbox
\parbox{\mpwidth}{ \parbox{\mpwidth}{
\begin{tabular*}{1\mpwidth}{p{0.66\mpwidth} r} \begin{tabular*}{1\mpwidth}{p{0.66\mpwidth} r}
\textcolor{black}{\textbf{#2, #4}} & \colorbox{accentcol}{\makebox[0.32\mpwidth]{\textcolor{white}{\textbf{#1}}}} \\ \textcolor{black}{\textbf{#2, #4}} & \colorbox{accentcol}{\makebox[0.32\mpwidth]{\textcolor{white}{\textbf{#1}}}} \\
\textcolor{maincol}{#3} & \\ \textcolor{maincol}{#3} & \\
\end{tabular*} \end{tabular*}
} }
\vspace{14pt} \vspace{14pt}
} }
\newcommand{\cvaward}[4] { \newcommand{\cvaward}[4] {
% we wrap this part in a parbox, so title and description are not separated on a pagebreak % we wrap this part in a parbox, so title and description are not separated on a pagebreak
% if you need more control on page breaks, remove the parbox % if you need more control on page breaks, remove the parbox
\parbox{\mpwidth}{ \parbox{\mpwidth}{
\begin{tabular*}{1\mpwidth}{p{0.66\mpwidth} r} \begin{tabular*}{1\mpwidth}{p{0.66\mpwidth} r}
\textcolor{black}{\textbf{#2, #4}} & \colorbox{accentcol}{\makebox[0.32\mpwidth]{\textcolor{white}{\textbf{#1}}}} \\ \textcolor{black}{\textbf{#2, #4}} & \colorbox{accentcol}{\makebox[0.32\mpwidth]{\textcolor{white}{\textbf{#1}}}} \\
\textcolor{maincol}{#3} & \\ \textcolor{maincol}{#3} & \\
\end{tabular*} \end{tabular*}
} }
\vspace{14pt} \vspace{14pt}
} }
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
@ -430,17 +430,17 @@ $endif$
% param 3: customer, employer, etc,. (optional) % param 3: customer, employer, etc,. (optional)
% param 4: info text (optional) % param 4: info text (optional)
\newcommand{\cvmetaevent}[4] { \newcommand{\cvmetaevent}[4] {
\textcolor{maincol} { \cvtext{\textbf{\begin{flushleft}#1\end{flushleft}}}} \textcolor{maincol} { \cvtext{\textbf{\begin{flushleft}#1\end{flushleft}}}}
\ifthenelse{\isempty{#2}}{}{ \ifthenelse{\isempty{#2}}{}{
\textcolor{black} {\cvtext{\textbf{#2}} } \textcolor{black} {\cvtext{\textbf{#2}} }
} }
\ifthenelse{\isempty{#3}}{}{ \ifthenelse{\isempty{#3}}{}{
\cvtext{{ \textcolor{maincol} {#3} }}\\ \cvtext{{ \textcolor{maincol} {#3} }}\\
} }
\cvtext{#4}\\[14pt] \cvtext{#4}\\[14pt]
} }
%--------------------------------------------------------------------------------------- %---------------------------------------------------------------------------------------
@ -450,38 +450,38 @@ $endif$
% Renders a qrcode image (centered, relative to the parentwidth) % Renders a qrcode image (centered, relative to the parentwidth)
% param 1: percent width, from 0 to 1 % param 1: percent width, from 0 to 1
\newcommand{\cvqrcode}[1] { \newcommand{\cvqrcode}[1] {
\begin{center} \begin{center}
\includegraphics[width={#1}\mpwidth]{qrcode} \includegraphics[width={#1}\mpwidth]{qrcode}
\end{center} \end{center}
} }
% HEADER AND FOOOTER % HEADER AND FOOOTER
%==================================== %====================================
\newcommand\Header[1]{% \newcommand\Header[1]{%
\begin{tikzpicture}[remember picture,overlay] \begin{tikzpicture}[remember picture,overlay]
\fill[accentcol] \fill[accentcol]
(current page.north west) -- (current page.north east) -- (current page.north west) -- (current page.north east) --
([yshift=50pt]current page.north east|-current page text area.north east) -- ([yshift=50pt]current page.north east|-current page text area.north east) --
([yshift=50pt,xshift=-3cm]current page.north|-current page text area.north) -- ([yshift=50pt,xshift=-3cm]current page.north|-current page text area.north) --
([yshift=10pt,xshift=-5cm]current page.north|-current page text area.north) -- ([yshift=10pt,xshift=-5cm]current page.north|-current page text area.north) --
([yshift=10pt]current page.north west|-current page text area.north west) -- cycle; ([yshift=10pt]current page.north west|-current page text area.north west) -- cycle;
\node[font=\sffamily\bfseries\color{white},anchor=west, \node[font=\sffamily\bfseries\color{white},anchor=west,
xshift=0.7cm,yshift=-0.32cm] at (current page.north west) xshift=0.7cm,yshift=-0.32cm] at (current page.north west)
{\fontsize{12}{12}\selectfont {#1}}; {\fontsize{12}{12}\selectfont {#1}};
\end{tikzpicture}% \end{tikzpicture}%
} }
\newcommand\Footer[1]{% \newcommand\Footer[1]{%
\begin{tikzpicture}[remember picture,overlay] \begin{tikzpicture}[remember picture,overlay]
\fill[lightcol] \fill[lightcol]
(current page.south east) -- (current page.south west) -- (current page.south east) -- (current page.south west) --
([yshift=-80pt]current page.south east|-current page text area.south east) -- ([yshift=-80pt]current page.south east|-current page text area.south east) --
([yshift=-80pt,xshift=-6cm]current page.south|-current page text area.south) -- ([yshift=-80pt,xshift=-6cm]current page.south|-current page text area.south) --
([xshift=-2.5cm,yshift=-10pt]current page.south|-current page text area.south) -- ([xshift=-2.5cm,yshift=-10pt]current page.south|-current page text area.south) --
([yshift=-10pt]current page.south east|-current page text area.south east) -- cycle; ([yshift=-10pt]current page.south east|-current page text area.south east) -- cycle;
\node[yshift=0.32cm,xshift=9cm] at (current page.south) {\fontsize{10}{10}\selectfont \textbf{\thepage}}; \node[yshift=0.32cm,xshift=9cm] at (current page.south) {\fontsize{10}{10}\selectfont \textbf{\thepage}};
\end{tikzpicture}% \end{tikzpicture}%
} }
@ -514,86 +514,95 @@ $endif$
\setlength{\columnsep}{2.2em} \setlength{\columnsep}{2.2em}
\setlength{\columnseprule}{4pt} \setlength{\columnseprule}{4pt}
\begin{paracol}{2} \begin{paracol}{2}
\begin{leftcolumn} \begin{leftcolumn}
%--------------------------------------------------------------------------------------- %---------------------------------------------------------------------------------------
% META IMAGE % META IMAGE
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
\begin{center}
$if(lang)$ $if(lang)$
\ifnum\pdfstrcmp{$lang$}{en}=0 \ifnum\pdfstrcmp{$lang$}{en}=0
\href{$link$}{\Large{\textbf{\textcolor{maincol}{中文版}}}} \href{$link$}{\Large{\textbf{\textcolor{maincol}{中文版}}}}
\fi \fi
$endif$ $endif$
$if(lang)$ $if(lang)$
\ifnum\pdfstrcmp{$lang$}{cn}=0 \ifnum\pdfstrcmp{$lang$}{cn}=0
\href{$link$}{\Large{\textbf{\textcolor{maincol}{English Version}}}} \href{$link$}{\Large{\textbf{\textcolor{maincol}{English Version}}}}
\fi \fi
$endif$ $endif$
$if(sidebar.image)$ $if(sidebar.image)$
\includegraphics[width=\linewidth]{$sidebar.image$} \includegraphics[width=\linewidth]{$sidebar.image$}
$endif$ $endif$
\fcolorbox{white}{white}{\begin{minipage}[c][1.5cm][c]{1\mpwidth} \fcolorbox{white}{white}{\begin{minipage}[c][1.5cm][c]{1\mpwidth}
\Large{\textbf{\textcolor{maincol}{$author$ ($jobtitle$)}}} \\[2pt] \centering\Large{\textbf{\textcolor{maincol}{$author$ ($jobtitle$)}}} \\[2pt]
\Large{ \textbf{\textcolor{maincol}{$institute$}}} \normalsize{ \textbf{\textcolor{maincol}{$institute$}}}
\end{minipage}}\\[4pt] \end{minipage}}\\[4pt]
\end{center}
$if(sidebar.area)$ $if(sidebar.area)$
\cvsection{Research Area} \cvsection{Research Area}
\large{$sidebar.area$} \\[2pt] \large{$sidebar.area$} \\[2pt]
$endif$ $endif$
%--------------------------------------------------------------------------------------- %---------------------------------------------------------------------------------------
% META SKILLS % META SKILLS
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
$for(sidebar.bullets)$ $for(sidebar.bullets)$
\icontext{caret-right}{12}{$it$}\\[6pt] \icontext{caret-right}{12}{$it$}\\[6pt]
$endfor$ $endfor$
$for(sidebar.sections)$ $for(sidebar.sections)$
\cvsection{$sidebar.sections.name$} \cvsection{$sidebar.sections.name$}
$for(sidebar.sections.items)$ $for(sidebar.sections.items)$
$if(sidebar.sections.items.exp)$ $if(sidebar.sections.items.exp)$
\cvskill{$sidebar.sections.items.text$}{$sidebar.sections.items.exp.text$}{$sidebar.sections.items.exp.num$} \\[10pt] \cvskill{$sidebar.sections.items.text$}{$sidebar.sections.items.exp.text$}{$sidebar.sections.items.exp.num$} \\[10pt]
$elseif(sidebar.sections.items.inst)$ $elseif(sidebar.sections.items.inst)$
\cvmetaevent{$sidebar.sections.items.time$}{$sidebar.sections.items.text$}{$sidebar.sections.items.inst$}{$sidebar.sections.items.details$} \cvmetaevent{$sidebar.sections.items.time$}{$sidebar.sections.items.text$}{$sidebar.sections.items.inst$}{$sidebar.sections.items.details$}
$elseif(sidebar.sections.items.href)$ $elseif(sidebar.sections.items.href)$
\iconhref{$sidebar.sections.items.icon$}{16}{$sidebar.sections.items.text$}{$sidebar.sections.items.href$}\\[6pt] \iconhref{$sidebar.sections.items.icon$}{16}{$sidebar.sections.items.text$}{$sidebar.sections.items.href$}\\[6pt]
$elseif(sidebar.sections.items.icon)$ $elseif(sidebar.sections.items.icon)$
\icontext{$sidebar.sections.items.icon$}{16}{$sidebar.sections.items.text$}\\[6pt] \icontext{$sidebar.sections.items.icon$}{16}{$sidebar.sections.items.text$}\\[6pt]
$else$ $else$
\icontext{caret-right}{12}{$it$}\\[6pt] \icontext{caret-right}{12}{$it$}\\[6pt]
$endif$ $endif$
$endfor$ $endfor$
$endfor$ $endfor$
\cvsection{Welcome} \cvsection{Welcome}
$if(sidebar.recruitmentad)$ $if(sidebar.recruitmentad)$
\textcolor{maincol}{$sidebar.recruitmentad$}\\[6pt] \textcolor{maincol}{$sidebar.recruitmentad$}\\[6pt]
$endif$ $endif$
$if(sidebar.contact)$
\includegraphics[width=0.9\linewidth]{$sidebar.contact$}
$endif$
$if(sidebar.wechat)$
\includegraphics[width=0.9\linewidth]{$sidebar.wechat$} $if(sidebar.contact)$
$endif$ \begin{center}
\includegraphics[width=0.9\linewidth]{$sidebar.contact$}
\end{center}
$endif$
$if(sidebar.wechat)$
\begin{center}
\includegraphics[width=0.9\linewidth]{$sidebar.wechat$}
\end{center}
$endif$
\cvtext{Updated on $sidebar.updatetime$.} \cvtext{Updated on $sidebar.updatetime$.}
\end{leftcolumn} \end{leftcolumn}
\begin{rightcolumn} \begin{rightcolumn}
$body$ $body$
$biblio.tex()$ $biblio.tex()$
\end{rightcolumn} \end{rightcolumn}
\end{paracol} \end{paracol}