Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

At the moment I try to get the EB Garamond font to work on my windows machine (under MikTeX 2.9), but I failed. By searching TeX.SX I found this two questions:

The first solution is too generic because it only points out the existence of the ebgaramond package on CTAN, while the second one consists in reinstalling the package by hand - which I tried without success.

As the README of ebgaramond demands I enabled the font-map of EB Garamond (by adding

Map EBGaramond.map

to the updmap.cfg, and then Refreshing FNDB and bashing

initexmf -u
updmap

to the Windows command line.) Is this alredy wrong? Maybe I am missing something completely basal in my test file:

 \documentclass[11pt]{article}
 \usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage{ebgaramond}
 %\usepackage[DIV10]{typearea}
 %\usepackage{microtype}
 \usepackage{lipsum}

 \title{A \LaTeX\ Article}
 \author{Ruben Giannotti}
 \date{\today}

 \begin{document}
 \maketitle
 {{\large 1}\hspace{.5em}\scshape \uppercase{Introduction}\par\vspace{1em}}%faking a section title
 \lipsum
 \end{document}

When compiling with LaTeX a really bad looking .dvi emerges. (So I guess the maping should be alright.) But, when doing so with pdfLaTeX not even an output file is generated. The log file says:

!pdfTeX error: pdflatex (file EBGaramond12-Regular-osf-t1--base): Font EBGaramo nd12-Regular-osf-t1--base at 548 not found ==> Fatal error occurred, no output PDF file produced!

By enabling microtype it changes a little:

! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. \endgroup \set@typeset@protect l.17 \end {document} ... ! ==> Fatal error occurred, no output PDF file produced!

Edit

In the meantime I tried several things with the font mapping configuration. What I did in the first place was to modify updmap.cfg in the root directory of MikTeX, which is not ideal. So, I restored it to its original state. Afterwords I started the configuration with initexmf --edit-config-file updmap (which opens the corresponding config file in the roaming directory of MikTeX - at least on my machine). I finally made EB Garamond to work but - and this is a non acceptable drawback - I had to cancel out another mapping that I added before (MinionPro).

In short: With my actual knowledge and setup I can use only one of them, and what I deduce from what I did til now is that I simply use the wrong syntax to map the fonts (note the plural form) correctly. This is how my updmap.cfg looks like:

Map EBGaramond.map Map MinionPro.map Map MyriadPro.map

By the way, I did this because the MikTeX manual says

"Insert the following line at the end of the file: Map xyz.map"

Do I have to respect some syntax rules? Is this even wrong? Or could this be a sign that my whole distro is broken (see @DG's comments on his/her answer)?

share|improve this question
    
Does this answer help? –  Thruston Nov 25 '13 at 20:05
    
@Thruston unfortunately no. Since the question is about math fonts and urw-garamond. –  Ruben Nov 25 '13 at 20:15
    
Is using LuaLaTeX instead of pdfLaTeX an option for you? The OpenType version of EB Garamond has lots of cool features, but they're best accessed via LuaLaTeX and the fontspec package. –  Mico Nov 28 '13 at 9:41
    
@Mico in general I'd say: yes. Trying out new stuff is very important (to me). In this specific case I have set up a document that will be handed in soon and while finishing it I had the idea to play around with alternate fonts. As the coding is somehow finished too and I don't know if there could be compatibility problems with LuaLaTeX (because I don't know it yet), I guess it is not really an option for now. –  Ruben Nov 28 '13 at 9:57
    
If you really want to use EBGaramond, then do as Mico says. Using the OpenType version with LuaLaTex (or XeLaTeX) is likely to succeed quite easily, while figuring out what went wrong installing the font for pdflatex has wasted a lot of time already. –  DG' Nov 28 '13 at 12:00
add comment

2 Answers

up vote 2 down vote accepted

According to this post Are itemize and EBGaramond compatible? there is a bug in EBGaramond.

Using the code @egreg posted in his answer, you can fix your example like this:

\documentclass[11pt]{article}
\usepackage{ifluatex,ifxetex}

\ifluatex\else\ifxetex\else
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
\fi\fi

\usepackage{ebgaramond}
\ifluatex\else\ifxetex\else
  \normalfont
  \makeatletter
  \input{TS1EBGaramond-LF.fd}
  \input{TS1EBGaramond-OsF.fd}
  \makeatother
  \DeclareFontShape{TS1}{EBGaramond-OsF}{m}{sl}{ <-> ssub * EBGaramond-OsF/m/it }{}
  \DeclareFontShape{TS1}{EBGaramond-OsF}{b}{n}{ <-> ssub * EBGaramond-OsF/m/n }{}
  \DeclareFontShape{TS1}{EBGaramond-OsF}{b}{it}{ <-> ssub * EBGaramond-OsF/m/it }{}
  \DeclareFontShape{TS1}{EBGaramond-OsF}{b}{sl}{ <-> ssub * EBGaramond-OsF/m/it }{}
  \DeclareFontShape{TS1}{EBGaramond-OsF}{bx}{n}{ <-> ssub * EBGaramond-OsF/m/n }{}
  \DeclareFontShape{TS1}{EBGaramond-OsF}{bx}{it}{ <-> ssub * EBGaramond-OsF/m/it }{}
  \DeclareFontShape{TS1}{EBGaramond-OsF}{bx}{sl}{ <-> ssub * EBGaramond-OsF/m/it }{}
\fi\fi

\usepackage[DIV10]{typearea}
\usepackage{microtype}
\usepackage{lipsum}

\title{A \LaTeX\ Article}
\author{Ruben Giannotti}
\date{\today}

\begin{document}
 \maketitle
 {{\large 1}\hspace{.5em}\scshape \uppercase{Introduction}\par\vspace{1em}}%faking a section title
 \lipsum
\end{document}

The package ebgaramond is in the repository of miktex, so it is advisable to use the package manager, instead of installing it manually.

Update

If this does not help, follow the steps outlined in the miktex manual:

  1. Run initexmf --edit-config-file updmap.
  2. Check for Map EBGaramond.map and add it at the end of the file, if absent. Make sure each entry is on its own line.
  3. Save the file and close the editor.
  4. Run initexmf --mkmaps to rebuild the font map files.
  5. It couldn't hurt to additionally run initexmf --update-fndb
share|improve this answer
    
I tried this code; but still no pdf output. –  Ruben Nov 25 '13 at 22:29
    
Have you installed the ebgaramond using the miktex package manager? Either by using the gui tool or by invoking mpm --install ebgaramond on the command line. –  DG' Nov 25 '13 at 22:52
    
I cleaned up the previous installation of the package, and then tried both. pdfLaTeX still refuses to give at least an output file. –  Ruben Nov 27 '13 at 10:33
    
This is strange, can you post the relevant part of your log? –  DG' Nov 27 '13 at 11:16
    
It is still the one from the end of the questions body. –  Ruben Nov 27 '13 at 13:05
show 5 more comments

Even though the OP has indicated a reluctance to switch from pdfLaTeX to LuaLaTeX so close to the submission deadline, I'll offer the following method anyway, as it's really not that difficult to implement:

% !TEX TS-program = lualatex
\documentclass[11pt]{article}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{EB Garamond}
% Remainder of document same as before, except: Don't load the
% fontenc, inputenc, or ebgaramond packages

Don't load the fontenc or inputenc packages, but do ensure that your .tex files are encoded in utf8. (If it's encoded in ASCII, you'll be fine.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.