4

I am working on a long latex(Beamer) file. Till now like 700 line.

My details setting regarding font's are,

\usepackage[utf8x]{inputenc}
\usepackage{amsmath,bm}
\usepackage{textcomp}
\usepackage{bbm}
\usepackage{dsfont}
\usepackage[normalem]{ulem}
\usepackage{amssymb}
\usepackage{mathtools}
\usefonttheme{professionalfonts}

I don't know when or how, but now in the beamer, \textbf{} command has no effect on output.

I tried to comment down

\usefonttheme{professionalfonts}

My best guess was \usefonttheme{} function stops the \textbf{} function. but while commenting \usefonttheme{}, Latex stops to generate output except for the "table of content", I also don't know why this is happening.

UPD: Here is a sample slide,

\documentclass{beamer}
%
% Choose how your presentation looks.
%
% For more themes, color themes and font themes, see:
% http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html
%

\mode<presentation>

  \usetheme{Warsaw}      % or try Darmstadt, Madrid, Warsaw, ...\textbf{\(\(\(\)\)\)}}  

  \usecolortheme{default} % or try albatross, beaver, crane, ...
  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
\usepackage{ragged2e}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{hyperref}
\usepackage{amsmath,bm}
\usepackage{upgreek}
\usepackage{multicol}
\usepackage{textcomp}
\usepackage{bbm}



\usefonttheme{professionalfonts}



\usepackage{utopia} 
\usepackage[normalem]{ulem}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{mathtools}


\newenvironment{nscenter}
 {\parskip=0pt\par\nopagebreak\centering}
 {\par\noindent\ignorespacesafterend}


\title[Awesome slides]{Awesome Slides}
\author{maruf}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}


\begin{frame}
    \frametitle{Table of Contents}
    \begin{multicols}{2}
        \tableofcontents
    \end{multicols}
\end{frame}


\section{Introduction}

\subsection{code code code}
\subsubsection{code}
\begin{frame}
\frametitle{Hello World}    
The quick brown fox runs over the lazy dog \textbf{ABCDEFG}.
    \begin{itemize}
        \item \textbf{asdasd}
        \item aasdasd
    \end{itemize}
\end{frame}

\end{document}
  • 4
    Can you please add a full example of \textbf not working? Just one frame. – egreg Oct 6 '17 at 10:56
  • \textbf{} works fine with the few code fragments you show us. – user36296 Oct 6 '17 at 11:02
  • I have added a sample slide. Please take a look. – Maruf Oct 6 '17 at 11:44
  • Offtopic, but don't use \usepackage{hyperref} with beamer, it is already loaded. There is also no good reason for multicol, beamer has its own column environment. – user36296 Oct 6 '17 at 11:58
  • @samcarter About multicol, that behaves differently from beamer columns, you wont get a ToC distributed across two columns with the latter. – Torbjørn T. Oct 6 '17 at 12:58
7

Loading professionalfonts here does nothing at all, because \usepackage{utopia} only modifies \rmfamily, but you're still using sans serif for the presentation.

You get the warning

LaTeX Font Warning: Font shape `OT1/cmss/b/n' undefined
(Font)              using `OT1/cmss/m/n' instead on input line 73.

which should be almost self-explaining: there is no boldface in Computer Modern Sans Serif.

If you want to use Utopia for your presentation, you also have to choose \rmfamily for the text font, which can be done with \usefonttheme{serif}. And fourier instead of utopia as you seem to be using math.

I reordered parts of your input. Don't use utf8x, it's been unmantained for a few years and utf8 is instead actively developed.

\documentclass{beamer}
\usepackage[utf8]{inputenc}

\mode<presentation>

\usetheme{Warsaw}

\usecolortheme{default}
\usefonttheme{serif} % <----------- HERE
\usefonttheme{professionalfonts}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]


\usepackage{fourier}% <------------ not utopia 
\usepackage[normalem]{ulem}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{mathtools}

\usepackage{ragged2e}
\usepackage[english]{babel}
\usepackage{amsmath,bm}
\usepackage{upgreek}
\usepackage{multicol}
\usepackage{textcomp}
\usepackage{bbm}
\usepackage{hyperref}




\newenvironment{nscenter}
 {\parskip=0pt\par\nopagebreak\centering}
 {\par\noindent\ignorespacesafterend}


\title[Awesome slides]{Awesome Slides}
\author{maruf}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}


\begin{frame}
    \frametitle{Table of Contents}
    \begin{multicols}{2}
        \tableofcontents
    \end{multicols}
\end{frame}


\section{Introduction}

\subsection{code code code}
\subsubsection{code}
\begin{frame}
\frametitle{Hello World}    
The quick brown fox runs over the lazy dog \textbf{ABCDEFG}.
    \begin{itemize}
        \item \textbf{asdasd}
        \item aasdasd
    \end{itemize}
\end{frame}

\end{document}

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.