I'm writing a presentation using beamer and the metropolis theme. The intro of my document looks like this:
\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usefonttheme{serif}
\usetheme[progressbar=foot]{metropolis}
My initial googling and reading of questions here on Stack suggests that the combination of fontenc
and inputenc
in that order should allow me to use Unicode glyphs supported by my font. In this case the font is Fira which I verified does have the glyphs I want to write.
The problem is that when I type "₂" (subscript 2) into my .tex file and compile it using LuaTeX the resulting PDF has nothing where the "₂" should be. If I use \textsubscript{2}
instead the character appears (or rather a character appears, I'm guessing it's not actually the Unicode glyph "₂"). How can I get the Unicode character to appear in the PDF?
fontenc
,inputenc
andlmodern
in your snippet doesn't look as if you really know how to load a font with lualatex and how luatex differ from pdflatex. Do you usefontspec
to load your font?fontenc
in particular don't use\usepackage[T1]{fontenc}
which specifies that there are only 256 characters, which do not include subscripts, in the font. also don't use\usepackage[utf8]{inputenc}
which just makes a warning saying do not use the package, and does nothing at all in luatex.\documentclass{...}
, the required\usepackage
's,\begin{document}
, and\end{document}
. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.