I would like to have my section titles in bold and small caps, but they do not seem to work.
\documentclass[12pt,a4paper]{article}
\usepackage[
left = 2cm,
right = 2.5cm,
top = 1.5cm,
bottom = 2cm
]{geometry}
\usepackage{microtype}
\usepackage{titlesec}
\usepackage{fancyhdr}
\titleformat{\section}{\Large\sc\bfseries}{}{0cm}{}[\titlerule]
\titleformat{\subsection}[runin]{\bfseries\sc}{}{0cm}{}[ --]
\titleformat{\subsubsection}{\large\bfseries\sc}{}{0cm}{}
\renewcommand{\labelitemi}{--}
\newcommand{\tabitem}{\makebox[0pt][r]{--}}
%Manipulation of headers and footers
\pagestyle{fancy}
%Clear fields
\fancyhf{}
%Page numbering in footer
\fancyfoot[C]{\thepage}
%Separation line header and footer
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\headrulewidth}{0pt}
\begin{document}
\thispagestyle{fancy}
\begin{center}
\Huge \textbf{\textsc{Eating\hspace{0.5cm}Foods}}
\end{center}
\section{How to eat food}
Food is important
\subsection{Using hands}
Most versatile
\subsection{using chopsticks}
Requires practice
\subsection{using spoons}
Kind of a middle ground
\subsubsection{Types of spoons}
There are many types of spoons
\end{document}
Currently, all titles only come in bold font or small caps depending on their order of appearance in the \titleformat argument.
\scshapeinstead of\sc) which accounts for the ordering issue. See Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX?. But the problem simply is that most fonts don't contain a bold small caps series. If you check the log file you will see font substitution warnings. – Alan Munn Feb 23 '21 at 20:19