\newcommand 条目的特定问题

\newcommand 条目的特定问题

我正在尝试撰写简历。我使用了其中一个模板,它具有:

Education Entry

\newcommand{\EducationEntry}[4]{
        \noindent \textbf{#1} \hfill      % Study
        \colorbox{Cyan}{%
            \parbox{6em}{%
            \hfill\color{Black}#2}} \par  % Duration
        \noindent \textit{#3} \par        % School
        \noindent\hangindent=2em\hangafter=0 \small #4 % Description
        \normalsize \par}

Work Entry

\newcommand{\WorkEntry}[4]{               
        \noindent \textbf{#1} \hfill      
        \colorbox{White}{\color{Black}#2} \par  
        \noindent {#3} \par              
        \noindent\hangindent=2em\hangafter=0 \small #4
        \normalsize \par}

默认情况下,教育条目如下所示:

\EducationEntry{Master's degree in Data Science}{2016-2018}{Higher School of Economics, Moscow}
 {GPA 7.71/10.00}

Undefined control sequence我每次输入都会遇到编译错误。我使用的软件包:

\usepackage[a4paper,
            left=1.5in,
            right=1.5in,
            top=.6in,
            bottom=0in]{geometry}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage{amsmath,amsfonts,amsthm}     
\usepackage{graphicx}                    
\usepackage[svgnames]{xcolor}            
\usepackage{geometry}
    \textheight=700px                    
\usepackage{url}
\usepackage{ragged2e}
\usepackage{fontawesome}
\usepackage{hyperref}
\usepackage{sectsty}

我假设问题出在定义条目结构上,但现在我不确定具体该怎么做。此外,在我包含包之后,hyperref编译出现了问题。

更新 1

我的条目格式与上面的例子相同。

错误信息是:

*Undefined control sequence.
The compiler is having trouble understanding a command you have used. Check that the command is spelled correctly. If the command is part of a package, make sure you have included the package in your preamble using \usepackage{...}.*

答案1

删除\usepackage[utf8x]{inputenc}解决了一个问题。

相关内容