[Tex/LaTex] How to modify a .sty file

packagespatching

I am trying to modify the fontawesome.sty file. I just include the command in the style file and it works but without showing the Skype icon just showing an empty box.

\expandafter\def\csname faicon@icon-skype\endcsname         {\symbol{"F17E}}  \def\faSkype             {{\FA\csname faicon@icon-skype\endcsname}}

Best Answer

Modifying the style file is not recommended since an update will reset your modification. The xpatch package is used for this. So, instead, you can add the following lines to the preamble of your .tex file (without touching the .sty file):

\usepackage{xpatch} 
\xpatchcmd{<\command>}{<search>}{<replace>}{<success>}{<failure>}

See the xpatch package here for more details.