Ohm symbol not showing in math mode using custom beamer styling
It very much looks like the issue you've come across is a (bad) side-effect of using the polyglossia
package, which seems to have a few issues when used with the brazil
language option.
Unless you absolutely must use the polyglossia
package, an easy remedy consists of (a) getting rid of (or, at least, commenting out) the instructions
\usepackage{polyglossia}
\setdefaultlanguage{brazil}
and (b) running, in their place, the instruction
\usepackage[portuguese]{babel}
A separate comment/observation: I would also get rid of the siunitx
options math-micro=\text{µ}
and text-micro=µ
. For sure, when used in tandem with the babel
package, these options generate incorrect output when writing, say, \si{\micro\ohm}
.
\documentclass{beamer}
\mode<presentation>
{
\usetheme{JuanLesPins}
\usefonttheme{serif}
\usecolortheme{beaver}
\setbeamercovered{invisible} \setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[frame number]
\usecolortheme[RGB={122,4,24}]{structure}
}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
%\usepackage{polyglossia}
%\setdefaultlanguage{brazil}
\usepackage[portuguese]{babel}
\usepackage{siunitx}
\sisetup{per-mode=symbol,output-decimal-marker={,},exponent-product = \cdot}
\begin{document}
\begin{frame}{}
This works now: \SI{1}{\micro\ohm}
So does this: $\SI{1}{\micro\ohm}$
And this: $$ \SI{1}{\micro\ohm} $$
And this: \[ \SI{1}{\micro\ohm} \]
And this: \[ \text{\SI{1}{\micro\ohm}} \]
\end{frame}
\end{document}
Just remove \usepackage{lmodern}
and \usepackage[T1]{fontenc}
.
\documentclass[9pt]{beamer}
\mode<presentation>
{
\usetheme{JuanLesPins}
\usefonttheme{serif}
\usecolortheme{beaver}
\setbeamercovered{invisible} \setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[frame number]
\usecolortheme[RGB={122,4,24}]{structure}
}
\setcounter{tocdepth}{1}
\usepackage{polyglossia}
\setdefaultlanguage{brazil}
\usepackage{siunitx}
\sisetup{
per-mode=symbol,
output-decimal-marker={,},
math-micro=\text{µ},
text-micro=µ,
exponent-product = \cdot
}
\begin{document}
\begin{frame}{}
You can see that this doesn't work: \SI{1}{\ohm}
Nor does this: $ \SI{1}{\ohm} $
Or this: \[ \SI{1}{\ohm} \]
Or \[ \text{\SI{1}{\ohm}} \]
\end{frame}
\end{document}