尝试使用时\arrayrulecolor
出现错误:
Undefined control sequence. \arrayrulecolor
我使用的标记是:
\documentclass[letterpaper,11pt]{article}
\usepackage{kpfonts}
\setlength{\parskip}{\baselineskip}%
\setlength{\parindent}{0pt}%
\usepackage{xcolor}
\definecolor{darkjunglegreen}{rgb}{0.0, 0.26, 0.15}
\usepackage{booktabs}
\usepackage[
top = 0.608cm,
bottom = 1.1cm,
left = 1.20cm,
right = 1.10cm]{geometry}
\usepackage{titlesec}
\usepackage{array}
\usepackage{calc}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\makeatletter
\newcommand\semiLarge{\@setfontsize\semiLarge{13.22}{17.38}}
\makeatother
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}
{1em}{}[\color{darkjunglegreen}{\titlerule[2pt]}]
\titlespacing\section{0pt}{1pt plus 4pt minus 2pt}{-3pt plus 2pt minus 2pt}
\begin{document}
\sloppy
\section*{Section Heading}
\arrayrulecolor{darkjunglegreen}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}*{3}{C{0.3\textwidth-2\tabcolsep}}}
\large\textbf{Term} & \large\textbf{Word} & \large\textbf{Phrase}\\
\cmidrule[2pt](r){1-1} \cmidrule[1pt](lr){2-2} \cmidrule[1pt](l){3-3}
\end{tabular*}
\end{document}
导致此错误的原因是什么?
答案1
抱歉我回复晚了,但我已将此代码放在评论后面。我只将其放入您的代码中,\usepackage[T1]{fontenc}
并且\usepackage[table,RGB]{xcolor}
您的所有代码均能正常工作。
\documentclass[letterpaper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{kpfonts}
\setlength{\parskip}{\baselineskip}%
\setlength{\parindent}{0pt}%
\usepackage[table,RGB]{xcolor}
\definecolor{darkjunglegreen}{rgb}{0.0, 0.26, 0.15}
\usepackage{booktabs}
\usepackage[
top = 0.608cm,
bottom = 1.1cm,
left = 1.20cm,
right = 1.10cm]{geometry}
\usepackage{titlesec}
\usepackage{array}
\usepackage{calc}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\makeatletter
\newcommand\semiLarge{\@setfontsize\semiLarge{13.22}{17.38}}
\makeatother
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}
{1em}{}[\color{darkjunglegreen}{\titlerule[2pt]}]
\titlespacing\section{0pt}{1pt plus 4pt minus 2pt}{-3pt plus 2pt minus 2pt}
\begin{document}
\sloppy
\section*{Section Heading}
\arrayrulecolor{darkjunglegreen}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}*{3}{C{0.3\textwidth-2\tabcolsep}}}
\large\textbf{Term} & \large\textbf{Word} & \large\textbf{Phrase}\\
\cmidrule[2pt](r){1-1} \cmidrule[1pt](lr){2-2} \cmidrule[1pt](l){3-3}
\end{tabular*}
\end{document}