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
@ -183,7 +183,7 @@ $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
@ -192,8 +192,8 @@ $if(csl-refs)$
\fi
% set entry spacing
\setlength{\parskip}{#2\cslentryspacingunit}
}%
{}
}%
{}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\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)
\newcommand{\cvlist}[1] {
\begin{itemize}{#1}\end{itemize}
\begin{itemize}{#1}\end{itemize}
}
%----------------------------------------------------------------------------------------
@ -378,8 +378,8 @@ $endif$
% 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
% 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}}}} \\
@ -395,8 +395,8 @@ $endif$
\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
% 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}}}} \\
@ -408,8 +408,8 @@ $endif$
}
\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
% 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}}}} \\
@ -459,29 +459,29 @@ $endif$
% HEADER AND FOOOTER
%====================================
\newcommand\Header[1]{%
\begin{tikzpicture}[remember picture,overlay]
\fill[accentcol]
\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,
\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}%
\end{tikzpicture}%
}
\newcommand\Footer[1]{%
\begin{tikzpicture}[remember picture,overlay]
\fill[lightcol]
\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}%
\node[yshift=0.32cm,xshift=9cm] at (current page.south) {\fontsize{10}{10}\selectfont \textbf{\thepage}};
\end{tikzpicture}%
}
@ -518,26 +518,29 @@ $endif$
%---------------------------------------------------------------------------------------
% META IMAGE
%----------------------------------------------------------------------------------------
\begin{center}
$if(lang)$
$if(lang)$
\ifnum\pdfstrcmp{$lang$}{en}=0
\href{$link$}{\Large{\textbf{\textcolor{maincol}{中文版}}}}
\fi
$endif$
$if(lang)$
$endif$
$if(lang)$
\ifnum\pdfstrcmp{$lang$}{cn}=0
\href{$link$}{\Large{\textbf{\textcolor{maincol}{English Version}}}}
\fi
$endif$
$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$}}}
\centering\Large{\textbf{\textcolor{maincol}{$author$ ($jobtitle$)}}} \\[2pt]
\normalsize{ \textbf{\textcolor{maincol}{$institute$}}}
\end{minipage}}\\[4pt]
\end{center}
$if(sidebar.area)$
\cvsection{Research Area}
@ -577,12 +580,18 @@ $endif$
\textcolor{maincol}{$sidebar.recruitmentad$}\\[6pt]
$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$