1

I'm using the beamerarticle package and I would like to change the colour of the text that I give as the frame title. In the MEW below,

\documentclass[17pt]{article}

\usepackage{beamerarticle}

\setbeamercolor{frametitle}{fg=red}

\begin{document}

\section{S1}
\begin{frame}
\frametitle{ABC}
    a
\end{frame}

\end{document}

I would like the ABC to be printed in red. However, even after inserting the setbeamercolor command, it's still coming in black. I would appreciate help in resolving this.

EDIT: Yes, one option is that I manually use the color package in each title, but I would like to automate this so that with one command in one place, the color of each frame title can be changed, and I need not insert the color package command in each frametitle command I use.

3
  • Maybe tex.stackexchange.com/questions/22768/… ?
    – L. F.
    Mar 20, 2019 at 8:25
  • Firstly, the color package is not used. with one command in one place, the color of each frame title can be changed - this is confusing. You need to tell the system which color to use for the frame title, right? In that case even to the new command, you need to pass the required color. If all frame titles are to be in red, that can be automated. Kindly clarify Mar 20, 2019 at 8:31
  • Yes I want all frame titles to be in red. Mar 20, 2019 at 8:35

2 Answers 2

2

Another approach could be to modify the beamer template for the frametitle:

\documentclass[17pt]{article}

\usepackage{beamerarticle}

\mode<article>{
\setbeamertemplate{frametitle}{\paragraph*{\color{red}\insertframetitle}\ \par\noindent\emph{\insertframesubtitle}\par}
}
\begin{document}

\section{S1}
\begin{frame}
\frametitle{ABC}
    a
\end{frame}

\end{document}
3
  • Thank you. Could you add to your answer an explanation on how your command works also? That way I can modify it further. Mar 24, 2019 at 7:23
  • @AnantJoshi The command is copied from beamerbasearticle.sty, I just added the \color{red} command Mar 24, 2019 at 12:43
  • Ok, thank you very much. Apr 1, 2019 at 10:37
2

You can use the command \textcolor{<required color>}{text}.

Code:

\documentclass[17pt]{article}

\usepackage{beamerarticle}

\begin{document}

\section{S1}
\begin{frame}
\frametitle{\textcolor{red}{ABC}}
    a
\end{frame}

\end{document} 

enter image description here

To automate the process, to ensure all frame titles are in red, you can do the following:

\documentclass[17pt]{article}

\usepackage{beamerarticle}

\newcommand{\myframetitle}[1]{\frametitle{\textcolor{red}{#1}}}

\begin{document}

\section{S1}
\begin{frame}
\myframetitle{ABC} 
    a
\end{frame}

\end{document}

You can define a new command \myframetitle in this case to meet your requirement.

5
  • Thank you for your answer. I would like to automate this process though. Mar 20, 2019 at 8:17
  • @subhamsoni Technically it is right, but isn't there really a better way? ;-)
    – L. F.
    Mar 20, 2019 at 8:18
  • @AnantJoshi what do you mean by automate the process. You mean a new command? Mar 20, 2019 at 8:20
  • Yes I have edited the question suitably. Mar 20, 2019 at 8:24
  • @AnantJoshi I have updated my answer. Mar 20, 2019 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.