0

I'm trying to use the package fontawesome with LaTeX, since the documentation says "This package works both with XƎ(LA)TEX and Lua(LA)TEX (using fontspec to load the included original otf font), as well as (pdf)(LA)TEX (using an included type1 conversion and character mapping of the font)."

The point is that, after installing the package, I get an error when I try to compile:

! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.

What should I do to be able to use the symbols the package gives?

Thanks in advance.

Minimal example: This is enough to get the error.

\documentclass[a4paper,openright,10pt]{article}
\usepackage{fontawesome}

\begin{document}
Hi \faMale

\end{document}

In addition, I got the package from texlive-fonts-extra.

Using TexMaker 4.1 and TeX Live 2013.20140215-1

Minkowski
  • 365
  • Don't load fontspec, if you want to use pdflatex – egreg Sep 09 '16 at 10:22
  • @egreg I don't load fontspec and I still get the error. – Minkowski Sep 09 '16 at 10:40
  • Please, add a minimal example, but maybe you have the same problem as in the question I linked, that is, an outdated version of fontawesome.sty hanging somewhere. Also report the line in the log where fontawesome.sty is loaded. – egreg Sep 09 '16 at 10:41
  • 1
    Then post a small example that gives you problem. Although it's weird because fontawesome doesn't require xelatex or lualatex. – Alenanno Sep 09 '16 at 10:41
  • @egreg I read that thread, but I'm afraid it is unuseful for me since I use TeX Live instead of MikTeX. – Minkowski Sep 09 '16 at 10:42
  • 1
    Your code works fine with me, apart from a warning about the option openright being unused, but that's it. – Alenanno Sep 09 '16 at 10:47
  • 3
    You don't have an older version of fontawesome? Add \listfiles before \documentclass and you'll get a pretty-printed list of packages and their versions near the end of the .log file. Also look at the log to see exactly where fontawesome.sty is located, to make sure it is not some stray copy. – Torbjørn T. Sep 09 '16 at 10:49
  • 2
    So you have an old version of TeX Live and hence an old version of fontawesome, likely from before the pdflatex compatibility was added. – Torbjørn T. Sep 09 '16 at 10:54
  • 1
    pdflatex support was added in version 4.3.0, which was released on July 9, 2015: https://github.com/xdanaux/fontawesome-latex/releases – Torbjørn T. Sep 09 '16 at 10:58
  • I get (/usr/share/texlive/texmf-dist/tex/latex/fontawesome/fontawesome.sty Package: fontawesome 2013/05/10 v3.1.1 font awesome icons in the log file. I will upgradeTeXLive, but I suposse I must download it from the website, as the lastest available version in Synaptic is that, mustn't I? – Minkowski Sep 09 '16 at 11:01
  • 1
    Of course, you can't think that, when the current version of TeX Live is 2016, with the 2013 release you can have all the bells and whistles. Upgrade your TeX Live. – egreg Sep 09 '16 at 11:01
  • I usually install TeX Live using the installer from TUG.org, see How to install "vanilla" TeXLive on Debian or Ubuntu? for instructions. While apt-get install texlive-full might be easier, it's also usually older, and you can't use tlmgr to update packages. – Torbjørn T. Sep 09 '16 at 11:12
  • Thank you guys, it works now. But now I have the problem that tikz-cd has just stopped working (tikz works). I will try to fix the other problem now. – Minkowski Sep 09 '16 at 11:49

0 Answers0