Skip to content

Commit

Permalink
Added support for GitLab to \social
Browse files Browse the repository at this point in the history
  • Loading branch information
xdanaux committed Nov 16, 2016
1 parent 0d674cf commit 2033517
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 15 deletions.
20 changes: 11 additions & 9 deletions examples/template-multibib.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% start of file `template.tex'.
%% Copyright 2006-2013 Xavier Danaux ([email protected]).
%% Copyright 2006-2015 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
Expand All @@ -9,8 +9,8 @@
\documentclass[11pt,a4paper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')

% moderncv themes
\moderncvstyle{casual} % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\moderncvstyle{casual} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy'
\moderncvcolor{blue} % color options 'black', 'blue' (default), 'burgundy', 'green', 'grey', 'orange', 'purple' and 'red'
%\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name
%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page

Expand All @@ -21,7 +21,7 @@
% adjust the page margins
\usepackage[scale=0.75]{geometry}
%\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates
%\setlength{\makecvtitlenamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...
%\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...

% personal data
\name{John}{Doe}
Expand All @@ -36,16 +36,18 @@
\social[xing]{john\_doe} % optional, remove / comment the line if not wanted
\social[twitter]{jdoe} % optional, remove / comment the line if not wanted
\social[github]{jdoe} % optional, remove / comment the line if not wanted
\social[gitlab]{jdoe} % optional, remove / comment the line if not wanted
\social[skype]{jdoe} % optional, remove / comment the line if not wanted
\extrainfo{additional information} % optional, remove / comment the line if not wanted
\photo[64pt][0.4pt]{picture} % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file
\quote{Some quote} % optional, remove / comment the line if not wanted

% to show numerical labels in the bibliography (default is to show no labels); only useful if you make citations in your resume
%\makeatletter
%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
%\makeatother
%\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}% CONSIDER REPLACING THE ABOVE BY THIS
% bibliography adjustements (only useful if you make citations in your resume, or print a list of publications using BibTeX)
% to show numerical labels in the bibliography (default is to show no labels)
%\makeatletter\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}\makeatother
\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}
% to redefine the bibliography heading string ("Publications")
%\renewcommand{\refname}{Articles}

% bibliography with mutiple entries
\usepackage{multibib}
Expand Down
4 changes: 3 additions & 1 deletion examples/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@
\social[xing]{john\_doe} % optional, remove / comment the line if not wanted
\social[twitter]{jdoe} % optional, remove / comment the line if not wanted
\social[github]{jdoe} % optional, remove / comment the line if not wanted
\social[gitlab]{jdoe} % optional, remove / comment the line if not wanted
\social[skype]{jdoe} % optional, remove / comment the line if not wanted
\extrainfo{additional information} % optional, remove / comment the line if not wanted
\photo[64pt][0.4pt]{picture} % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file
\quote{Some quote} % optional, remove / comment the line if not wanted

% bibliography adjustements (only useful if you make citations in your resume, or print a list of publications using BibTeX)
% to show numerical labels in the bibliography (default is to show no labels)
\makeatletter\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}\makeatother
%\makeatletter\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}\makeatother
\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}
% to redefine the bibliography heading string ("Publications")
%\renewcommand{\refname}{Articles}

Expand Down
10 changes: 6 additions & 4 deletions moderncv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,17 @@

% 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" or "skype"
% 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}{skype}} {\collectionadd[skype]{socials} {#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}{skype}} {\collectionadd[skype]{socials} {#3}} {}%
}
{\collectionadd[#1]{socials}{\protect\httplink[#3]{#2}}}}

Expand Down Expand Up @@ -307,6 +308,7 @@
\newcommand*{\xingsocialsymbol} {}
\newcommand*{\twittersocialsymbol} {}
\newcommand*{\githubsocialsymbol} {}
\newcommand*{\gitlabsocialsymbol} {}
\newcommand*{\skypesocialsymbol} {}

% other
Expand Down
1 change: 1 addition & 0 deletions moderncviconsawesome.sty
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
\renewcommand*{\xingsocialsymbol} {{\small\faXing}~} % alternative: \faXingSquare
\renewcommand*{\twittersocialsymbol} {{\small\faTwitter}~} % alternative: \faTwitterSquare
\renewcommand*{\githubsocialsymbol} {{\small\faGithub}~} % alternative: \faGithubSquare, \faGithubSquare
\renewcommand*{\gitlabsocialsymbol} {{\small\faGitlab}~}
\renewcommand*{\skypesocialsymbol} {{\small\faSkype}~}


Expand Down
1 change: 1 addition & 0 deletions moderncviconsletters.sty
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
\renewcommand*{\xingsocialsymbol} {\textbf{xi}~}
\renewcommand*{\twittersocialsymbol} {\textbf{tw}~}
\renewcommand*{\githubsocialsymbol} {\textbf{gh}~}
\renewcommand*{\gitlabsocialsymbol} {\textbf{gl}~}
\renewcommand*{\skypesocialsymbol} {\textbf{sk}~}

\renewcommand*{\listitemsymbol} {\labelitemi~}
Expand Down
3 changes: 2 additions & 1 deletion moderncviconsmarvosym.sty
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
\protect\end{scope}%
\protect\end{tikzpicture}}%
~}
\renewcommand*{\xingsocialsymbol}{}
\renewcommand*{\twittersocialsymbol} {%
\protect\raisebox{0em}{%
\protect\begin{tikzpicture}[x=0.08em, y=0.08em, xscale=0.005, yscale=-0.005, inner sep=0pt, outer sep=0pt]
Expand Down Expand Up @@ -222,6 +223,7 @@
\protect\end{scope}%
\protect\end{tikzpicture}}%
~}
\renewcommand*{\gitlabsocialsymbol}{}
\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]
Expand Down Expand Up @@ -255,7 +257,6 @@
\protect\end{scope}%
\protect\end{tikzpicture}}%
~}
\newcommand*{\xingsocialsymbol}{}


\endinput
Expand Down

0 comments on commit 2033517

Please sign in to comment.