编写简历模板时遇到问题

编写简历模板时遇到问题

我在 ubuntu 上使用 texmaker,并尝试创建简历。我从 sharelatex 下载了这个模板。我尝试使用 LaTeX、XeLaTex 和 PDFLaTeX 进行编译,但它们都出现了相同的错误“未定义的控制序列”。我在下面链接了源代码,这是所用编译器的问题还是 latex 代码中的问题?

这些错误不断重复出现。

! Undefined control sequence.
\cftdotfill #1->\def \@tempa 
                         {#1}\def \@tempb {\cftnodots }\ifx \@tempa \@te...
l.69 ... MSc, PhD, or something else}{2009 - 2013}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
\cftdotfill #1->\def \@tempa {#1}\def \@tempb 
                                          {\cftnodots }\ifx \@tempa \@te...
l.69 ... MSc, PhD, or something else}{2009 - 2013}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Missing control sequence inserted.
<inserted text> 
            \inaccessible 
l.69 ... MSc, PhD, or something else}{2009 - 2013}

Please don't say `\def cs{...}', say `\def\cs{...}'.
I've inserted an inaccessible control sequence so that your
definition will be completed without mixing me up too badly.
You can recover graciously from this error, if you're
careful; see exercise 27.2 in The TeXbook.

! Missing control sequence inserted.
<inserted text> 
            \inaccessible 
l.69 ... MSc, PhD, or something else}{2009 - 2013}

Please don't say `\def cs{...}', say `\def\cs{...}'.
I've inserted an inaccessible control sequence so that your
definition will be completed without mixing me up too badly.
You can recover graciously from this error, if you're
careful; see exercise 27.2 in The TeXbook.

! Missing control sequence inserted.
<inserted text> 
            \inaccessible 
l.69 ... MSc, PhD, or something else}{2009 - 2013}

https://www.sharelatex.com/templates/cv-or-resume/clean-cv

答案1

您在数组前导中有一个脆弱的命令,修复该问题的最简单方法是添加

\usepackage{array}

比较

\documentclass{article}
\usepackage{tocloft}
\begin{document}
\begin{tabular}{l@{\cftdotfill{\cftdotsep}\extracolsep{\fill}}r}
    w
\end{tabular}
\end{document}

\documentclass{article}
\usepackage{tocloft}
\usepackage{array}
\begin{document}
\begin{tabular}{l@{\cftdotfill{\cftdotsep}\extracolsep{\fill}}r}
    w
\end{tabular}
\end{document}

相关内容