5

I am trying to format a text so that it is bold and italic at the same time. I am doing this by nesting the \textbf and \textit commands, what should be no problem according to "Correct" way to bold/italicize text?. However, in the resulting pdf the text appears just bold.

\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{a4wide}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage[font=small]{caption}
\usepackage{multicol}
\usepackage{etoolbox}
\usepackage{url}
\usepackage{enumitem}

\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\patchcmd{\quote}{\rightmargin}{\leftmargin 1em \rightmargin}{}{}

\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\baselinestretch}{1.0}

\begin{document}
\begin{multicols}{2}

\textbf{
\textit{Keywords}\textemdash Service oriented Architecture, Service, Component, Functional Safety
}

\end{multicols}{2}
\end{document}

enter image description here

I don't whether this is of relevance, but this code is inside a multicolumn environment.

  • 1
    Full minimal example please. We'd like to know your preamble. Also is there any warnings in your log file? Might be that the sans serif font you are using does not provide a bold italic version. – daleif May 28 '15 at 12:40
  • not related to the question, but this would look much nicer ratted right. – barbara beeton May 28 '15 at 14:36
13

LaTeX warns to the terminal and log file

LaTeX Font Warning: Font shape `OT1/cmss/bx/it' undefined
(Font)              using `OT1/cmss/bx/n' instead on input line 24.

which says that the computer modern fonts don't have sans serif bold italic, so it is going to use sans serif bold normal shape instead.

Adding (for example)

\usepackage{lmodern}

selects a similar but different font set that does have this shape.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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