1

I am using metropolis theme in beamer but I want to italicize particular words in the title. What I have below doesn't produce the right result. {\protect\textit{special italicized words}} doesn't make a difference. Edit: ideally, I would want the italicized text to remind boldface.

\documentclass[10pt]{beamer}

\setbeamercovered{highly dynamic}


\usetheme[progressbar=frametitle]{metropolis}
\usepackage{appendixnumberbeamer}
\setbeamercolor{alerted text}{bg=red} 
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\usepackage{pifont}



\title{Title \emph{special italicized words}}

\date{}
\author{Author Author}
\institute{Institute}

\begin{document}

    \maketitle

\end{document}

2 Answers 2

2

You can use \textnormal:

\title{Title \textnormal{\emph{special italicized words}}}

enter image description here

Regarding bold italics: the font uses OT1 encoding for some reason. In this encoding the font does not have bold+italic shapes. You can switch to T1 encoding using \usepackage[T1]{fontenc}.

An alternative is to use PDF specials to fake bold for italic text (see Fake bold in LuaLaTeX, also for pdflatex). This does not need T1 encoding. The MWE below shows both options.

\documentclass[10pt]{beamer}
\usepackage[T1]{fontenc}
\setbeamercovered{highly dynamic}

\usetheme[progressbar=frametitle]{metropolis}
\usepackage{appendixnumberbeamer}
\setbeamercolor{alerted text}{bg=red} 
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\usepackage{pifont}
\newcommand{\fakebold}[1]{%
    \pdfliteral direct {2 Tr 0.5 w}%the second factor is the boldness 
     #1%
    \pdfliteral direct {0 Tr 0 w}%
}

\title{Title \textnormal{\fakebold{\emph{special italicized words}}}}
% alternative:
% \title{Title \textnormal{\textbf{\emph{special italicized words}}}}

\date{}
\author{\textbf{\textit{Author Author}}}
\institute{Institute}

\begin{document}

    \maketitle
    
\end{document}

enter image description here

4
  • Ideally, I'd also want the text to remain boldface (while italicized). But \textbf won't work here.
    – bozidarka
    Commented Apr 22, 2021 at 18:59
  • 1
    @bozidarka see edit.
    – Marijn
    Commented Apr 22, 2021 at 19:25
  • One could write \title{Title \itshape special italicized words} instead of \title{Title \textnormal{\fakebold{\emph{special italicized words}}}}.
    – Mico
    Commented Nov 17, 2021 at 5:27
  • @Mico in OT1 encoding \itshape does not work for bold in this font, there fakebold is a solution. Using T1 you can indeed use \itshape or \textit as I used in the author line below.
    – Marijn
    Commented Nov 17, 2021 at 9:03
0

I would recommend compiling your Beamer presentations in LuaLaTeX and adding the line

\usepackage{fontspec}

or

\usepackage{unicode-math}

That loads the modern fonts in the same format you use on your desktop, and cuts the Gordian knot of a lot of technical debt to the ’80s. The one compelling reason to keep using 8-bit font encodings, that some publishers still require you to, does not apply to a Beamer presentation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .