How to write bold, italic and sans-serif at the same time?
Your issue is "font-dependent".
Background
Indeed, special shapes of a font (bold, italic, slanted, small caps) are not defined relatively to a main font (its regular shape), but independently. The "bold version" of a font is defined per se (it is an independent *otf
, *.ttf
-file you can install and use, even if you don't have the main/regular version), and not as an homothetic transformation of the main font.
This is why we often refer to a font-family, that is the different shapes of a font (i.e. regular ("main font"), bold, italic, slanted, bold+italic, bold+slanted, small-caps, etc. versions). Some font-families have a lot of versions/shapes (e.g. not only bold, but also semi-bold), some others only one (there is no bold nor italic versions).
To be complete, a font-family has only shapes variations. Yet neither serif, nor sans-serif are shapes - they are characteristic of a font-family. A font-family is thus either serif, or sans-serif (or mono-spaced, etc.). Over font-families, there are thus font-harmonies, that are a selection of one serif font-family, one sans-serif font family, one mono-spaced ("typewriter") font-family, etc. that goes well the one with the other.
Answer
So the output produce depends on the font-family (thus the font-harmony) used by LaTeX
during the compilation: if the bold+{italic/slanted}
version of the sans-serif font-family is not installed on your computer (often because it doesn't exist), you cannot achieve what you want.
By default, LaTeX
uses the Computer Modern
font-harmony. Its sans-serif font-family doesn't have a bold + {italic/slanted}
shape version. So you cannot get what you want.
\documentclass{article}
\begin{document}
Some normal text.
\textsf{\textbf{Blah blah \emph{P. aeruginosa}}}
Some normal text.
\textsf{\textbf{Blah blah \textit{P. aeruginosa}}}
Some normal text.
\textsf{\textbf{Blah blah \textsl{P. aeruginosa}}}
\end{document}
However, when you load e.g. the lmodern
-package, you tell LaTeX
to use the Latin Modern
font-harmony. Since its sans-serif font-family has a bold+italic
and a bold+slanted
version, it can produce the output you want.
\documentclass{article}
\usepackage{lmodern}
\begin{document}
Some normal text.
\textsf{\textbf{Blah blah \emph{P. aeruginosa}}}
Some normal text.
\textsf{\textbf{Blah blah \textit{P. aeruginosa}}}
Some normal text.
\textsf{\textbf{Blah blah \textsl{P. aeruginosa}}}
\end{document}
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\begin{document}
\textsf{Bla bla \textit{P. aeruginosa}} \par
\textbf{\textsf{Bla bla \textit{P. aeruginosa}}}
\end{document}
In a nutshell: \textsf
and \textbf
and \textit
(and virtually as many others as you wish) can be nested without problem.
The issue here is in the font file. It should provide the adequate style for all the combined shapes that you want. That is not always the case (especially with cheap fonts or badly designed fonts that one finds on the net).
In general, you had better use well-designed, standard, common, classic fonts (Computer Modern, Times, Helvetica, Baskerville, Garamond...) over some rare and unknown fonts that might look fancy, but could lack such precious features as BoldItalic or many others.