无法使用最新版本的 TeX Live (2013) 进行编译

无法使用最新版本的 TeX Live (2013) 进行编译

多年来,我一直使用 tex 模板来编写简历。但最近我将所有内容迁移到了运行 OS 10.8.4 的新 Mac 上,文档将无法再编译。我已确认该文件在 OS 10.7.5 上编译良好。我在两台计算机上都使用最新的 MacTex 发行版。

产生的错误是:

! Incomplete \iffalse; all text was ignored after line 113.

第 113 行是第一次使用:

/ressubheading

在此块中:

\documentclass[letterpaper,10pt]{article}
\newlength{\outerbordwidth}
\pagestyle{empty}
\raggedbottom
\raggedright
\usepackage[svgnames]{xcolor}
\usepackage{hyperref}
\usepackage{framed}
\usepackage{tocloft}
\usepackage{textcomp}
\usepackage{hanging}
\usepackage{geometry}
\usepackage{url}
\usepackage{hyperref}
\usepackage{lastpage}
\usepackage{fancyhdr}
\usepackage{color,soul}
\usepackage{framed}


% settings for hyperlinks
\hypersetup{
    bookmarks=true,         % show bookmarks bar?
    unicode=false,          % non-Latin characters in AcrobatÕs bookmarks
    pdftoolbar=true,        % show AcrobatÕs toolbar?
    pdfmenubar=true,        % show AcrobatÕs menu?
    pdffitwindow=false,     % window fit to page when opened
    pdfstartview={FitH},    % fits the width of the page to the window
    pdftitle={My Title},    % title
    pdfauthor={Me},     % author
    pdfsubject={Subject},   % subject of the document
    pdfcreator={Creator},   % creator of the document
    pdfproducer={Producer}, % producer of the document
    pdfkeywords={keywords}, % list of keywords
    pdfnewwindow=true,      % links in new window
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor=red,          % color of internal links
    citecolor=green,        % color of links to bibliography
    filecolor=magenta,      % color of file links
    urlcolor=blue           % color of external links
}


%-----------------------------------------------------------
%Edit these values as you see fit

\setlength{\outerbordwidth}{2.5pt}  % 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.9}  % 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.0in}
\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{-7pt}
}
\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}

%%%%%%%%%%%%%%%%%%footer settings
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot[L]{\footnotesize \hspace{0.5in}J. A. Smith}
\fancyfoot[C]{\footnotesize \textit{Curriculum Vitae}}
\fancyfoot[R]{\footnotesize Page \thepage\ of 1 \hspace{0.5in}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%%%%%%%%%%%%%%%%%%end footer settings

\begin{tabular*}{7in}{l@{\extracolsep{\fill}}r}
\textbf{\Large Joeseph A. Smith}\\
Assistant Professor -- Department of Biological Sciences\\
Curator of Mammals -- Museum of Natural Science\\
\url{http://www.foo.edu/Smith} & \href{mailto:[email protected]}{\nolinkurl{[email protected]}}
\end{tabular*}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\resheading{Education}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{itemize}
    \item
        \ressubheading{University of Foo}{Foo}{Ph.D. Ecology \& Evolutionary Biology}{2010}
        \begin{itemize}
            \resitem{Dissertation Title: blah blah}
    \end{itemize}

    \item
    \ressubheading{Boo State University}{Boo}{B.S. Biology}{2000}
\end{itemize}


\end{document}    

很难相信这是代码问题(尽管错误表明了这一点),因为它在早期操作系统上编译得很好,但我对自定义 tex 文档不是很有经验。提前感谢任何帮助!

答案1

的最新版本tocloft已经重新定义,\cdotfill但其定义似乎与您在 中的用法不一致\ressubheading

我真的不知道你用它做什么,但无论如何,这里有两个修复方法:

  1. \usepackage{array}在序言中(这是有效的,因为表格序言不再受扩展)

  2. \protect\cftdotfill在定义中\ressubheading(可达到相同的结果)

但是如果我使用

\begin{tabular*}{6.5in}{l@{\extracolsep{\fill}}r}

我得到了相同的结果。

相关内容