# How to modify a .sty file?

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}}

-
Do not change a style file, it will be lost with the next update. You can put the command in your preamble or contact the maintainer of the package, he might add it. – Johannes_B Aug 7 '14 at 14:02
@Johannes_B but last time 2013/05/10 v 3.1.1 was update and I also contact with xdanaux through but still no response. So now I'm try to make my fontawesome. sty file. – Micky K Aug 7 '14 at 14:37
I just had a look into the otf. Possible that the sign doesn't even exist in the font? So all your efforts point to an empty point. – Johannes_B Aug 7 '14 at 14:45
Going to the development page on github you can download the new version containing the symbol. Adding you line to the preamble (enclosed in makeatletter and makeatother) works just fine. Be sure that TeX can find the font. – Johannes_B Aug 7 '14 at 14:50
@Johannes_B fortawesome.github.io/Font-Awesome. But it's not working I try it. – Micky K Aug 7 '14 at 14:53

## 1 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.

-
Isn't the OP trying to add an additional command, though? (Note that I'm not sure about this but that's what seems to be happening from the comments.) – cfr Aug 8 '14 at 2:25
@cfr I wonder how this could get that manny upvotes, since it doesn't answer what the OP wants. It answers the titlequestion, tough. – Johannes_B Aug 8 '14 at 9:39
@Johannes_B -- i think you've identified the "why": the answer addresses the title question. not all titles accurately represent the actual question, and as you observe, this is one of those. on the other hand, the point made in the answer is very important, and a useful workaround is provided, so for that reason, it got an upvote from me. – barbara beeton Aug 12 '14 at 16:01