\social 在 LaTeX 中不起作用

\social 在 LaTeX 中不起作用

我目前正在制作简历,并使用模板moderncv。当我尝试使用时,\social[github]{pedrocaseiro}出现以下错误:

! Undefined control sequence. \social
! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX 
Companion for explanation. Type H <return> for immediate help.... \social[


\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'


\usepackage[scale=0.75]{geometry} 



\firstname{Jon} % Your first name
\familyname{Snow} % Your last name
\title{Software Engineer}
\address{123, 123}{}
\mobile{(+123) 123123123}
\email{[email protected]}
\homepage{website}{website} 
\social[github]{123123}
\photo[70pt][0.4pt]{pictures/picture} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)

答案1

如果\social未定义,则您可能正在使用过时的版本moderncv。请考虑更新它。除此之外,还有一个问题\homepage\homepage只接受一个强制参数,而您使用了两个。更改

\homepage{website}{website} 

\homepage{website} 

完整示例:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry} 

\firstname{Jon} % Your first name
\familyname{Snow} % Your last name
\title{Software Engineer}
\address{123, 123}{}
\mobile{(+123) 123123123}
\email{[email protected]}
\homepage{website}{website} 
\social[github]{123123}
\photo[70pt][0.4pt]{picture} % The first bracket is the picture height

\begin{document}

\makecvtitle

\section{Working experience}

\end{document}

相关内容