mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
Added stackoverflow option to \social
This commit is contained in:
parent
2033517d3f
commit
2e364e60f2
4 changed files with 23 additions and 7 deletions
27
moderncv.cls
27
moderncv.cls
|
|
@ -255,21 +255,26 @@
|
|||
}
|
||||
|
||||
|
||||
% http://latex.org/forum/viewtopic.php?t=12239
|
||||
\def\SplitMyMacro#1/#2{#2}
|
||||
|
||||
|
||||
% adds a social link to one's personal information (optional)
|
||||
% usage: \social[<optional type>][<optional url>]{<account name>}
|
||||
% where <optional type> should be either "linkedin", "xing", "twitter", "github", "gitlab" or "skype"
|
||||
\collectionnew{socials}
|
||||
\NewDocumentCommand{\social}{O{}O{}m}{%
|
||||
\ifthenelse{\equal{#2}{}}%
|
||||
{%
|
||||
\ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httplink[#3]{www.linkedin.com/in/#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{xing}} {\collectionadd[xing]{socials} {\protect\httplink[#3]{www.xing.com/profile/#3}}}{}%
|
||||
\ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httplink[#3]{www.twitter.com/#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{github}} {\collectionadd[github]{socials} {\protect\httplink[#3]{www.github.com/#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{gitlab}} {\collectionadd[gitlab]{socials} {\protect\httplink[#3]{www.gitlab.com/#3}}} {}%
|
||||
{%
|
||||
\ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httpslink[#3]{www.linkedin.com/in/#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{xing}} {\collectionadd[xing]{socials} {\protect\httpslink[#3]{www.xing.com/profile/#3}}}{}%
|
||||
\ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httpslink[#3]{www.twitter.com/#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{github}} {\collectionadd[github]{socials} {\protect\httpslink[#3]{www.github.com/#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{gitlab}} {\collectionadd[gitlab]{socials} {\protect\httpslink[#3]{www.gitlab.com/#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{stackoverflow}} {\collectionadd[stackoverflow]{socials} {\protect\httpslink[\SplitMyMacro#3]{stackoverflow.com/users/#3}}} {}%
|
||||
\ifthenelse{\equal{#1}{skype}} {\collectionadd[skype]{socials} {#3}} {}%
|
||||
}
|
||||
{\collectionadd[#1]{socials}{\protect\httplink[#3]{#2}}}}
|
||||
{\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}}
|
||||
|
||||
% defines additional personal information (optional)
|
||||
% usage: \extrainfo{<text>}
|
||||
|
|
@ -310,6 +315,7 @@
|
|||
\newcommand*{\githubsocialsymbol} {}
|
||||
\newcommand*{\gitlabsocialsymbol} {}
|
||||
\newcommand*{\skypesocialsymbol} {}
|
||||
\newcommand*{\stackoverflowsocialsymbol} {}
|
||||
|
||||
% other
|
||||
%------
|
||||
|
|
@ -507,6 +513,13 @@
|
|||
{\href{http://#2}{#2}}%
|
||||
{\href{http://#2}{#1}}}
|
||||
|
||||
% makes an https hyperlink
|
||||
% usage: \httpslink[optional text]{link}
|
||||
\newcommand*{\httpslink}[2][]{%
|
||||
\ifthenelse{\equal{#1}{}}%
|
||||
{\href{https://#2}{#2}}%
|
||||
{\href{https://#2}{#1}}}
|
||||
|
||||
% makes an email hyperlink
|
||||
% usage: \emaillink[optional text]{link}
|
||||
\newcommand*{\emaillink}[2][]{%
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
\renewcommand*{\githubsocialsymbol} {{\small\faGithub}~} % alternative: \faGithubSquare, \faGithubSquare
|
||||
\renewcommand*{\gitlabsocialsymbol} {{\small\faGitlab}~}
|
||||
\renewcommand*{\skypesocialsymbol} {{\small\faSkype}~}
|
||||
\renewcommand*{\stackoverflowsocialsymbol} {{\small\faStackOverflow}~}
|
||||
|
||||
|
||||
\endinput
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
\renewcommand*{\githubsocialsymbol} {\textbf{gh}~}
|
||||
\renewcommand*{\gitlabsocialsymbol} {\textbf{gl}~}
|
||||
\renewcommand*{\skypesocialsymbol} {\textbf{sk}~}
|
||||
\renewcommand*{\stackoverflowsymbol} {\textbf{so}~}
|
||||
|
||||
\renewcommand*{\listitemsymbol} {\labelitemi~}
|
||||
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@
|
|||
\protect\end{tikzpicture}}%
|
||||
~}
|
||||
\renewcommand*{\gitlabsocialsymbol}{}
|
||||
\renewcommand*{\stackoverflowsymbol}{}
|
||||
\renewcommand*{\skypesocialsymbol} {%
|
||||
\protect\raisebox{-0.15em}{%
|
||||
\protect\begin{tikzpicture}[y=0.08em, x=0.08em, xscale=0.020, yscale=-0.020, inner sep=0pt, outer sep=0pt]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue