You are not logged in.

## #1 2019-05-13 18:20:45

Martin
Member
From: Stockholm, Sweden
Registered: 2015-10-01
Posts: 317
Website

### LaTeX Beamer class' Metropolis theme and Fira fonts?

Anyone with Beamer expertise here?

I try to use the Metropolis theme but fail to get the Fira fonts to work. I get a 'not found' error message when 'compiling' my LaTeX files. Searching the net I find this is a known but fixed bug of the Metropolis theme. I have downloaded and use the very latest version in which this should be corrected but for me it does not work.

As far as I can see the package carrying the Fira fonts is installed.

/Martin

"Problems worthy of attack
prove their worth by hitting back."
Piet Hein

Offline

## #2 2019-05-13 18:28:52

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 638

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

a) I think you will have much better chance for the answer on TeX - LaTeX Stack Exchange
b) Please, post minimal example which should - in your opinion - work, but actually doesn't work (I can try to see what's wrong)

Last edited by iMBeCil (2019-05-13 18:29:07)

Postpone all your duties; if you die, you won't have to do them ..

Online

## #3 2019-05-13 19:36:07

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,393

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

Martin wrote:

Anyone with Beamer expertise here?

I try to use the Metropolis theme but fail to get the Fira fonts to work. I get a 'not found' error message when 'compiling' my LaTeX files. Searching the net I find this is a known but fixed bug of the Metropolis theme. I have downloaded and use the very latest version in which this should be corrected but for me it does not work.

As far as I can see the package carrying the Fira fonts is installed.

/Martin

No, unless you post the part between \documentclass{} and \begin{document}, fellow LaTeX enthusiast. Font selection also depends on which of the TeXs (tex, pdflatex, xelatex, lualatex, …) you're using, to a very large degree, and which font interface/package to load the font.

Edit: Just compiled an old project with Beamer and Fira Sans like this

\documentclass[xetex,serif]{beamer}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{calc}
\usepackage{polyglossia}

\usepackage{fontspec}
\setmainfont[Ligatures={Common,Discretionary},Numbers={Proportional,OldStyle}]{Fira Sans}
\setdefaultlanguage{french}
\usecolortheme{orchid}
latexmk -xelatex

Edit 2: I would also check if Fira is found by fontconf

fc-match 'Fira Sans'

should return a match on the Fira Sans ttf file.

A silent kite against the blue, blue sky

Offline

## #4 2019-05-14 00:12:05

hhh
That's it!
Registered: 2015-09-17
Posts: 7,450
Website

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

OT

If I spent any significant time with documents, I would research this project.

/OT

Offline

## #5 2019-05-14 10:30:05

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 638

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

^I'm sure OP has (had) enough experience with LaTeX ... at least wording of his question show he has encountered LaTeX often enough.

And apparently, he has solved the problem?!?

Postpone all your duties; if you die, you won't have to do them ..

Online

## #6 2019-05-14 10:37:39

earlybird
ほやほや
Registered: 2015-12-16
Posts: 684
Website

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

iMBeCil wrote:

^I'm sure OP has (had) enough experience with LaTeX ... at least wording of his question show he has encountered LaTeX often enough.

And apparently, he has solved the problem?!?

Ah, then perhaps I misunderstood OPs question: If he downloaded the fixed latex package, but TeX cannot find it: Execute kpsewhich -var-value TEXMFHOME and then put the package into the file hierarchy of that directory; on my system it's ~/texmf. When installing the package with tlmgr this should be taken care of nearly automatically though it's some time since I installed packages that didn't come with texlive.

Offline

## #7 2019-05-14 12:13:09

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 638

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

^I feel you shouldn't have do all that, the package manager should take care of all this. At least if one uses TexLive and 'apt'. Or even MiKTeX on MSWin.

But all this is immaterial ... until we see (minimal) (non)working example, we are - as we say here where I live - 'talking to the wind'

Last edited by iMBeCil (2019-05-14 12:14:11)

Postpone all your duties; if you die, you won't have to do them ..

Online

## #8 2019-05-14 18:26:19

Martin
Member
From: Stockholm, Sweden
Registered: 2015-10-01
Posts: 317
Website

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

Sorry for leaving you to your own devices after having started this thread but now I am back.

I have gone Fira-hunting. I find .otf and .tfm versions but no .ttf version. Beamer+Metropolis does not find it. Using twoion's code does not help (in Gummi since the latexmk command is not available and I have not had time to figure out if I want it).

The output of kpsewhich -var-value TEXMFHOME is indeed ~/texmf but what does that mean, or rather, what do I do with that information?

/Martin

"Problems worthy of attack
prove their worth by hitting back."
Piet Hein

Offline

## #9 2019-05-15 11:43:07

earlybird
ほやほや
Registered: 2015-12-16
Posts: 684
Website

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

latexmk -xelatex can be replaced with just 'xelatex file.tex'. You can get OTF versions from here: https://github.com/mozilla/Fira/tree/master/otf.

You still haven't told me which engine you're using. Minimally, if fc-match checks out,

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Fira Sans}
\begin{document}
Hello, I'm Fira.
\end{document}
xelatex thefile.tex

should produce output with xelatex.

If you're using pdflatex, try using the snippet at http://www.tug.dk/FontCatalogue/firasans/.

Offline

## #10 2019-05-15 21:54:20

Martin
Member
From: Stockholm, Sweden
Registered: 2015-10-01
Posts: 317
Website

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

Engines: In Gummi I have the choice of PdfTeX and XeTeX. If I use the former I am told Fira will not work. If I use the latter I am told (in the log file) that Fira can not be found.

If I try your latest example (not using Gummi at all) I am told Fira can not be found.

I already have the OTF version of Fira but thanks for the URL anyway. Fira looks like a good choice for presentations.

The Danish text of the example at the second url is from H.C. Andersen's story about the emperor's new clothes. More important perhaps, the firasans.tex works for me. I get no errors in the build log and as far as I can see the document is rendered with Fira Sans.

Great, now I have something to work with -- tomorrow as it is time for some sleep now.

/Martin

"Problems worthy of attack
prove their worth by hitting back."
Piet Hein

Offline

## #11 2019-05-18 15:42:35

Martin
Member
From: Stockholm, Sweden
Registered: 2015-10-01
Posts: 317
Website

### Re: LaTeX Beamer class' Metropolis theme and Fira fonts?

Problem solved it seems. Beamer + Metropolis with Fira Sans now works for me on three different computers. The 'secret sauce' seems to be adding this line to the .tex file:

\usepackage[sfdefault]{FiraSans}

My take of this is Metropolis somehow still looks in the wrong place for Fira (on my systems) and making Fira Sans the default font like this fixes the problem.

/Martin

"Problems worthy of attack
prove their worth by hitting back."
Piet Hein

Offline