Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I downloaded a CV Template. It got succesfully compiled in ShareLaTeX and WriteLaTeX. But In my TeXLive Distribution, I am getting errors.

Here is the code:

% (c) 2002 Matthew Boedicker <mboedick@mboedick.org> (original author) http://mboedick.org
% (c) 2003-2007 David J. Grant <davidgrant-at-gmail.com> http://www.davidgrant.ca
% (c) 2008 Nathaniel Johnston <nathaniel@nathanieljohnston.com> http://www.nathanieljohnston.com
%
% (c) 2012 Scott Clark <sc932@cornell.edu> 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}
\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{tabular*}{6.5in}{l@{\cftdotfill{\cftsecdotsep}\extracolsep{\fill}}r}
        \textbf{#1} & #2 \\
        \textit{#3} & \textit{#4} \\
\end{tabular*}\vspace{-6pt}}
%-----------------------------------------------------------


\begin{document}

\begin{tabular*}{7in}{l@{\extracolsep{\fill}}r}
\textbf{\Large Your Name} & \textbf{\today} \\
Short description of you & E-mail \\
Adress & Homepage \\
\end{tabular*}
\\


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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}

The errors I get are :

--TeX said--
\cftdotfill #1->\def \@tempa
{#1}\def \@tempb {\cftnodots} \ifx \@tempa .... l.77

--TeX said--
<inserted text>
\inaccesible
l77

enter image description here enter image description here

share|improve this question
    
This question appears to be off-topic because the problem seems too localized and can not be reproduced in another standard LaTeX distribution. –  Masroor Apr 21 at 5:38
    
@MMA: I get the same error. –  Heiko Oberdiek Apr 21 at 6:11
    
@subhamsoni Please insert the errors as text so that others with the same problem can find this question through searching. –  doncherry Apr 21 at 9:31

2 Answers 2

up vote 6 down vote accepted

There are better ways to obtain fixed-width tabulars - 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):

enter image description here

% (c) 2002 Matthew Boedicker <mboedick@mboedick.org> (original author) http://mboedick.org
% (c) 2003-2007 David J. Grant <davidgrant-at-gmail.com> http://www.davidgrant.ca
% (c) 2008 Nathaniel Johnston <nathaniel@nathanieljohnston.com> http://www.nathanieljohnston.com
%
% (c) 2012 Scott Clark <sc932@cornell.edu> 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}
share|improve this answer

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.