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
@ -183,7 +183,7 @@ $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
@ -192,8 +192,8 @@ $if(csl-refs)$
\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}
} }
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
@ -378,8 +378,8 @@ $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}}}} \\
@ -395,8 +395,8 @@ $endif$
\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}}}} \\
@ -408,8 +408,8 @@ $endif$
} }
\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}}}} \\
@ -459,29 +459,29 @@ $endif$
% 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}%
} }
@ -518,26 +518,29 @@ $endif$
%--------------------------------------------------------------------------------------- %---------------------------------------------------------------------------------------
% 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}
@ -577,12 +580,18 @@ $endif$
\textcolor{maincol}{$sidebar.recruitmentad$}\\[6pt] \textcolor{maincol}{$sidebar.recruitmentad$}\\[6pt]
$endif$ $endif$
$if(sidebar.contact)$ $if(sidebar.contact)$
\begin{center}
\includegraphics[width=0.9\linewidth]{$sidebar.contact$} \includegraphics[width=0.9\linewidth]{$sidebar.contact$}
\end{center}
$endif$ $endif$
$if(sidebar.wechat)$ $if(sidebar.wechat)$
\begin{center}
\includegraphics[width=0.9\linewidth]{$sidebar.wechat$} \includegraphics[width=0.9\linewidth]{$sidebar.wechat$}
\end{center}
$endif$ $endif$