summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/europasscv/europasscv-bibliography.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/europasscv/europasscv-bibliography.sty
Initial commit
Diffstat (limited to 'macros/latex/contrib/europasscv/europasscv-bibliography.sty')
-rw-r--r--macros/latex/contrib/europasscv/europasscv-bibliography.sty46
1 files changed, 46 insertions, 0 deletions
diff --git a/macros/latex/contrib/europasscv/europasscv-bibliography.sty b/macros/latex/contrib/europasscv/europasscv-bibliography.sty
new file mode 100644
index 0000000000..436be36408
--- /dev/null
+++ b/macros/latex/contrib/europasscv/europasscv-bibliography.sty
@@ -0,0 +1,46 @@
+\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]{%
+ \def\lastname{#1}%
+ \def\firstname{#2}%
+ \def\firstinit{#3}}
+\ecvbibhighlight{}{}{}
+
+% Patch new definitions
+\renewcommand{\mkbibnamegiven}[1]{%
+ \ifboolexpr{ ( test {\ifdefequal{\firstname}{\namepartgiven}} or test {\ifdefequal{\firstinit}{\namepartgiven}} ) and test {\ifdefequal{\lastname}{\namepartfamily}} }
+ {\mkbibbold{#1}}{#1}%
+}
+
+\renewcommand{\mkbibnamefamily}[1]{%
+ \ifboolexpr{ ( test {\ifdefequal{\firstname}{\namepartgiven}} or test {\ifdefequal{\firstinit}{\namepartgiven}} ) and test {\ifdefequal{\lastname}{\namepartfamily}} }
+ {\mkbibbold{#1}}{#1}%
+}
+
+\endinput