Skip to content

Commit

Permalink
Update main_cv.tex
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiruiluo authored Dec 7, 2023
1 parent 5e40299 commit 539b3f3
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions main_cv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,26 @@
\addbibresource[]{biblio.bib}

% bold the name of specific author
\newcommand{\makeauthorbold}[1]{%
\usepackage{xstring}
\usepackage{etoolbox}
\newboolean{bold}
\newcommand{\makeauthorsbold}[1]{%
\DeclareNameFormat{author}{%
\setboolean{bold}{false}%
\renewcommand{\do}[1]{\expandafter\ifstrequal\expandafter{\namepartfamily}{####1}{\setboolean{bold}{true}}{}}%
\docsvlist{#1}%
\ifthenelse{\value{listcount}=1}
{%
{\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\mkbibbold{\namepartfamily\addcomma\addspace \namepartgiveni}}{\namepartfamily\addcomma\addspace \namepartgiveni}}
%
{\expandafter\ifthenelse{\boolean{bold}}{\mkbibbold{\namepartfamily\addcomma\addspace \namepartgiveni}}{\namepartfamily\addcomma\addspace \namepartgiveni}}%
}{\ifnumless{\value{listcount}}{\value{liststop}}
{\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}
{\expandafter\ifstrequal\expandafter{\namepartfamily}{#1}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}%
{\expandafter\ifthenelse{\boolean{bold}}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}%
{\expandafter\ifthenelse{\boolean{bold}}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}%
}
\ifthenelse{\value{listcount}<\value{liststop}}
{\addcomma\space}{}
}
}
\makeauthorsbold{Zhirui,Luo}
\makeauthorsbold{Luo, Zhirui}

% what is your name?
\newcommand{\myname}{Zhirui Luo}
Expand Down

0 comments on commit 539b3f3

Please sign in to comment.