使用经典风格将 ORCiD 徽标添加到 moderncv

使用经典风格将 ORCiD 徽标添加到 moderncv

我正在尝试使用将 ORCiD 徽标添加到 moderncv \moderncvstyle{classic},但总是出现错误。

对于符号本身,我尝试使用academicons此处描述的包: 有没有在 TeX / PDF 中包含 ORCID 的标准方法? 并按照以下步骤使用 tikz: IEEEtran - 如何使用 PdfLatex 在 TeX/PDF 中包含 ORCID

然后,我刚刚从这个答案中得到了例子: https://tex.stackexchange.com/a/464850/143252 并注意到,只需将模型从 更改bankingclassic,它就会出现错误:

./test_cv.tex:60: Argument of \@firstoftwo has an extra }. <inserted text> \par l.60 \makecvtitle

\moderncvstyle{banking}以下是可以使用但不能使用的代码\moderncvstyle{classic}

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{classic} % 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} 

答案1

嗯,那是我的一个老答案,你正在尝试......很高兴看到这一点......

对于 Orcid 的符号,您需要使用包academicons。由于此包已经包含 GoogleScholar 和 ResearchGate 的漂亮符号,因此您最好对符号使用以下命令

\newcommand*\orcidsocialsymbol{{\aiOrcid}~} % <=========================
\newcommand*\googlescholarsocialsymbol{{\aiGoogleScholar}~} % <========= \aiGoogleScholarSquare
\newcommand*\researchgatesocialsymbol{{\aiResearchGate}~}   % <========= \aiResearchGateSquare

然后您可以使用以下重新定义:

\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}}}     {}%
      \ifthenelse{\equal{#1}{orcid}}   {\collectionadd[orcid]{socials}  {\protect\httpslink[#3]{orcid.org/#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}}}     {}% <==========================
    }
    {\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}}

使用 XeLaTeX,您可以毫无错误地编译它,使用 LuaLaTeX,您将收到 100 条有关使用microtype在类中调用的警告moderncv...所以我使用 XeLaTeX 进行以下 MWE

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{classic} % casual, classic, banking, oldstyle and fancy % head 1, body 1      moderncvcollection moderncviconsmarvosym
\moderncvcolor{blue} 

%\usepackage[utf8]{inputenc} % <============= not needed with lualatex or xelatex

\usepackage[scale=0.75]{geometry}

\usepackage{academicons} % <=============== needs lualatex or xelatex

% makes a https hyperlink
% usage: \httpslink[optional text]{link}
\newcommand*{\httpslink}[2][]{% <=======================================
  \ifthenelse{\equal{#1}{}}%
    {\href{https://#2}{#2}}%
    {\href{https://#2}{#1}}}

\newcommand*\orcidsocialsymbol{{\aiOrcid}~} % <=========================
\newcommand*\googlescholarsocialsymbol{{\aiGoogleScholar}~} % <========= \aiGoogleScholarSquare
\newcommand*\researchgatesocialsymbol{{\aiResearchGate}~}   % <========= \aiResearchGateSquare

\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}}}     {}%
      \ifthenelse{\equal{#1}{orcid}}   {\collectionadd[orcid]{socials}  {\protect\httpslink[#3]{orcid.org/#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}}}     {}% <==========================
    }
    {\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}}


% 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[orcid]{0000-0000-0000-0000}
\social[googlescholar]{john.doe}
\social[researchgate]{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}

及其结果:

生成的 pdf

所以您不需要使用旧图像,而且我也没有调查您收到的错误来自哪里......

请注意,我保留了代码,https://因为http://https://是今天使用的正确协议......

答案2

这就是我在简历上所做的事情。

\newcommand*\orcidsocialsymbol{{\aiOrcid}~}用(来自 academicons 或任何你想要的字体) 定义一条新的社交线然后使用它就足够了\social[orcid][https://orcid.org/0000-0000-0000-0000]{0000-0000-0000-0000}

请注意,您应该使用 LuaLaTeX 或 XeLaTeX 来使用 academicons。

%!TEX program = lualatex
\documentclass[10pt,a4paper,nolmodern,roman]{moderncv}
\moderncvtheme[blue]{classic}

\usepackage{fontspec}

% Define ORCID symbol
\usepackage{academicons}
\newcommand*\orcidsocialsymbol{{\aiOrcid}~}


\firstname{Name}
\familyname{Family Name}
\title{Curriculum Vitæ}
\social[orcid][https://orcid.org/0000-0000-0000-0000]{0000-0000-0000-0000}

\begin{document}

\maketitle

\section{Education}
\cventry{2015--2019}{Ph.\ D.\ in software engineering}{}{}{}{}
\end{document}

答案3

2022 年,只需使用

\social[orcid]{0000-0001-6962-4290}

平均能量损失

\documentclass{moderncv}
\moderncvtheme[blue]{classic}
\name{Name}{Name}
\social[orcid]{0000-0000-0000-0000}

\begin{document}
\makecvtitle
\end{document}

平均能量损失

完整示例

\documentclass[11pt,a4paper,sans]{moderncv}

% moderncv themes
\moderncvstyle{classic} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue} 

\usepackage[utf8]{inputenc}

\usepackage[scale=0.75]{geometry}


% 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[orcid]{0000-0000-0000-0000}
\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} 

在此处输入图片描述

相关内容