I know that you can highlight text inside a section like this : \section{\hl{text}}.
But in my case, I have text in italic inside my section, and it won't work.
Here's the code I tried : \subsubsection*{\hl{Author, \textit{Book} (date)}}. enter code here
Any idea?
Here's my entire code :
% Template
%Format
\documentclass[10pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[a4paper,portrait,hmargin=1.5cm,vmargin={2.5cm,2.1cm},headheight=12.5pt]{geometry}
\usepackage[french]{babel}
%Chapitres, sections...
\renewcommand{\chaptername}{Chapitre}
\renewcommand{\partname}{Partie}
\renewcommand{\thesection}{\Roman{section}} % \arabic{} ou \Alph{} ou \Roman{}
\renewcommand{\thesubsection}{\Alph{subsection}}
\begin{document}
\part{Europe}
\part{Latine America}
\section{Identity and Culture}
\subsubsection{Author, \textit{Book's title} (1981)} %this one works
\subsection{\hl{author, \textit{Book's title} (1981)}} %this one won't
some text
\end{document}

\documentclassand ending with\end{document}? It is difficult to help with limited information, help us help you (: – JamesT Feb 10 '23 at 10:16\subsubsection*Author, \textit{Book's title} (1981)}is missing an opening{after*– JamesT Feb 10 '23 at 10:23soulpackage that defines the\hlmacro, so you should add this to your MWE. But having added this package, your code compiles just fine. Maybe you need to explain better what you want to achieve. At least, I don't think that there should be a problem with using italics. – Jasper Habicht Feb 10 '23 at 11:47