Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighting the author's publications in section 4 #47

Closed
nise opened this issue Mar 31, 2023 · 3 comments
Closed

Highlighting the author's publications in section 4 #47

nise opened this issue Mar 31, 2023 · 3 comments

Comments

@nise
Copy link

nise commented Mar 31, 2023

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 nise changed the title Highlighting the authors publication in section 4 Highlighting the author's publications in section 4 Mar 31, 2023
@ThiloKr
Copy link

ThiloKr commented Jun 20, 2023

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
Copy link

ThiloKr commented Jun 27, 2023

To also colorize the labels in the bibliography:

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

@hoelzer
Copy link
Owner

hoelzer commented May 15, 2024

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 hoelzer closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants