5

I use the OpenSans font and the light font style. For text is works, but not in math mode. I tried \setbeamerfont{math text}{series=\fontseries{l}}, but it does not change anything.

I would like to use the light font style also for math mode.

Here is my MWE:

\documentclass{beamer}

\usepackage[default, scale=0.95]{opensans}
\usepackage{siunitx}

\setbeamerfont{math text}{series=\fontseries{l}}    % does not change anything
\setbeamerfont{normal text}{series=\fontseries{l}}
\AtBeginDocument{\usebeamerfont{normal text}}

\begin{document}
    \begin{frame}{Some Math and Text}
        here is some text in OpenSans light \\
        but $math\,mode$ is not in light: \si{\micro\second}
    \end{frame}
\end{document}

enter image description here

7
  • If you are OK with changing the weight of all fonts, \renewcommand{\mddefault}{l} could maybe help Commented Jul 23, 2018 at 16:11
  • Are you sure that the font you are using has a light math version?
    – user121799
    Commented Jul 23, 2018 at 18:00
  • @samcarter this changed the mu to a light version, but not the other "normal" characters.
    – derptank
    Commented Jul 23, 2018 at 18:15
  • @marmot I am not sure, how do I tell? The font overview shows greek and other symbols, but be no means a complete set. However, I only need at most a few special symbols.
    – derptank
    Commented Jul 23, 2018 at 18:20
  • @derptank This is what I get with \renewcommand{\mddefault}{l}: i.sstatic.net/xnG8t.png Commented Jul 23, 2018 at 18:38

2 Answers 2

2
\documentclass[professionalfonts]{beamer}
\usepackage{kpfonts}
\usepackage[default, scale=0.95]{opensans}
\usepackage{siunitx}

\begin{document}
    \begin{frame}{Some Math and Text}
    here is some text in OpenSans light \\
    but $math\,mode$ is not in light: \si{\micro\second}
\end{frame}
\end{document}

enter image description here

1
  • 1
    This does not work for me (Win10, TexLive 2018). Everything is in normal style. If I add setbeamerfont and usebeamerfont again, it produces the same result as my MWE.
    – derptank
    Commented Jul 24, 2018 at 6:06
1

If you don't mind that everything is set in light weight:

\documentclass{beamer}

\usepackage[default, scale=0.95]{opensans}
\usepackage{siunitx}

\setbeamerfont{math text}{series=\fontseries{l}}    % does not change anything
\setbeamerfont{normal text}{series=\fontseries{l}}
\AtBeginDocument{\usebeamerfont{normal text}}


\renewcommand{\mddefault}{l}

\begin{document}
    \begin{frame}{Some Math and Text}
        here is some text in OpenSans light \\
        but $math\,mode$ is not in light: \si{\micro\second}
    \end{frame}
\end{document}

enter image description here

You must log in to answer this question.

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