10

When using pdflatex and the fontawesome package the below error shows up.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! 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>.
!...............................................  

Wish to keep on using "pdflatex" instead of "xelatex" or "lualatex".

In fontawesome Version 4.4.0 manual it says "When using the (pdf)(LA)TEX engine, the fontawesome package doesn’t require any external package".

Tried solutions proposed for this question (Fontawesome doesn't scale up) without success.

MWE:

\documentclass{article}
\usepackage{fontawesome}
\begin{document}
{\faAdjust}
\end{document} 

closed as off-topic by egreg, user31729, moewe, Torbjørn T., Heiko Oberdiek Aug 11 '15 at 9:38

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • From fontawesome manual (abstract) This package requires the fontspec package and either the X Ǝ (L A )T E X or Lua(L A )T E X engine to load the included otf font. Hence it won't work with pdflatex. – user11232 Aug 9 '15 at 3:50
  • It also says "When using the (pdf)(LA)TEX engine, the fontawesome package doesn’t require any external package". – Mark Starbucks Aug 9 '15 at 4:01
  • 5
    @HarishKumar. Not true. Recent versions work with pdflatex: "This pack­age works both with Xe(LA)TEX and Lua(LA)TEX (us­ing fontspec to load the in­cluded orig­i­nal otf font), as well as pdf(LA)TEX (us­ing an in­cluded type1 con­ver­sion and char­ac­ter map­ping of the font)." – Gonzalo Medina Aug 9 '15 at 4:04
  • 1
    @Tex Learner: Then your installation may be wrong, or you are not using the newly installed one. It is inconsistent with the manual: The fontawesome package requires the fontspec package when using the X.(LA)TEX or Lua(LA)TEX engines to load the included otf font. When using the (pdf)(LA)TEX engine, the fontawesome package doesn't require any external package. MiKTeX? It seems that /usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty shows that you are using TeX Live on some Unix system. – Akira Kakuto Aug 10 '15 at 21:24
  • 5
    I'm voting to close this question as off-topic because the issue was due to a stray version of fontawesome.sty in the OP's system – egreg Aug 11 '15 at 8:54
6

Thanks to @AkiraKakuto, the problem was that MikTex was still using old versions of the fontawesome package from the AppData/Roaming folder despite the package was updated using the package manager and the "update app" within MiKTex.

The problem is solved by deleting the fontawesome folder within AppData/Roaming/MiKTex/'version'.

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