# 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:

\documentclass{scrartcl}
\begin{document}
\tableofcontents

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}

\end{document}


\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.

• you should always isolate font changes in headings, like {\itshape bar}, otherwise there can be repercussions in derivative uses, like tables of contents. see the example in the answer by @MarcoDaniel. – barbara beeton Apr 20 '12 at 15:56
• For the future, please add the necessary information: if you compile your example as is, it shows bold italic in the titles, so the problem depends on something else you do in your document. – egreg Apr 22 '12 at 9:43

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

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