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