1

I tried to prepare slides in Linux Biolinum O, but I do not like the maths fonts, and I wanted to use TeX Gyre Pagella, for the maths environments. I tried the following source, which obviously doesn't work.

\documentclass[10pt,fleqn,xcolor=svgnames]{beamer}

\usetheme{Rochester}
\usecolortheme{spruce}
\usefonttheme{serif}

%--- Fonts
\usepackage{mathspec}
\setmathfont(Digits,Latin){TeX Gyre Pagella}
\setmainfont[Ligatures=TeX]{Linux Biolinum O}

%--- Language
\usepackage{polyglossia}
  \setmainlanguage[variant=uk]{english}

\begin{document}
\begin{frame}
\frametitle{Starter}

Bla bla bla

\[
\sin x + \cos x = abc
\]
\end{frame}

\end{document}

Can you tell me what how I can have a Palatino-like font for maths, with Linux Biolinum O text?

Cheers

Andrea

2
  • Use unicode-math instead of mathspec; the aim of the latter is to have the same font for math and text. – egreg Jan 13 '18 at 20:29
  • Hi, thanks for the suggestion. However, even if I use [unicode-math] instead, the x's are in Linux Biolinum O. – Logos Jan 13 '18 at 20:40
2

You want to use unicode-math rather than mathspec; you also need the professionalfonts theme.

\documentclass[10pt,fleqn,xcolor=svgnames]{beamer}
\usepackage[no-math]{fontspec}
\usepackage{unicode-math}
\usepackage{polyglossia}

\usetheme{Rochester}
\usecolortheme{spruce}
\usefonttheme{serif,professionalfonts}

\setmainfont{Linux Biolinum O}
\setmathfont{TeX Gyre Pagella Math}

\setmainlanguage[variant=uk]{english}

\begin{document}
\begin{frame}
\frametitle{Starter}

Bla bla bla

\[
\sin x + \cos x = abc
\]
\end{frame}

\end{document}

enter image description here

If you also want “sin” and “cos” in Pagella, add also

\setmathrm{TeX Gyre Pagella}

after the \setmathfont line.

enter image description here

0

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.