[Tex/LaTex] Italic in some words of the title


I want to use a title with a foreign word, which should be in italic. I use KOMA-script.

I tried this:


The text.

\section{Foo \textit{bar}}
\section{Foo \itshape bar}
\section{Foo \normalfont \bfseries \itshape bar}
\subsection{Foo \textit{bar}}
\subsection{Foo \itshape bar}
\subsection{Foo \normalfont \bfseries \itshape bar}


\textit does not work, neither does \itshape (why?)

\normalfont\itshape almost work, but it removes the bold in the title.

\normalfont\bfseries\itshape works, but not in the table of contents where it adds bold…

So, how can I do it?

Edit: As Marco Daniel pointed out, the problem was that the font I used (Biolinum) did not have a bold italic shape. Telling fontspec to use a different font for the bolditalic solved the issue.

Best Answer

In your log file you will find warnings like

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

This means you don't use a font which has such a combination. See: Warning: “Font shape … not available”

Load \usepackage[T1]{fontenc} and you will get: