Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
2  
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
1  
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
add comment

1 Answer

up vote 8 down vote accepted

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:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.