I want my
- Chapter names, section/subsection/… and other similar titles to be in
gfsneohellenic
- Main text to be in
libertine
andlibertinust1math
. - The captions of figures and tables will be some sans serif font as well, which I have not decided yet.
Using either
%\usepackage[default]{gfsneohellenic}
%\usepackage[LGR,T1]{fontenc}
OR
\usepackage[LGR, T1]{fontenc}
\usepackage{libertine}
\usepackage{libertinust1math}
\usepackage{titlesec}
sets the whole document to be in the respective fonts.
I am not being able to set the fonts specifically in titlesec
, i.e. I am not being able to understand how to pass the specific fonts as parameters in the following –
\titleformat*{\section}{\Large\sffamily}
\titleformat*{\subsection}{\large\sffamily}
\titleformat*{\subsubsection}{\medium}
PS – I am using Overleaf.
Best Answer
When you use the
default
option withgfsneohellenic
it sets both\rmdefault
and\sfdefault
togfsneohellenic
. If you leave out that option, you have finer control:The particular fontname
neohellenic
is learned fromgfsneohellenic.sty
. Result:Note that I have changed your definition for
\subsubsection
, since there is no\medium
command in LaTeX.