dfg icon indicating copy to clipboard operation
dfg copied to clipboard

Highlighting the author's publications in section 4

Open nise opened this issue 1 year ago • 2 comments

In the current template DFG states in the section "Project- and subject-related list of publications" to highlight the author's publications. Also highlighting is not a must the DFG strongly recommends doing so. Here is a short solution that can be added to the Header.tex:

%% Highlight entries
\usepackage[svgnames]{xcolor}
\DeclareBibliographyCategory{important}
\colorlet{impentry}{Maroon}% let 'impentry' = Maroon
\AtEveryBibitem{%
  \ifcategory{important}%
    {\bfseries\color{impentry}}%
    {}%
  }
\addtocategory{important}{%
Smith2023a,Smith2023b,Smith2023c,Smith2023d,MIller1900, % don't miss the comma after the last entry
}

nise avatar Mar 31 '23 06:03 nise

If you also want to highlight the citation keys in the text and the URLs/DOIs, you can use the following:

\AtEveryBibitem{%
  \ifcategory{important}%
    {\hypersetup{urlcolor=impentry}\bfseries\color{impentry}}%
    {}%
  }
\AtEveryCitekey{%
  \ifcategory{important}%
    {\hypersetup{citecolor=impentry}\bfseries\color{impentry}}%
    {}%
  }

ThiloKr avatar Jun 20 '23 09:06 ThiloKr

To also colorize the labels in the bibliography:

\AtBeginBibliography{%
  \DeclareFieldFormat{labelnumberwidth}{%
  \ifcategory{important}%
    {\color{impentry}\mkbibbrackets{#1}}%
    {\mkbibbrackets{#1}}%
  }}

ThiloKr avatar Jun 27 '23 09:06 ThiloKr

Thanks for the suggestions and PRs! That's awesome and sorry coming back to that so late @ThiloKr @nise

I am merging that now. And I also tried @ThiloKr last suggestion but added a \bfseries to make the labels in the bibliography also bold:

https://github.com/hoelzer/dfg/blob/master/proposal.sty#L91

hoelzer avatar May 15 '24 07:05 hoelzer