Closed twsh closed 8 years ago
Based on your error message, it looks like XeLaTeX can't find any of the Fira Sans fonts you have downloaded. (This is different from #187, where only the italics didn't work.) A couple questions to try to get to the bottom of your issue:
Is your problem specific to the Metropolis theme? Try compiling the following minimal example with XeLaTeX:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Fira Sans}
\begin{document}
Lorem ipsum dolor sit amet.
\end{document}
This should compile without any warnings. If you get the same problem, it means XeLaTeX can't find the Fira Sans font.
@rchurchley Fira Sans is available to LibreOffice. Your MWE compiles fine. My presentation is set in Fira Sans. So xelatex can find Fira Sans. I still get the error, however. Presumably it's caused by something else in my file (generated by Pandoc). I haven't been able to track down what it is yet.
Interesting. Just to make sure it is a problem with your file and not the theme, does a minimal Beamer presentation using Metropolis compile correctly?
\documentclass{beamer}
\usetheme{metropolis}
\begin{document}
\begin{frame}
Lorem ipsum dolor sit amet.
\end{frame}
\end{document}
@rchurchley That compiles fine. So it's something that the Pandoc template adds. Also, the line which the message refers to seems to correspond to the first occurrence of \section
.
Curious. How about these examples, then?
\documentclass{beamer}
\usetheme{metropolis}
\begin{document}
\section{Introduction}
\begin{frame}
Lorem ipsum dolor sit amet.
\end{frame}
\end{document}
\documentclass{beamer}
\usetheme{metropolis}
\begin{document}
\begin{frame}
\Large\bfseries Lorem ipsum dolor sit amet.
\end{frame}
\end{document}
\documentclass{beamer}
\usetheme{metropolis}
\begin{document}
\begin{frame}
\Large Lorem ipsum dolor sit amet.
\end{frame}
\end{document}
Those are all fine. I made a markdown file like this:
# Section one
## Lorem
Lorem ipsum dolor sit amet.
I did pandoc --to beamer --variable=theme:metropolis --standalone -o foo.tex foo.md && latexmk -xelatex foo
and got the error. The .tex file produced by Pandoc is here: https://gist.github.com/twsh/509bdbea254a12fa1c219a759d98eafa
I will try to find out exactly what in there causes the error when I have some time.
Thanks for the info! It looks like the problem line added by Pandoc is
\usepackage{lmodern}
which is not necessary when using a custom font. Removing this line gets rid of the warning.
Well, I guess this should then reported upstream over at the Pandoc repository. It's obviously not possible to not load any font-related package.
@rchurchley Thanks! Yes, that's it.
@matze I have opened an issue: https://github.com/jgm/pandoc-templates/issues/190
I experienced the same error when using
\usepackage[T1]{fontenc}
I just deleted it from the preamble because I had just copied it from another .tex document where it was important to ensure proper line breaks with german umlaute(?). This won't be a big deal in a presentation I guess.
I experienced the same error when using
\usepackage[T1]{fontenc}
I just deleted it from the preamble because I had just copied it from another .tex document where it was important to ensure proper line breaks with german umlaute(?). This won't be a big deal in a presentation I guess.
It works for me as well, but why? Moreover, the font is changed after removing the command. Is there a way to solve this?
I have the latest version of Metropolis from CTAN (1.1) and Fira Sans downloaded from www.fontsquirrel.com/fonts/fira-sans
I get the following warning when I do
$ latexmk -xelatex foo.tex
:This looks a bit like https://github.com/matze/mtheme/issues/187 but I'm using xelatex not lualatex.