diff options
author | Karl Berry <karl@freefriends.org> | 2018-02-16 00:08:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-02-16 00:08:56 +0000 |
commit | e63fcdfa34c2a5f9818b7d72ebf9a5506069ba99 (patch) | |
tree | 9cc7bda67c45a01abb3e90f638cc42cdc093879b /Master/texmf-dist/tex/latex/fontawesome5/fontawesome5.sty | |
parent | 42ba42be479afb3cdef765d96c1bd0d7e689573e (diff) |
fontawesome5 (15feb18)
git-svn-id: svn://tug.org/texlive/trunk@46649 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fontawesome5/fontawesome5.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/fontawesome5/fontawesome5.sty | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/fontawesome5/fontawesome5.sty b/Master/texmf-dist/tex/latex/fontawesome5/fontawesome5.sty new file mode 100644 index 00000000000..ecb84b50b83 --- /dev/null +++ b/Master/texmf-dist/tex/latex/fontawesome5/fontawesome5.sty @@ -0,0 +1,82 @@ +% Copyright 2018 Marcel Krueger +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3c +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Marcel Krueger +% +\RequirePackage{expl3} +\ProvidesExplPackage{fontawesome5}{2018/02/08}{5.0.6}{Font Awesome 5} + +\RequirePackage{l3keys2e} + +\keys_define:nn{fontawesome5} +{ + pro .value_forbidden:n = true, + pro .tl_set:N = \c__fontawesome_kind_tl, + pro .default:n = pro, + free .value_forbidden:n = true, + free .tl_set:N = \c__fontawesome_kind_tl, + free .default:n = free +} +\keys_set:nn{fontawesome5}{free} + +\ProcessKeysOptions{fontawesome5} + +\RequirePackage{xparse} + +\str_new:N\l_fontawesome_style_str + +\str_case:onTF\c_sys_engine_str{ + {luatex}{} + {xetex}{} +}{ + \RequirePackage{fontawesome5-utex-helper} +}{ + \RequirePackage{fontawesome5-generic-helper} +} + +\msg_new:nnnn{fontawesome5}{icon-not-found} + {The~requested~icon~#1~was~not~found.} + {Maybe~you~mistyped~the~icon~name~or~you~are~using~the~wrong~version~of~Font~Awesome~5.~ + Please~check~the~Font~Awesome~Cheatsheet~to~verify~the~spelling~of~#1.~ + If~you~want~to~use~a~Pro~icon,~you~need~to~have~Font~Awesome~5~Pro~installed~and~ + use~XeLaTeX~or~LuaLaTeX.~Then~you~can~activate~Pro~with~the~[pro]~option.~ + If~you~use~XeLaTeX~or~LuaLaTeX,~you~can~also~try~updating~the~Font~Awesome~5~font~files~ + to~make~icons~of~newer~versions~of~Font~Awesome~available.} +\msg_new:nnnn{fontawesome5}{style-substitution} + {The~requested~icon~#1~has~been~replaced~by~the~solid~version} + {The~icon~#1~is~not~available~in~the~style~#2.~The~solid~version~will~be~used~instead.~ + To~use~a~#2~style~#1~icon,~you~probably~need~Font~Awesome~5~Pro.~ + To~use~Pro,~you~need~to~have~Font~Awesome~5~Pro~installed~and~ + use~XeLaTeX~or~LuaLaTeX.~Then~you~can~activate~Pro~with~the~[pro]~option.} + +\NewDocumentCommand\faPreselectedIcon{m s O{\str_use:N\l_fontawesome_style_str}}{ + \fontawesome_use_icon:nn{#3}{#1\IfBooleanT{#2}{-alt}} +} +\NewDocumentCommand\faIcon{s O{\str_use:N\l_fontawesome_style_str} m}{ + \fontawesome_use_icon:nn{#2}{#3\IfBooleanT{#1}{-alt}} +} +\cs_new:Npn\fontawesome_set_style:n{ + \str_set:Nn\l_fontawesome_style_str +} + +\NewDocumentCommand\faStyle{m}{ + \fontawesome_set_style:n{#1} +} + +\cs_new_eq:cc{c__fontawesome_slot_stop_tl}{c__fontawesome_slot_square_tl} +\cs_new:Npn\faStop{\faPreselectedIcon{square}} +\cs_new:Npn\faH#1{\faPreselectedIcon{h#1}} +\NewDocumentCommand\faRepeat{t{1}}{ + \faPreselectedIcon{repeat\IfBooleanT{#1}{-1}} +} + +\fontawesome_set_style:n{solid} |