Adding google scholar and Researchgate profile to the preamble in moderncv
Because you gave us not an complete MWE I can only guess why you are using \vspace{-2.00cm}
in your code. I guess it will not do what you want, but that is at last another question ;-)
For your problem there exists an command \socials
in class moderncv
:
\social[googlescholar]{john.doe} % <====================================
\social[researchgate]{john.doe} % <=====================================
john.doe
stands for your account name in both cases.
To be able to use this commands you need to add the following code to your preamble:
% makes a https hyperlink
% usage: \httpslink[optional text]{link}
\newcommand*{\httpslink}[2][]{% <=======================================
\ifthenelse{\equal{#1}{}}%
{\href{https://#2}{#2}}%
{\href{https://#2}{#1}}}
\newcommand*{\googlescholarsocialsymbol} {\includegraphics[width=0.5cm]{example-image-a}~} % <===================
\newcommand*{\researchgatesocialsymbol} {\includegraphics[width=0.5cm]{example-image-b}~} % <===================
\newcommand*{\testsocialsymbol} {\includegraphics[width=0.5cm]{example-image-c}~} % <===================
\makeatletter
\RenewDocumentCommand{\social}{O{}O{}m}{%
\ifthenelse{\equal{#2}{}}%
{
\ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httpslink[#3]{www.linkedin.com/in/#3}}}{}%
\ifthenelse{\equal{#1}{googlescholar}}{\collectionadd[googlescholar]{socials}{\protect\httpslink[#3]{www.googlescholar.com/profile/#3}}}{}% <================================================================
\ifthenelse{\equal{#1}{researchgate}}{\collectionadd[researchgate]{socials}{\protect\httpslink[#3]{www.researchgate.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}}} {}%
}
{\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}}
\makeatother
That allows you to use the given commands \socials
. Please see that you have to change the codes www.googlescholar.com/profile/
for
{\protect\httpslink[#3]{www.googlescholar.com/profile/#3}}
to what you need. #3
contains your displayed name that also is the account name.
The second part you have to change are the following commands
\newcommand*{\googlescholarsocialsymbol} {\includegraphics[width=0.5cm]{example-image-a}~}
Instead of \includegraphics[width=0.5cm]{example-image-a}
add the image you need to display the logo of that page you did not tell us.
If the displayed name and the link differ in the last part (john.doe
is not part of the link but you want to display it you can use the following command:
\social[test][www.test.com/profile/123456]{john.doe} % <=====================================
Then please change the second and third parameter for your needs. Instead test
use googlescholar
and researchgate
to name the new social commands. BTW if you only use the possibility of test
you can use a shorter code in your preamble:
\makeatletter
\RenewDocumentCommand{\social}{O{}O{}m}{%
\ifthenelse{\equal{#2}{}}%
{
\ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httpslink[#3]{www.linkedin.com/in/#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}}} {}%
}
{\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}}
\makeatother
You need this code to get https:
instead of http:
in the links ...
With the following compiling code (MWE; please next time add one to your question!):
\documentclass[11pt,a4paper,sans]{moderncv}
% moderncv themes
\moderncvstyle{banking} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
% makes a https hyperlink
% usage: \httpslink[optional text]{link}
\newcommand*{\httpslink}[2][]{% <=======================================
\ifthenelse{\equal{#1}{}}%
{\href{https://#2}{#2}}%
{\href{https://#2}{#1}}}
\newcommand*{\googlescholarsocialsymbol} {\includegraphics[width=0.5cm]{example-image-a}~} % <===================
\newcommand*{\researchgatesocialsymbol} {\includegraphics[width=0.5cm]{example-image-b}~} % <===================
\newcommand*{\testsocialsymbol} {\includegraphics[width=0.5cm]{example-image-c}~} % <===================
\makeatletter
\RenewDocumentCommand{\social}{O{}O{}m}{%
\ifthenelse{\equal{#2}{}}%
{
\ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httpslink[#3]{www.linkedin.com/in/#3}}}{}%
\ifthenelse{\equal{#1}{googlescholar}}{\collectionadd[googlescholar]{socials}{\protect\httpslink[#3]{www.googlescholar.com/profile/#3}}}{}% <================================================================
\ifthenelse{\equal{#1}{researchgate}}{\collectionadd[researchgate]{socials}{\protect\httpslink[#3]{www.researchgate.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}}} {}%
}
{\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}}
\makeatother
% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\social[googlescholar]{john.doe} % <====================================
\social[researchgate]{john.doe} % <=====================================
\social[test][www.test.com/profile/john.doe]{john.doe} % <=====================================
\extrainfo{additional information}
\quote{Some quote}
\setlength{\footskip}{66pt}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution--3}{City--4}{\textit{Grade}--5}{Description--6} % arguments 3 to 6 can be left empty
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}
\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description
no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
\begin{itemize}%
\item Sub-achievement (a);
\item Sub-achievement (b), with sub-sub-achievements (don't do this!);
\begin{itemize}
\item Sub-sub-achievement i;
\item Sub-sub-achievement ii;
\item Sub-sub-achievement iii;
\end{itemize}
\item Sub-achievement (c);
\end{itemize}
\item Achievement 3.
\end{itemize}}
\cventry{year--year}{Job title}{Employer}{City}{}{Description
line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}
\section{Languages}
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvitemwithcomment{\textbf{Language} 2}{\textbf{Skill} level}{Comment}
\cvitemwithcomment{Language 3}{Skill level}{Comment}
\section{Computer skills}
\cvdoubleitem{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
\cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
\cvdoubleitem{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}
\section{Interests}
\cvitem{hobby 1}{Description}
\cvitem{hobby 2}{Description}
\cvitem{hobby 3}{Description}
\section{Extra 1}
\cvlistitem{Item 1}
\cvlistitem{Item 2}
\cvlistitem{Item 3. This item is particularly long and therefore
normally spans over several lines. Did you notice the indentation
when the line wraps?}
\section{Extra 2}
\cvlistdoubleitem{Item 1}{Item 4}
\cvlistdoubleitem{Item 2}{Item 5}
\cvlistdoubleitem{Item 3}{Item 6. Like item 3 in the single column list before, this item is particularly long to wrap over several lines.}
\section{References}
\begin{cvcolumns}
\cvcolumn{Category 1}{\begin{itemize}\item Person 1\item Person 2\item Person 3\end{itemize}}
\cvcolumn{Category 2}{Amongst others:\begin{itemize}\item Person 1, and\item Person 2\end{itemize}(more upon request)}
\cvcolumn[0.5]{All the rest \& some more}{\textit{That} person, and \textbf{those} also (all available upon request).}
\end{cvcolumns}
\end{document}
you get: