Im trying to alter the colors on my section, subsection and subsubsection.
I do so using the titlesec page:
\titleformat*{\section}{\Large\bfseries\sffamily\color{red}}
\titleformat*{\subsection}{\large\bfseries\sffamily\color{red}}
But the problem is i have to enter the font and font size also. I am using the fontenc package:
\usepackage[T1]{fontenc}
But i cant seem to find out what font and size is being used for the section, subsection and subsubsection.
These 2 values i mean: \Large\bfseries\sffamily
I tried to look in the .sty but that wasent very helpful.
Best Answer
The second argument of the
\titleformat*{\<name>}{<code>}
is stored in a macro called\ttlf@<name>
which (default) definition can be printed to the command line with\show\ttlf@<name>
, after a\makeatletter
of course.Therefore the correct settings for the requested title formats are:
Just for completeness here also the settings for
\paragraph
and\subparagraph
: