-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tex
44 lines (35 loc) · 1 KB
/
variables.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
\newcommand{\varAddress}{}
\newcommand{\setAddress}[1]{\renewcommand{\varAddress}{#1}}
\newcommand{\varEmail}{}
\newcommand{\setEmail}[1]{\renewcommand{\varEmail}{#1}}
\newcommand{\varMobile}{}
\newcommand{\setMobile}[1]{\renewcommand{\varMobile}{#1}}
\newcommand{\varScholar}{}
\newcommand{\setScholar}[1]{\renewcommand{\varScholar}{#1}}
\newcommand{\varGithub}{}
\newcommand{\setGithub}[1]{\renewcommand{\varGithub}{#1}}
\newcommand{\varTwitter}{}
\newcommand{\setTwitter}[1]{\renewcommand{\varTwitter}{#1}}
\newcommand{\varWeb}{}
\newcommand{\setWeb}[1]{% optional
\DoIfNotEmpty{#1}
{\renewcommand{\varWeb}{#1}}%
}
% helper
% from http://tex.stackexchange.com/a/44938/39530
\makeatletter
\newcommand{\DoIfNotEmpty}[1]{%
\begingroup
\sbox0{#1}%
\ifdim\wd0=\z@
\endgroup
\expandafter\@gobble
\else
\endgroup
\expandafter\@firstofone
\fi}
\makeatother
% external link icon
\newcommand{\externallink}[0]{%
\space\includegraphics[height=\fontcharht\font`\B]{images/externallink}
}