Skip to content

Commit

Permalink
Merge pull request #242 from Ntgllr/moderncv-researchidsocialsymbol-bug
Browse files Browse the repository at this point in the history
"LaTeX Error: Command \researchidsocialsymbol undefined." in moderncv
  • Loading branch information
mitchelloharawild authored Jun 12, 2024
2 parents 97c0750 + e9f64f9 commit 51ec634
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/moderncv.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#'
#' @export
moderncv <- function(..., theme = c("casual", "classic", "oldstyle", "banking", "fancy"),
latex_engine = "pdflatex") {
latex_engine = "xelatex") {
theme <- match.arg(theme)
template <- system.file("rmarkdown", "templates", "moderncv",
"resources", "moderncv.tex",
Expand Down
1 change: 1 addition & 0 deletions inst/rmarkdown/templates/moderncv/resources/moderncv.tex
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
$if(orcid)$\social[orcid]{$orcid$}$endif$
$if(researchgate)$\social[researchgate]{$researchgate$}$endif$
$if(googlescholar)$\social[googlescholar]{$googlescholar$}$endif$
$if(researcherid)$\social[researcherid]{$researcherid$}$endif$
% \extrainfo{additional information} % optional, remove / comment the line if not wanted

$if(profilepic)$\photo[70pt][0.4pt]{$profilepic$}$endif$
Expand Down
35 changes: 35 additions & 0 deletions inst/rmarkdown/templates/moderncv/skeleton/colors.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
%-------------------------------------------------------------------------------
% built-in colors
%-------------------------------------------------------------------------------

\definecolor{black}{RGB}{0, 0, 0}
\definecolor{red}{rgb}{0.95, 0.20, 0.20}
\definecolor{darkgrey}{rgb}{0.45, 0.45, 0.45}
\definecolor{orange}{rgb}{0.95, 0.55, 0.15}
\definecolor{burgundy}{rgb}{0.596078, 0, 0}% 139/255 (0.545098) or 152/255 (0.596078)
\definecolor{purple}{rgb}{0.50, 0.33, 0.80}
\definecolor{lightblue}{rgb}{0.22, 0.45, 0.70}
\definecolor{green}{rgb}{0.35, 0.70, 0.30}

%-------------------------------------------------------------------------------
% default colors
%-------------------------------------------------------------------------------

\colorlet{default-socialicon-color}{darkgrey}

%-------------------------------------------------------------------------------
% colors for social icons
%-------------------------------------------------------------------------------

% \definecolor{weixin}{rgb}{.184, .533, .098}
% \definecolor{linkedin}{HTML}{0a66c2}
% \definecolor{orcid}{HTML}{a6ce39}
% \definecolor{twitter}{RGB}{29, 155, 240}
% \definecolor{facebook}{HTML}{1b74e4}
% TODO: add more colors

%-------------------------------------------------------------------------------
% custom colors
%-------------------------------------------------------------------------------

% \definecolor{tsinghua}{HTML}{791CB5}
1 change: 1 addition & 0 deletions inst/rmarkdown/templates/moderncv/skeleton/moderncv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
\newcommand*{\orcidsocialsymbol} {}
\newcommand*{\researchgatesocialsymbol}{}
\newcommand*{\researcheridsocialsymbol}{}
\newcommand*{\researchidsocialsymbol}{}
\newcommand*{\googlescholarsocialsymbol}{\faGoogle~}
\newcommand*{\telegramsocialsymbol}{}
\newcommand*{\whatsappsocialsymbol}{}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
%% start of file `moderncviconsacademic.sty'.
%% Copyright 2013-2015 Xavier Danaux ([email protected]), 2020-2022 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


%-------------------------------------------------------------------------------
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{moderncviconsacademic}[2022-02-21 v2.3.1 modern curriculum vitae icons: academicons]


%-------------------------------------------------------------------------------
% required packages
%-------------------------------------------------------------------------------
% Package for academic icons
\RequirePackage{academicons}
\RequirePackage{xcolor}

%-------------------------------------------------------------------------------
% set colors
%-------------------------------------------------------------------------------
\input{colors}

\providecolor{orcid}{named}{default-socialicon-color}
\providecolor{researchgate}{named}{default-socialicon-color}
\providecolor{researcherid}{named}{default-socialicon-color}
\providecolor{googlescholar}{named}{default-socialicon-color}

%-------------------------------------------------------------------------------
% all symbols described in moderncv.cls
%-------------------------------------------------------------------------------
%\newcommand*{\listitemsymbol} {\labelitemi~}
%\newcommand*{\addresssymbol} {}
%\newcommand*{\bornsymbol} {}
%\newcommand*{\mobilephonesymbol} {}
%\newcommand*{\fixedphonesymbol} {}
%\newcommand*{\faxphonesymbol} {}
%\newcommand*{\emailsymbol} {}
%\newcommand*{\homepagesymbol} {}
%\newcommand*{\linkedinsocialsymbol} {}
%\newcommand*{\xingsocialsymbol} {}
%\newcommand*{\twittersocialsymbol} {}
%\newcommand*{\githubsocialsymbol} {}
%\newcommand*{\gitlabsocialsymbol} {}
%\newcommand*{\stackoverflowsocialsymbol}{}
%\newcommand*{\bitbucketsocialsymbol} {}
%\newcommand*{\skypesocialsymbol} {}
\renewcommand*{\orcidsocialsymbol} {{\color{orcid}\small\aiOrcid}~}
\renewcommand*{\researchgatesocialsymbol} {{\color{researchgate}\small\aiResearchGateSquare}~} % alternative: \aiResearchGate
\renewcommand*{\researcheridsocialsymbol} {{\color{researcherid}\small\aiResearcherIDSquare}~} % alternative: \aiResearcherID
\renewcommand*{\googlescholarsocialsymbol}{{\color{googlescholar}\raisebox{-1pt}{\large\aiGoogleScholar}}~}
%\newcommand*{\telegramsocialsymbol} {}
%\newcommand*{\whatsappsocialsymbol} {}
%\newcommand*{\matrixsocialsymbol} {}
%\newcommand*{\signalsocialsymbol} {}


\endinput

%% end of file `moderncviconsacademic.sty'.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

% symbols
\moderncvicons{awesome}
\moderncvicons{academic}


%-------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

% symbols
\moderncvicons{awesome}
\moderncvicons{academic}


%-------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

% symbols
\moderncvicons{awesome}
\moderncvicons{academic}


%-------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

% symbols
\moderncvicons{awesome}
\moderncvicons{academic}


%-------------------------------------------------------------------------------
Expand Down

0 comments on commit 51ec634

Please sign in to comment.