Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set bibliography text colour in beamercolor.sty file

I have made a beamer theme for my work presentations that adheres to my company's profile, however I am unable to find the code to set the colour of the bibliography text (or normal unbulleted text for that matter).

This means that the bibliography is shown as white text on the white slide. The text is there, but just in white. The same thing happens with unbulletted text on the slides.

(Additional info: I write the presentation in org-mode and compile it to a beamer pdf.)

The colour theme sty file looks like this:

\mode<presentation>

\definecolor{myblue}{RGB}{32,66,135}
\definecolor{mmconcept}{RGB}{32,66,135}
\definecolor{mmt1}{RGB}{87.75,113.25,165}
\definecolor{mmt2}{RGB}{143.5,160.5,195}

% Settings
\setbeamercolor*{title page header}{fg=myblue}
\setbeamercolor*{author}{fg=myblue}
\setbeamercolor*{date}{fg=myblue}
\setbeamercolor{item}{fg=myblue}
\setbeamercolor{frametitle}{fg=myblue}
\setbeamercolor{block title}{bg=myblue}
\setbeamercolor{block title}{fg=white}
\setbeamercolor{normal text}{fg=black}
\setbeamercolor{palette primary}{fg=myblue}
\setbeamercolor{palette secondary}{fg=myblue}
\setbeamercolor{palette tertiary}{fg=myblue}
\setbeamercolor{palette quaternary}{fg=myblue}

\mode
<all>

I have tried various settings but not seem to work.

I can change the normal text colour to a different colour by putting a latex colour tag into the slide but this doesn't work with the bibliography and I want the theme to sort this.

like image 428
Hantabaru Avatar asked Jan 21 '26 10:01

Hantabaru


1 Answers

The colours of the bibliography are controlled by

\setbeamercolor{bibliography item}{fg=green}
\setbeamercolor{bibliography entry author}{fg=red}
\setbeamercolor{bibliography entry title}{fg=blue}
\setbeamercolor{bibliography entry location}{fg=orange}
\setbeamercolor{bibliography entry note}{fg=teal}

MWE:

\documentclass{beamer}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{knuth,
  author       = {Knuth, Donald E.},
  title        = {The {\TeX} book},
  date         = 1984,
  maintitle    = {Computers \& Typesetting},
  volume       = {A},
  publisher    = {Addison-Wesley},
  location     = {Reading, Mass.},
  langid       = {english},
  langidopts   = {variant=american},
  sortyear     = {1984-1},
  sorttitle    = {Computers & Typesetting A},
  indexsorttitle= {The TeXbook},
  indextitle   = {\protect\TeX book, The},
  shorttitle   = {\TeX book}
}

@article{einstein,
    author = {Einstein, A.},
    title = {Die Grundlage der allgemeinen Relativitätstheorie},
    journal = {Annalen der Physik},
    volume = {354},
    number = {7},
    doi = {10.1002/andp.19163540702},
    pages = {769--822},
    year = {1916}
}
\end{filecontents*}

\mode<presentation>

\definecolor{myblue}{RGB}{32,66,135}
\definecolor{mmconcept}{RGB}{32,66,135}
\definecolor{mmt1}{RGB}{87.75,113.25,165}
\definecolor{mmt2}{RGB}{143.5,160.5,195}

% Settings
\setbeamercolor*{title page header}{fg=myblue}
\setbeamercolor*{author}{fg=myblue}
\setbeamercolor*{date}{fg=myblue}
\setbeamercolor{item}{fg=myblue}
\setbeamercolor{frametitle}{fg=myblue}
\setbeamercolor{block title}{bg=myblue}
\setbeamercolor{block title}{fg=white}
\setbeamercolor{normal text}{fg=black}
\setbeamercolor{palette primary}{fg=myblue}
\setbeamercolor{palette secondary}{fg=myblue}
\setbeamercolor{palette tertiary}{fg=myblue}
\setbeamercolor{palette quaternary}{fg=myblue}


\setbeamercolor{bibliography item}{fg=green}
\setbeamercolor{bibliography entry author}{fg=red}
\setbeamercolor{bibliography entry title}{fg=blue}
\setbeamercolor{bibliography entry location}{fg=orange}
\setbeamercolor{bibliography entry note}{fg=teal}

\mode
<all>


\begin{document}

\begin{frame}
    \nocite{knuth}
    \bibliographystyle{plain}
    \bibliography{\jobname}
\end{frame} 

\end{document}
like image 139
samcarter_is_at_topanswers.xyz Avatar answered Jan 24 '26 12:01

samcarter_is_at_topanswers.xyz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!