Better format tel: URI

Closes #30
This commit is contained in:
Oliver Ford 2023-07-27 23:08:51 +01:00
commit da661243bc
No known key found for this signature in database
GPG key ID: 15CCFACF010F70D2

View file

@ -62,6 +62,8 @@
\RequirePackage{ifxetex}
% Needed to use \if-\then-\else statement
\RequirePackage{xifthen}
% Needed to strip chars from telephone number
\RequirePackage{xstring}
% Needed to use a toolbox of programming tools
\RequirePackage{etoolbox}
% Needed to change line spacing in specific environment
@ -259,7 +261,16 @@
% Defines writer's mobile (optional)
% Usage: \mobile{<mobile number>}
\newcommand*{\mobile}[1]{\def\@mobile{#1}}
\newcommand*{\mobile}[1]
{
\def\@mobile{#1}
\def\@teluri{tel:\@mobile}
% Strip unwanted characters
\StrDel{\@teluri}{ }[\@teluri]%
\StrDel{\@teluri}{-}[\@teluri]%
\StrDel{\@teluri}{(}[\@teluri]%
\StrDel{\@teluri}{)}[\@teluri]%
}
% Defines writer's email (optional)
% Usage: \email{<email address>}
@ -466,7 +477,7 @@
\ifthenelse{\isundefined{\@mobile}}%
{}%
{%
\href{tel:\@mobile}{\faMobile\acvHeaderIconSep\@mobile}%
\href{\@teluri}{\faMobile\acvHeaderIconSep\@mobile}%
\setbool{isstart}{false}%
}%
\ifthenelse{\isundefined{\@email}}%