Add "tel:" URI hyperlinking for phone numbers

This commit is contained in:
Kevin Hwang 2016-02-15 23:02:43 -08:00
parent 31760a8e1a
commit 9d66734e3b

View file

@ -62,6 +62,8 @@
\RequirePackage{ifxetex} \RequirePackage{ifxetex}
% Needed to use \if-\then-\else statement % Needed to use \if-\then-\else statement
\RequirePackage{xifthen} \RequirePackage{xifthen}
% Needed to strip chars from telephone number
\RequirePackage{xstring}
% Needed to use a toolbox of programming tools % Needed to use a toolbox of programming tools
\RequirePackage{etoolbox} \RequirePackage{etoolbox}
% Needed to change line spacing in specific environment % Needed to change line spacing in specific environment
@ -284,7 +286,11 @@
% Defines writer's mobile (optional) % Defines writer's mobile (optional)
% Usage: \mobile{<mobile number>} % Usage: \mobile{<mobile number>}
\newcommand*{\mobile}[1]{\def\@mobile{#1}} \newcommand*{\mobile}[1]
{
\def\@mobile{#1}
\def\@teluri{tel:\@mobile}
}
% Defines writer's email (optional) % Defines writer's email (optional)
% Usage: \email{<email adress>} % Usage: \email{<email adress>}
@ -417,7 +423,12 @@
\ifthenelse{\isundefined{\@mobile}}% \ifthenelse{\isundefined{\@mobile}}%
{}% {}%
{% {%
\faMobile\acvHeaderIconSep\@mobile% % Formats phone number for "tel:" URI
\StrDel{\@teluri}{ }[\@teluri]%
\StrDel{\@teluri}{-}[\@teluri]%
\StrDel{\@teluri}{(}[\@teluri]%
\StrDel{\@teluri}{)}[\@teluri]%
\href{\@teluri}{\faMobile\acvHeaderIconSep\@mobile}%
\setbool{isstart}{false}% \setbool{isstart}{false}%
}% }%
\ifthenelse{\isundefined{\@email}}% \ifthenelse{\isundefined{\@email}}%