So, I'm using a custom beamer styling required by my employer, and while trying to typeset some problem examples with the "ohm" symbol, I've noticed it doesn't always work.
At first, I noticed it didn't appear at all, using the following code:
\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{lmodern}
\usepackage[T1]{fontenc}
\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}
\titlepage
\end{frame}
\section*{Sumário}
\begin{frame}{Sumário}
\tableofcontents
\end{frame}
\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 this: \[ \SI{1}{\ohm} \]
Or \[ \text{\SI{1}{\ohm}} \]
\end{frame}
\end{document}
After adding detect-all=true
to the \sisetup
command I managed to get the \SI
macros in text-mode to work, but none of the math ones, like so.
I noticed that if I remove the \usefonttheme{serif}
line from the styling definition (idk how to call it, sorry), everything works as usual.
I thought of redefining the Omega characters used by the siunitx package, but to no avail.
\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A}
\DeclareMathSymbol{\varOmega}{\mathalpha}{operators}{"0A}
Also tried to change the font used by the package (math-rm=\mathrm, text-rm=\rmfamily
in \sisetup
), and to make it insensitive to outside family font (detect-family=false
in \sisetup
). All without any clear result.
polyglossia
package? Things seem to work just fine if I replace\usepackage{polyglossia}\setdefaultlanguage{brazil}
with\usepackage[brazil]{babel}
, under both XeLaTeX and LuaLaTeX.