Im trying to make tufte-book to use EB Garamond. It does, but sadly, i have quite a few overfull boxes because many packages/styles use bold fonts.

An MWE for the complaint would be this:



  \setmainfont{EB Garamond}
  % some more renewals, as suggested in http://tex.stackexchange.com/a/202189/9293
  % \renewcommand{\bfseries}[1]{\swshape}


\part{Whine and cheese}

The above mwe compiles with the warnings:

LaTeX Font Warning: Font shape `EU1/EBGaramond(0)/bx/n' undefined
(Font)              using `EU1/EBGaramond(0)/m/n' instead on input line 32.

[1] [2] (index.aux)stdin -> index.pdf
4341 bytes written

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

If i use my full document, its getting worse, because quite a few line breaks are at the wrong places (i suspect the font substitution to be the culprit).

I already tried to renew the \bfseries command, as i suspect it to be responsible to be used in the book.sty, but if i do, the text for the part changes (first few chars are omitted, and "Part" is dropped, too), probably because redefining \bfseries does more than setting font weight :/

Therefore i ask you: a) How to redefine the acutal font parameterization only for \part, and b) How to redefine all bold for all usage of ebgaramond? (Because EB Garamond does not support bx)

or in general: How to fix such an problem?

  • 1
    EB Garamond has no bold font. End of game. – egreg Sep 25 '16 at 20:01
  • hmm. why that? (ebgaramond.sty defines a BoldFont. Why is that one not used?) Or to put it differently: Who does misbehave? ebgaramond.sty? xetex? or book.sty? Or me? – helt Sep 25 '16 at 20:10
  • 1
    ebgaramond.sty defines a bold font, but if you look closely, it's the medium size one. You get the warning because you're overriding the action of the package by declaring \setmainfont{EB Garamond}; remove the declaration and the warning will disappear. – egreg Sep 25 '16 at 20:16
  • thanks. and once again, TeX leaves me puzzled... So basically thats an answer, right? Mind posting it below? – helt Sep 25 '16 at 20:23
  • And I don't think the overfull boxes have anything to do with boldface missing. – egreg Sep 25 '16 at 20:24

The ebgaramond package contains the code

      [ Numbers = {\ebgaramond@figurealign,\ebgaramond@figurestyle},
        UprightFont    = *-Regular ,
        ItalicFont     = *-Italic ,
        BoldFont    = *-Regular ,
        BoldItalicFont     = *-Italic ,

which is executed when the typesetting engine is XeLaTeX or LuaLaTeX. The two macros for the Numbers option are set with package options (or applying the default values).

If you look closely, the BoldFont option declares the same font for UprightFont and the same for BoldItalicFont and ItalicFont. The reason is simple: EB Garamond features no boldface font so the package instructs fontspec to use medium weight fonts for it.

Analogously, the .fd file for the fonts with pdflatex has

\DeclareFontShape{T1}{EBGaramond-LF}{b}{n}{ <-> ssub * EBGaramond-LF/m/n }{}

and other similar (silent) substitutions whose purpose is avoiding warning messages like the one you report.

Why do you get it nonetheless? Because of the declaration

\setmainfont{EB Garamond}

that you have after loading the package, which overrides the previous one. Since the font doesn't have boldface to begin with, when fontspec is building the font family data, it doesn't find it, so it doesn't define it and when requested for boldface, LaTeX issues the standard warning for a (nonsilent) substitution.

Remove the declaration.

Avoid also xlxtra: at present it just loads some packages:

  • ifxetex
  • fontspec
  • realscripts
  • metalogo

Just load fontspec instead. The realscripts package may or may not work with the fonts you declare: it's better to experiment whether it does good or not. If you don't need to typeset the XeLaTeX or other similar logos, you don't need metalogo. If you do, load it explicitly.

  • 1
    It isn't necessary to load ifxetex or fontspec either since ebgaramond will load them if XeLaTeX is used (or LuaLaTeX). Nor, in fact, is it necessary to load ebgaramond since ebgaramond-maths will load it. So \usepackage{ebgaramond-maths} would be sufficient. – cfr Sep 25 '16 at 20:55
  • @cfr This is contingent to the particular packages and might go wrong if different ones are loaded. – egreg Sep 25 '16 at 21:46
  • So is the advice to remove \setmainfont. That may not be at all desirable if the standard font support package is not Xe/Lua aware. – cfr Sep 25 '16 at 21:55
  • @cfr So many variations are possible. But, as a general rule, I like to see the essential packages I need. – egreg Sep 25 '16 at 21:57

The following code sample works (for me) with TeXLive, with document classes that include article, tufte-book, and memoir, as processed by pdflatex, tex + dvi, and xetex.

The output should look something like this:

enter image description here

From source code like this:

%  \documentclass{article} % also works
%  \documentclass{memoir}  % also works

\RequirePackage{lmodern}   % supports \ttfamily\bfseries
\RequirePackage{garamondx} % supports \rmfamily\bfseries



% ----------------------------------------------------------------
% the following is necessary solely to undo some 'garamondx' patches
% ----------------------------------------------------------------

\lit{rmfamily}\lit{mdseries}\lit{upshape} & \rmfamily\mdseries\upshape Quantum\\
\lit{rmfamily}\lit{mdseries}\lit{itshape} & \rmfamily\mdseries\itshape Quantum\\
\lit{rmfamily}\lit{mdseries}\lit{scshape} & \rmfamily\mdseries\scshape Quantum\\[1ex]
\lit{rmfamily}\lit{bfseries}\lit{upshape} & \rmfamily\bfseries\upshape Quantum\\
\lit{rmfamily}\lit{bfseries}\lit{itshape} & \rmfamily\bfseries\itshape Quantum\\
\lit{rmfamily}\lit{bfseries}\lit{scshape} & \rmfamily\bfseries\scshape Quantum\\[1ex]
\lit{ttfamily}\lit{mdseries}\lit{upshape} & \ttfamily\mdseries\upshape Quantum\\
\lit{ttfamily}\lit{mdseries}\lit{itshape} & \ttfamily\mdseries\itshape Quantum\\
\lit{ttfamily}\lit{mdseries}\lit{scshape} & \ttfamily\mdseries\scshape Quantum\\[1ex]
\lit{ttfamily}\lit{bfseries}\lit{upshape} & \ttfamily\bfseries\upshape Quantum\\
\lit{ttfamily}\lit{bfseries}\lit{itshape} & \ttfamily\bfseries\itshape Quantum\\[1ex]
\lit{sffamily}\lit{mdseries}\lit{upshape} & \sffamily\mdseries\upshape Quantum\\
\lit{sffamily}\lit{mdseries}\lit{itshape} & \sffamily\mdseries\itshape Quantum\\[1ex]
\lit{sffamily}\lit{bfseries}\lit{upshape} & \sffamily\bfseries\upshape Quantum\\
\lit{sffamily}\lit{bfseries}\lit{itshape} & \sffamily\bfseries\itshape Quantum\\


Caveat: I am no sort of LaTeX guru.

  • \bfseries etc. are declared as robust commands which include checks for maths mode. Aside from typographic considerations, this is probably going to have rather strange side-effects. – cfr Jan 25 '17 at 1:53
  • I guess it still checks, maybe, but .... – cfr Jan 25 '17 at 2:04

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.