Hello I am trying to use the following class (yReport.cls) from this link https://github.com/HarveySheppard/yLaTeX
I am using MikTex 2.9 and I have installed the relevant packages, fonts and cls files. Unfortunately the following error comes and I do not know how to fix it:
! LaTeX error: "xparse/command-already-defined"
!
! Command '\FA' already defined!
!
! See the LaTeX3 documentation for further information.
This error comes up when loading the following code which is the minimal amount of code required for the layout to work:
\documentclass[french]{yReport}
\author{Your name}
\subtitle{Subtitle}
\title{Title}
\hypersetup{
pdftitle={Title},
pdfsubject={Subject},
pdfauthor={Your name},
pdfkeywords={{keyword 1}{keyword 2}},
}
\makeatletter
\let\runauthor\@author
\let\runtitle\@title
\makeatother
\begin{document}
\titleTwo
\end{document}
Best Answer
The problem can be reproduced with
You'll need
infoBulle.sty
from https://github.com/HarveySheppard/yLaTeX/tree/master/yPackages/infoBulle andyMainColor.sty
from https://github.com/HarveySheppard/yLaTeX/blob/master/yPackages/yMainColor/ to run the code.A short investigation reveals that
infoBulle.sty
not only loads thefontawesome
package (in line 44), but it also issueslater on in line 115.
At that point, however,
fontawesome
has executed that same line itself and we get an error.It seems to me that
infoBulle.sty
is wrong in using\FA
with\newfontfamily
for FontAwesome whenfontawesome
is already loaded. This should be reported to theinfoBulle
maintainer (https://github.com/HarveySheppard/yLaTeX/issues/8). The maintainer has responded quickly and a fixed version is available on GitHub.In the meantime the easiest, but also dirtiest, fix is to edit your local copy of
infoBulle.sty
and to remove (or comment out) the\newfontfamily{\FA}{FontAwesome}
in line 115.sab hoque's investigations show that the problem did not occur with older versions of
fontspec
. And indeed thefontspec
documentation explainsSo in older versions of
fontspec
the\newfontfamily
ininfoBulle
would simply overwrite the default infontawesome
, but now the two\newfontfamily
s with the same name clash and generate an error.