列出语言技能会导致错误吗?

列出语言技能会导致错误吗?

我似乎在使用编写技能部分时遇到了问题awesome-cv

\cvsection{Skills}
\cvskill{Something:}{S}

导致错误:

! Misplaced alignment tab character &.
\cvskill #1#2-> \skilltypestyle {#1} &
                                       \skillsetstyle {#2} \\ 
l.2 \cvskill{Something:}{S}

I can't figure out why you would want to use a tab mark
here. If you just want an ampersand, the remedy is
simple: Just type `I\&' now. But if some right brace
up above has ended a previous alignment prematurely,
you're probably due for more error messages, and you
might try typing `S' now just to see what is salvageable.

该错误似乎是由环境定义方式引起的,

}
% Define a line of cv information(skill)
% Usage: \cvskill{<type>}{<skillset>}
\newcommand*{\cvskill}[2]{
    \skilltypestyle{#1} & \skillsetstyle{#2} 
  \\
}

它认为对齐制表符的位置不正确,但事实并非如此,那么为什么会导致错误?

答案1

您需要使用cvskills环境,因此对齐制表符被正确放置。

\begin{cvskills}
\cvskill{Something:}{S}
\end{cvskills}

顺便说一句:它基本上只是一个表格(见代码):

\newenvironment{cvskills}{%
  \vspace{\acvSectionContentTopSkip}
  \vspace{-2.0mm}
  \begin{center}
    \setlength\tabcolsep{1ex}
    \setlength{\extrarowheight}{0pt}
    \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} r L{\textwidth * \real{0.9}}}
}{%
    \end{tabular*}
  \end{center}
}

相关内容