8

I am using ebgaramond font and trying to make an epsilon:

\documentclass[10pt,article]{memoir}

\usepackage[lining]{ebgaramond}
\usepackage{ebgaramond-maths}

\begin{document}
Epilon: $\epsilon$

\end{document}

But it won't show up: (never mind the spelling the command is right:)

enter image description here

Does the font lack it and there is no automatic fall-back or what is going on here? What can I do to get around it?

  • I just found \varepsilon as a quick and hacky fix but it can't be the right way now can it.... – jonalv Jun 1 '18 at 8:10
  • @moewe hm I really thought it would fall back to some other version of the symbol then... I guess I am just plain wrong on that? – jonalv Jun 1 '18 at 8:12
11

You may want to contact the package's author (email is available on the front page of the package's user guide) and ask if the missing \epsilon glyph is a bug. While you're at it, you may also wanto to ask about \theta (which looks a lot like \vartheta), \xi (its scaling may be off), \varpi (too much whitespace to the right of the glyph?), and \rho (which looks rather like \varrho).

enter image description here

Just for comparison, here are the same glyphs from Computer Modern.

enter image description here

\documentclass[10pt,article]{memoir}
\usepackage{ebgaramond-maths} % comment out to get Computer Modern
\begin{document}

$\alpha\beta\gamma\delta[\epsilon]\varepsilon\zeta
\eta\theta\vartheta\iota\kappa\lambda\mu\nu
\xi\pi\varpi\rho\varrho\sigma\varsigma\tau
\upsilon\phi\varphi\chi\psi\omega$ % \omicron not defined

\end{document}
  • 1
    I didn't post a listing of uppercase Greek characters since they look just fine. – Mico Jun 1 '18 at 8:45
  • 3
    The documentation of the package says that characters are missing (it doesn't say which one, but it is not only epsilon as one can check with a fonttable. ). – Ulrike Fischer Jun 1 '18 at 8:46
  • 3
    @UlrikeFischer referring to package documentation: a low blow! – David Carlisle Jun 1 '18 at 10:58
6

The log reports

Missing character: There is no ^^O in font EBGaramond12-Italic--oml-ebgaramond!

which seems like an error in the font setup.

\varepsilon works though

enter image description here

\documentclass[10pt,article]{memoir}

\usepackage[lining]{ebgaramond}
\usepackage{ebgaramond-maths}

\begin{document}
Epsilon: $[\epsilon][\varepsilon]$

\end{document}
  • 1
    If no suitable Greek is freely available the package probably ought to make the commands give an error rather than just access missing glyphs – David Carlisle Jun 1 '18 at 8:13
4

If you want to get a fallback while experimenting with different fonts, you can substitute \epsilon with \varepsilon when the former is not available:

\documentclass[10pt,article]{memoir}

\usepackage[lining]{ebgaramond}
\usepackage{ebgaramond-maths}

\begingroup
\def\extract#1"#2#3#4\extract{
  \gdef\epsilon{%
    \iffontchar\textfont "#2 "#3#4
      \mathchar"#2#3#4
    \else
      \varepsilon
    \fi
  }%
}
\expandafter\extract\meaning\epsilon\extract
\endgroup

\begin{document}

epsilon: $\epsilon$

varepsilon: $\varepsilon$

\end{document}

enter image description here

If I comment out the two \usepackage lines, I get

enter image description here

If you finally decide for ebgaramond-maths, then just add

\renewcommand{\epsilon}{\varepsilon}

instead of the code between \begingroup and \endgroup (inclusive).

4

There is now a Garamond Math OpenType font matching EB Garamond, usable with unicode-math. I also added it to the OpenType Math Fonts community answer.

\documentclass[varwidth, preview]{standalone}

\usepackage{mathtools}
\usepackage{unicode-math}

\setmainfont{EB Garamond}
\setmathfont{Garamond Math}[Scale=MatchUppercase]

\begin{document}
\begin{align*}
   &\lim_{x \to c} f(x) = L \iff \\
   &\quad \forall \epsilon > 0. \exists \delta > 0. \forall x \in D. \\
   &\quad\left\lvert x-c \right\rvert < \delta \implies
         \left\lvert f(x) - L \right\rvert < \epsilon
\end{align*}
\end{document}

Garamond Math Sample

Note that, as of June 2018, the full EB Garamond 12 font family is not yet in TeX Live, only the Regular and Italic faces.

0

You can also load the newtxmath package and use \epsilonup as replacement for \epsilon. \epsilonup looks more similar to the \epsilon used by the most other math fonts.

\documentclass[10pt,article]{memoir}

\usepackage[lining]{ebgaramond}
\usepackage[]{newtxmath}
\usepackage{ebgaramond-maths}

\begin{document}
Epsilon: $\varepsilon$ \\
Epsilon: $\epsilonup$

\end{document}

  • I'm not sure this is a viable solution, because newtxmath does several redeclarations of symbols, whereas ebgaramond-maths relies on standard math codes. For instance, uppercase Greek letters will be from newtxmath rather than ebgaramond-maths. – egreg Jan 5 at 20:51
  • I wasn't aware of these drawbacks, so the solution has to be taken with care. I did some testing with newtxmath and this raised a few additional questions to me. I run the above example with and w/o newtxmath for uppercase Greek letters and the result differs for pdflatex, xelatex, and lualatex. But I think this shouldn't be discussed in this thread. – rqwa Jan 7 at 15:09

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.