2

Here's a MWE:

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{lucidabr}
\usefonttheme{professionalfonts}
%\usefonttheme[stillsansseriftext,stillsansserifsmall,stillsansseriflarge,stillsansserifmath]{serif}

\begin{document} \begin{frame}{Test} 123 and $123$ and $$123$$ \end{frame} \end{document}

123 and $123$ look different because one is sans serif and the other is not. I want them to look the same. I can achieve this using the line which is currently commented out, but it seems a bit silly to use the serif font theme only to switch it off again via a long list of options. Is there a simpler, more canonical way to make both 123 and $123$ sans serif?

(Also, do I understand the Beamer documentation correctly in that I don't have to use the professionalfonts theme with lucidabr?)

Frunobulax
  • 2,218

1 Answers1

1

I searched a bit more and found this from which I extracted the following solution which seems to work for me:

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{lucidabr}
% \renewcommand{\rmdefault}{\sfdefault}   % <-- see edit below

\begin{document} \begin{frame}{Test} 123 and $123$ and $$123$$ \end{frame} \end{document}

Of course, I don't know enough about the internals to know if this is a good idea.

EDIT: I was mistaken. The important bit is not the line I marked above but that I didn't use the professionalfonts option. As I said in one of the comments, this seems to be OK from how I understand the Beamer docs.

Frunobulax
  • 2,218
  • Unless beamer treats lucidabr as a special case, this would get you the text letters in math mode, but not Lucida Bright math symbols. – Davislor Sep 24 '20 at 10:21