Errors in the CV template by Scott Clark
There are better ways to obtain fixed-width tabular
s - the main problem with the current template. I've swapped out the use of tabular*
with tabularx
, provided by the tabularx
package (and some array
pizzaz):
% (c) 2002 Matthew Boedicker <[email protected]> (original author) http://mboedick.org
% (c) 2003-2007 David J. Grant <davidgrant-at-gmail.com> http://www.davidgrant.ca
% (c) 2008 Nathaniel Johnston <[email protected]> http://www.nathanieljohnston.com
%
% (c) 2012 Scott Clark <[email protected]> cam.cornell.edu/~sc932
%
%This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
\documentclass[letterpaper,11pt]{article}
\newlength{\outerbordwidth}
\pagestyle{empty}
\raggedbottom
\raggedright
\usepackage[svgnames]{xcolor}
\usepackage{framed,tabularx,array}
\usepackage{tocloft}
%-----------------------------------------------------------
%Edit these values as you see fit
\setlength{\outerbordwidth}{3pt} % Width of border outside of title bars
\definecolor{shadecolor}{gray}{0.75} % Outer background color of title bars (0 = black, 1 = white)
\definecolor{shadecolorB}{gray}{0.93} % Inner background color of title bars
%-----------------------------------------------------------
%Margin setup
\setlength{\evensidemargin}{-0.25in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\oddsidemargin}{-0.25in}
\setlength{\paperheight}{11in}
\setlength{\paperwidth}{8.5in}
\setlength{\tabcolsep}{0in}
\setlength{\textheight}{9.5in}
\setlength{\textwidth}{7in}
\setlength{\topmargin}{-0.3in}
\setlength{\topskip}{0in}
\setlength{\voffset}{0.1in}
%-----------------------------------------------------------
%Custom commands
\newcommand{\resitem}[1]{\item #1 \vspace{-2pt}}
\newcommand{\resheading}[1]{\vspace{8pt}
\parbox{\textwidth}{\setlength{\FrameSep}{\outerbordwidth}
\begin{shaded}
\setlength{\fboxsep}{0pt}\framebox[\textwidth][l]{\setlength{\fboxsep}{4pt}\fcolorbox{shadecolorB}{shadecolorB}{\textbf{\sffamily{\mbox{~}\makebox[6.762in][l]{\large #1} \vphantom{p\^{E}}}}}}
\end{shaded}
}\vspace{-5pt}
}
\newcommand{\ressubheading}[4]{
\begin{tabularx}{6.5in}{X<{\cftdotfill{\cftsecdotsep}}@{}r}
\textbf{#1} & #2 \\
\textit{#3} & \textit{#4} \\
\end{tabularx}\vspace{-6pt}}
%-----------------------------------------------------------
\begin{document}
\begin{tabularx}{7in}{Xr}
\textbf{\Large Your Name} & \textbf{\today} \\
Short description of you & E-mail \\
Adress & Homepage \\
\end{tabularx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{Education}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{itemize}
\item \ressubheading{University Name}{City, Country}{BSc, MSc, PhD, or something else}{2009 - 2013}
\begin{itemize}
\resitem{Additional description nr 1}
\resitem{Additional description nr 2}
\end{itemize}
\item \ressubheading{Other University Name}{City, Country}{BSc, MSc, PhD, or something else}{2004 - 2009}
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{Some important section}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
\begin{itemize}
\item First item
\item Second item
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{Awards, Grants \& Honours}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{-2pt}
\begin{center}\begin{tabular*}{6.6in}{l@{\extracolsep{\fill}}r}
\multicolumn{2}{c}{Nobel Prize \cftdotfill{\cftdotsep} 2013}\\
\multicolumn{2}{c}{Big grant \cftdotfill{\cftdotsep} 2010-2013}\\
\vphantom{E}
\end{tabular*}
\end{center}\vspace*{-16pt}
\end{document}
I get the error message:
! Undefined control sequence.
\cftdotfill #1->\def \@tempa
{#1}\def \@tempb {\cftnodots }\ifx \@tempa \@te...
...
\cftdotfill
is part of a table column specification in macro \ressubheading
:
\begin{tabular*}{6.5in}{l@{\cftdotfill{\cftsecdotsep}\extracolsep{\fill}}r}
There it gets expanded via \edef
and breaks because of the assignment that is not executed in an expansion context.
This issue can be fixed by making \cftdotfill
robust:
\usepackage{tocloft}
\usepackage{etoolbox}
\robustify\cftdotfill