7

I'm trying to get the erewhon font to work, but I miss some specific mathfrak fonts when using it. For example, \mathfrak{h} only displays a regular h instead, while \mathfrak{g} works. The example below is how I have my document:

\documentclass{article}
\usepackage[proportional,scaled=1.064]{erewhon}
\usepackage[erewhon,vvarbb,bigdelims]{newtxmath}
\usepackage[T1]{fontenc}
\renewcommand*\oldstylenums[1]{\textosf{#1}}

\begin{document}

\(\mathfrak{g}\) \(\mathfrak{h}\)

\end{document}

Where the options passed to both erewhon and nextxmath are just as in the snippet here.

I'm using LuaTeX to have all fonts compiled as Erewhon, since PDFTeX apparently has problems with that. All the AMS packages (amsfonts, amsmath and amssymb) actually do nothing in this case. So, what am I missing?

2
  • 4
    you almost certainly don't want \usepackage[T1]{fontenc} with luatex (as that specifies legacy 8 bit encodings disabling all the unicode support) (it doesn't affect math, as used in this example) Commented Mar 22 at 16:47
  • The bug has been fixed and the corrected version has hit the TeX Live repositories, see updated answer.
    – egreg
    Commented Mar 24 at 14:06

3 Answers 3

6

An alternative for LuaLaTeX and XeLaTeX is using the OpenType Erewhon-Math.otf font. The recommended way to load this font is through the package fourier-otf, which sets some suitable options.

\documentclass{article}
\usepackage{fourier-otf}

\begin{document}

\(\mathfrak{g}\) \(\mathfrak{h}\)

\end{document}

Result:

enter image description here

2
  • I have never not used PDFLaTeX before, only now when I've tried different fonts, so I really don't know much about the other engines. Is it possible to do something like that with PDFLaTeX?
    – kindaichi
    Commented Mar 22 at 17:21
  • 1
    @kindaichi Indeed to use OTF or TTF fonts (like the font Erewhon-Math.otf that is used in this answer) you need LuaLaTeX or XeLaTeX, it is not possible to load such fonts with pdfLaTeX. There are a lot of fonts available for pdfLaTeX through packages such as newtx, but these fonts have been converted to the specific format that pdfLaTeX understands, which is a very complicated process. Sometimes such fonts for pdfLaTeX are incomplete (i.e., are missing some letters/symbols in some font variants like Fraktur) and there is not much that you can do about that.
    – Marijn
    Commented Mar 22 at 17:28
9

Updated answer

The bug in the fonts has been fixed with version 1.121.

\documentclass{article}
\usepackage[proportional,scaled=1.064]{erewhon}
\usepackage[erewhon,vvarbb,bigdelims]{newtxmath}
\renewcommand*\oldstylenums[1]{\textosf{#1}}

\begin{document}

\(\mathfrak{g}+\mathfrak{h}\)

\end{document}

enter image description here

Original answer

It's a bug in the font zutmia, which LaTeX is supposed to take Fraktur math letters from.

This is the relevant part from the font table

enter image description here

where you see that the “h” is completely out of place.

How to fix the issue? You can take the Fraktur letter from a different font. Here's how to use the AMS ones.

\documentclass{article}
\usepackage[proportional,scaled=1.064]{erewhon}
\usepackage[erewhon,vvarbb,bigdelims]{newtxmath}
\renewcommand*\oldstylenums[1]{\textosf{#1}}

\DeclareMathAlphabet{\mathfrak}{U}{euf}{m}{n}
\SetMathAlphabet{\mathfrak}{bold}{U}{euf}{b}{n}

\begin{document}

\(\mathfrak{g}+\mathfrak{h}\)

\end{document}

enter image description here

1
  • 3
    I filed a bug report to the font maintainer.
    – egreg
    Commented Mar 22 at 18:40
2

Another solution.

\documentclass{article}
\usepackage[proportional,scaled=1.064]{erewhon}
\usepackage[no-math]{fontspec} % For font loading
\usepackage{unicode-math} % For math font setup
\setmainfont{Erewhon}[
  Extension=.otf,
  UprightFont=*-Regular,
  ItalicFont=*-Italic,
  BoldFont=*-Bold,
  BoldItalicFont=*-BoldItalic,
]
\setmathfont{Erewhon-Math.otf}
\setmathfont[range={\mathfrak}]{latinmodern-math.otf} % Fallback fraktur font
\usepackage{amsmath} % For math environments and commands

\begin{document}

$\mathfrak{g}$ $\mathfrak{h}$

\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 .