由于额外的对齐标签,恢复不编译

由于额外的对齐标签,恢复不编译

我是 LaTeX 的新用户,目前正在使用 ShareLatex 上的模板创建简历。我更改了一些内容,现在出现编译错误。编译器应该是 XeLaTeX

\documentclass[a4paper,10pt]{article}

%A Few Useful Packages
\usepackage{marvosym}
\usepackage{fontspec}                   
%for loading fonts
\usepackage{xunicode,xltxtra,url,parskip}   %other packages for formatting
\RequirePackage{color,graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[big]{layaureo}              %better formatting of the A4 page
% an alternative to Layaureo can be ** \usepackage{fullpage} **
\usepackage{supertabular}               %for Grades
\usepackage{titlesec}                   %custom \section

%Setup hyperref package, and colours for links
\usepackage{hyperref}
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}

%FONTS
\defaultfontfeatures{Mapping=tex-text}
%\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}
%%% modified for Karol Kozioł for ShareLaTeX use


%CV Sections inspired by: 
%http://stefano.italians.nl/archives/26
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
%Tweak a bit the top margin
%\addtolength{\voffset}{-1.3cm}

%Italian hyphenation for the word: ''corporations''
\hyphenation{im-pre-se}

%-------------WATERMARK TEST [**not part of a CV**]---------------
\usepackage[absolute]{textpos}

\setlength{\TPHorizModule}{30mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{2mm}{0.65\paperheight}
\setlength{\parindent}{0pt}

%--------------------BEGIN DOCUMENT----------------------
\begin{document}

%WATERMARK TEST [**not part of a CV**]---------------
%\font\wm=''Baskerville:color=787878'' at 8pt
%\font\wmweb=''Baskerville:color=FF1493'' at 8pt
%{\wm 
%   \begin{textblock}{1}(0,0)
%       \rotatebox{-90}{\parbox{500mm}{
%           Typeset by Alessandro Plasmati with \XeTeX\  \today\ for 
%           {\wmweb \href{http://www.aleplasmati.comuv.com}{aleplasmati.comuv.com}}
%       }
%   }
%   \end{textblock}
%}

\pagestyle{empty} % non-numbered pages

\font\fb=''[cmr10]'' %for use with \LaTeX command
\section{Work Experience}
\begin{tabular}{r|p{11cm}}
 Current & Lab Consultant at x University\\Sep. 2016 &
\footnotesize{Ensured printers were all working and were filled. 
Ensured labs were clean. 
Provided technical assistance to students, and faculty when needed.}\\\multicolumn{2}{c}{} \\
 \textsc{Sep. 20xx-Aug. 20xx} & Teaching Assistant at x\\&
\footnotesize{Helped students who were having trouble with the subject matter.
 Ensured that all students were focused on their work. Ensured that students got the correct work.
 Ensured all work was returned to students in a timely manner.}\\\multicolumn{2}{c}{} \\
\end{tabular}

\section{Education}
\begin{tabular}{r|}
\textsc{Jun. 20xx-Apr. 20xx} & x Program\\&
\footnotesize{Studied logic, mathematical proofs, induction, graph theory, probability, 
combinatorics and discrete mathematics. Also studied sorting algorithms, divide and conquer algorithms, 
greedy algorithms, dynamic programming, network flows and NP completeness.}\\\multicolumn{2}{c}{} \\
\textsc{Sep. 20xx-Jun. 20xx} & High School\\& 
\footnotesize{x Cum Laude | GPA: x.0/4 }\\\multicolumn{2}{c}{} \\
\end{tabular}
\end{document}

答案1

嗯,您在第二个表中错误发送了第二个参数r(或l或)。c

只需添加r到行(或在您的情况下更好p{11cm}):

\begin{tabular}{r|}

要得到

\begin{tabular}{r|p{11cm}}

完整的 MWE(印刷得有点漂亮)

\documentclass{article}
\begin{document}

\begin{tabular}{r|p{11cm}}
Current   & Lab Consultant at x University\\
Sep. 2016 & \footnotesize{Ensured printers were all working and were filled. 
            Ensured labs were clean. Provided technical assistance to 
            students, and faculty when needed.}\\
\multicolumn{2}{c}{} \\
\textsc{Sep. 20xx-Aug. 20xx} & Teaching Assistant at x\\
          & \footnotesize{Helped students who were having trouble with 
            the subject matter.  Ensured that all students were focused 
            on their work. Ensured that students got the correct work.
            Ensured all work was returned to students in a timely manner.}\\
\multicolumn{2}{c}{} \\
\end{tabular}

\section{Education}
%\begin{tabular}{r|}
\begin{tabular}{r|p{11cm}} % <================================================
\textsc{Jun. 20xx-Apr. 20xx} & x Program\\
         & \footnotesize{Studied logic, mathematical proofs, induction, 
           graph theory, probability, combinatorics and discrete 
           mathematics. Also studied sorting algorithms, divide and 
           conquer algorithms, greedy algorithms, dynamic programming, 
          network flows and NP completeness.}\\
\multicolumn{2}{c}{} \\
\textsc{Sep. 20xx-Jun. 20xx} & High School\\
         & \footnotesize{x Cum Laude | GPA: x.0/4 }\\
\multicolumn{2}{c}{} \\
\end{tabular}
\end{document}

pdf 中的结果:

![在此处输入图片描述

相关内容