Would like to preface this by saying that I am fairly new to Latex. My query is that I would like to change the font for my chapter, section and subsection headings to raleway while keeping the font for the entire document to be EBGaramond. I am adding the code for the same below
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{raleway}
\usepackage{ebgaramond}
\usepackage{titlesec}
\titleformat{\chapter}
[display]
{\Huge\bfseries\raleway}
{\huge\chaptertitlename\space\thechapter}
{20pt}
{}
\titleformat*{\section}{\normalfont\Large\bfseries\raleway}
\titleformat*{\subsection}{\normalfont\large\bfseries\raleway}
\usepackage{blindtext}% dummy text
\begin{document}
\tableofcontents
\blinddocument
\end{document}
With this code, everything is typesetted to EBGaramond. How do I fix this?
I am using pdflatex compiler in overleaf, if that is useful information.
raleway
does not work withpdflatex
. Try it withxelatex
orlualatex
.