1

I'd like to write a substantial math document with the tufte-book class, with a few minor changes. My first issue is that, after loading my preferred font of libertine, along with newtxmath to get its associated math fonts, I still get text in libertine and math in what looks like the default Palatino. I'm compiling with pdflatex. Here's the MWE:

\documentclass[nofont]{tufte-book}
\usepackage[T1]{fontenc}
\usepackage{amsthm}
\usepackage{newtxmath}
\usepackage{libertine}
\everymath{\displaystyle}


\begin{document}


We have 
\[
\frac{d}{dx}(\sin \theta)=\cos \theta,
\]
with libertine text but math in Palatino.  Another example is the summation formula
\[
\sum_{i=1}^\infty i^2=\frac{n(n+1)(2n+1)}{6}.
\]


\end{document}
2
  • 1
    unrelated but are you sure you want \everymath{\displaystyle} (it makes inline math more or less unusable) Mar 3, 2018 at 22:23
  • 1
    load newtxmath after libertine (since you want its math settings to win) Mar 3, 2018 at 22:25

1 Answer 1

1

You might consider using Khaled Hosny's fork of Linux Libertine called Libertinus which notably includes an OpenType math font based on Linux Libertine. Switch to XeLaTeX, then add the following to the preamble of your document:

\usepackage{fontspec}
\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}
\setmonofont{Libertinus Mono}

\usepackage{unicode-math}
\setmathfont{Libertinus Math}

With xelatex, the font encoding defaults to Unicocde (UTF-8), so you can drop the fontenc package as well as the libertine and newtxmath packages.

Here's the complete test document:

\documentclass[nofonts]{tufte-book}

\usepackage{amsthm}

\usepackage{fontspec}
\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}
\setmonofont{Libertinus Mono}

\usepackage{unicode-math}
\setmathfont{Libertinus Math}

\everymath{\displaystyle}

\begin{document}

We have
\[
\frac{d}{dx}(\sin \theta)=\cos \theta,
\]
with Libertinus Serif text and math in Libertinus Math.  Another example is the summation formula
\[
\sum_{i=1}^\infty i^2=\frac{n(n+1)(2n+1)}{6}.
\]
\end{document}

And the result:

Output of test document

You must log in to answer this question.

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