The problem can be reproduced with
\documentclass{article}
\usepackage{infoBulle}
\begin{document}
Lorem
\end{document}
You'll need infoBulle.sty
from https://github.com/HarveySheppard/yLaTeX/tree/master/yPackages/infoBulle and yMainColor.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 the fontawesome
package (in line 44), but it also issues
\newfontfamily{\FA}{FontAwesome}
later 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 when fontawesome
is already loaded. This should be reported to the infoBulle
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 the fontspec
documentation explains
[\newfontfamily
, \setfontfamily
, \renewfontfamily
] These commands define new font family commands (like \rmfamily
). The new
command checks if ⟨cmd⟩
has been defined, and issues an error if so. The renew
command checks if ⟨cmd⟩
has been defined, and issues an error if not. The set
command never checks; use at your own risk.
NEW: In previous versions of fontspec
, only \newfontfamily
was provided, but it behaved like \setfontfamily
. You’ll have to update your code slightly if this now causes problems; apologies.
So in older versions of fontspec
the \newfontfamily
in infoBulle
would simply overwrite the default in fontawesome
, but now the two \newfontfamily
s with the same name clash and generate an error.
\documentclass{article}\usepackage[marginIcons]{infoBulle}\usepackage{fontawesome}\begin{document}Lorem\end{document}
?infoBulle
defines things thatfontawesome
defines, so the definitions clash.