I successfully changed a color of sections and subsections to my defined one. However I'd like to change the \title
with the same way, but \titlefont{•}
doesn't work (and I guess it's not supposed to). What is the simple way to change the \title
color as well? I have the simplified following code:
\documentclass[11pt,a4paper]{article}
\usepackage{amsmath, url}
\usepackage[utf8x]{inputenc}
\usepackage[czech]{babel}
\usepackage{xcolor}
\usepackage{sectsty}
\definecolor{astral}{RGB}{46,116,181}
\subsectionfont{\color{astral}}
\sectionfont{\color{astral}}
\title{...}
\author{...}
\begin{document}
\maketitle
\begin{abstract} ...
\end{abstract}
\smallskip
\noindent \textbf{Key words:} ...
\section{...}
\end{document}
Every help and its description is highly welcome.
Best Answer
Insert the colour directly in the
\title
:The above suggestion may seem crude. It is, however, inserted as a part of a one-time usage macro
\title
, and therefore sufficient for the means. For a more formalized approach, you could patch the inner\@maketitle
macro - responsible for setting up the title display:The above code provides
\titlecolor{<color>}
which allows you to switch to colour as needed (for example,\titlecolor{astral}
would provide the same output). This code is also dependent on the structure of\@maketitle
, which may be different for other classes or influenced by certain packages.Another (less formal) way of address a title colour change could be to only update the way
\title
handles its argument: