summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/europasscv/europasscv-bibliography.sty
blob: 5736bede5b6324c5d29a1408d36f2f6057702254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
\ProvidesPackage{europasscv-bibliography}
  [Additional macros for bibliography support in europasscv]

\RequirePackage{biblatex-ext-tabular}
\RequirePackage{longtable}

\newrobustcmd*{\defecvbibtabulartwocolumn}[5]{%
  \long\csdef{extblxtab@env@#1}{#2}%
  \long\csdef{extblxtab@endenv@#1}{#3}%
  \long\csdef{extblxtab@tabrow@format@#1}{%
    \if@ecvdebug\cellcolor{yellow!25}\fi\anchorlang{#4} & \if@ecvdebug\cellcolor{blue!25}\fi \driver{#5}\\
  }%
}

\defecvbibtabulartwocolumn{bibtabular}
  {\setlength{\LTpre}{\medskipamount}%
   \setlength{\LTpost}{\medskipamount}%
   \renewcommand*{\arraystretch}{1.2}%
\begin{longtable}[t]{@{}R{\ecv@leftcolwidth}@{\hspace{\ecv@colsep}}p{\ecv@rightcolwidth}@{}}}%
  {\end{longtable}}
  {\selectecvfont\printtext[labelalphawidth]{%
        \printfield{labelprefix}%
        \printfield{labelalpha}%
        \printfield{extraalpha}}%
   \printtext[labelnumberwidth]{%
        \printfield{labelprefix}%
        \printfield{labelnumber}}}{\selectecvfont}

\newcommand*{\ecvbibhighlight}[3]{%
  \edef\lastname{#1}%
  \edef\firstname{#2}%
  \edef\firstinit{#3}}
\ecvbibhighlight{}{}{}

% Patch new definitions
\makeatletter
\renewcommand{\mkbibnamegiven}[1]{%
  \begingroup
    \def\bibnamedelima{ }%
    \def\bibnamedelimi{ }%
    \def~{ }%
    \edef\adn@tmp@lastname{\lastname}%
    \edef\adn@tmp@firstname{\firstname}%
    \edef\adn@tmp@firstinit{\firstinit}%
    \edef\adn@tmp@namepartfamily{\namepartfamily}%
    \edef\adn@tmp@namepartgiven{\namepartgiven}%
    \ifboolexpr{ ( test {\ifcsequal{adn@tmp@firstname}{adn@tmp@namepartgiven}} or test {\ifcsequal{adn@tmp@firstinit}{adn@tmp@namepartgiven}} ) and test {\ifcsequal{adn@tmp@lastname}{adn@tmp@namepartfamily}} }
    {\mkbibbold{#1}}
    {#1}%
  \endgroup
}
\makeatother

\renewcommand{\mkbibnamefamily}[1]{%
  \mkbibnamegiven{#1}
}

\endinput