LaTeX 错误:缺少 \begin{document}

LaTeX 错误:缺少 \begin{document}

当我写了\begin{document} 但它给了我错误我该怎么办?

您可以在下面看到我的模板:

\documentclass{res}‎ 
‎\newsectionwidth{0pt}  
‎\setlength{\textheight}{10.2in} 
‎\topmargin=-.5in     
‎\oddsidemargin=-.5in   

‎\begin{document}‎
‎\newdimen\boxrulethickness\newdimen\boxaroundhmargin\newdimen\boxaroundvmargin‎
‎\boxrulethickness=.5pt        
‎\boxaroundhmargin=35pt   
‎\boxaroundvmargin=40pt        

‎\hsize=7.5in
‎\newbox\MACboxA  \newdimen\MACdimenA‎

‎\def\borderandboxit#1#2#3{\vbox{\hrule height#2\hbox{\vrule width#2\hskip#1\hskip-#2%‎
  ‎\vbox{\vskip#1\relax#3\vskip#1}\hskip#1\hskip-#2\vrule width#2}\hrule height#2}}‎
%
‎\long\def\boxaround#1{\vskip6pt‎
  ‎{\MACdimenA=\hsize \advance\MACdimenA by-\boxaroundhmargin‎
   ‎\advance\MACdimenA by-\boxaroundhmargin  
   ‎\setbox\MACboxA=\hbox to \hsize{\hskip\boxaroundhmargin
                     ‎\vbox{\hsize=\MACdimenA‎
                           ‎\vskip\boxaroundvmargin #1‎
                           ‎\vskip\boxaroundvmargin}\hss}%‎
   ‎\borderandboxit{0pt}\boxrulethickness{\box\MACboxA}}%‎
  ‎\vskip2pt plus0pt minus0pt‎
}


‎\boxaround{ 

‎\name{MATTHEW M‎. ‎PARKER\\[12pt]}‎
‎\address{\bf Present Address\\2174 Seventh Street\\Troy‎, ‎NY 12180\\‎
        ‎(518) 272-4460}‎ 
‎\address{\bf Permanent Address\\241 Park Avenue\\‎
         ‎New York‎, ‎NY 01810\\ (212) 742-4937}‎


‎\begin{resume}‎

‎\section{\sl  Objective}  

‎A  summer  position  in the field of Mechanical Engineering‎, ‎with‎ 
‎emphasis on Automation/Robotics‎ 

‎\section{\sl  Education}‎
‎Rensselaer Polytechnic Institute‎, ‎B.S.‎,  ‎Mechanical  Engineering‎, 
‎expected December 1990‎ 

‎Bronx High School of Science‎, ‎Graduated with Honors‎, ‎June 1987‎ 

‎\section{\sl  Related Experience}‎
‎\begin{ncolumn}{2}‎
‎{\it Student Production Engineer}  &   5/89-12/89‎ 
‎\end{ncolumn}\\‎
‎RCA‎ - ‎Missile and Surface Radar Division‎, ‎Moorestown‎, ‎NJ \\‎
‎Involved  in  prototyping  and design of a vision guided robotics‎ 
‎workcell‎. ‎Generated robotic workcell equipment planning diagrams‎, 
‎software  specifications‎, ‎and integration schematics‎. ‎Using a CAD‎ 
‎system‎,  ‎designed  end-effectors‎,  ‎fixtures‎,  ‎and  parts   trays‎. 
‎Developed  communication  protocols between the vision system and‎ 
‎the robots‎, ‎and  prototyped  software  to  control  the  assembly‎ 
‎process of the workcell‎, ‎which in its entirety includes 2 robots‎, 
‎vision  system‎,  ‎conveyor  system‎,  ‎tray  feeders‎,  ‎and   various‎ 
‎sensors‎. 

‎\begin{ncolumn}{2}‎ 
‎{\it Industrial Engineering Trainee} &  5/88-8/88‎ 
‎\end{ncolumn}\\‎
‎Mattel Toys‎, ‎Hawthorne‎, ‎CA \\‎
‎Analyzed  the  computing  needs  of  the  Industrial  Engineering‎ 
‎department‎,  ‎interviewed  prospective  vendors‎,  ‎evaluated  their‎ 
‎computer  hardware  and  software  products‎,  ‎and recommended the‎ 
‎system  that  best  met  the  department's   requirements‎.   ‎Also‎ 
‎developed  a software program to graphically systemize production‎ 
‎line flow charts and trained engineers and technicians to use the‎ 
‎various software‎. 

‎\begin{ncolumn}{2}‎
‎{\it Structural Engineering Trainee} & 5/87-8/87‎
‎\end{ncolumn}\\‎  
‎S.L.N‎. ‎\& Associates‎, ‎New York‎, ‎NY \\‎
‎Developed  user  friendly  software  programs  to  perform  Slope‎ 
‎Stability Analysis and  Retaining  Wall  Stability  Analysis  and‎ 
‎performed   on-site  inspections  to  monitor  the  stability  of‎ 
‎retaining walls‎. 

‎\section{\sl  Other Experience}‎
‎Pool Attendant‎, ‎Bronx  High  School  of  Science  Swimming  Pool‎, 
‎1985-87‎ 

‎\section{\sl  Honors}‎
‎Dean's List of Distinguished Students \\‎
‎National Honor Society‎ 

‎\section{\sl  Activities}‎
‎Model United Nations Club \\‎
‎Water Polo Club \\‎
‎Rensselaer Christian Community \\‎
‎Campus Life Committee \\‎
‎Intramural Softball‎, ‎Volleyball \\‎
‎Other interests include‎: ‎Squash‎, ‎Sailing‎, ‎Cycling‎, ‎and Reading‎ 


‎\end{resume}‎

‎\vfill}

‎\end{document}‎

答案1

我有时会遇到相同的错误。它通常发生在由于实际代码错误(例如缺少$或)导致 latex 编译失败之后}。我发现从保存 .tex 文件的文件夹中删除 .aux、.blg、.log、.synctex 和 .tex.bak 文件,然后在 .tex 文件上重新运行 latex 似乎可以解决问题。完全相同的 latex 代码 - 没有错误。

我不知道错误来源或我删除的文件实际上做了什么 - 只是经验观察,这个解决方案帮我解决了问题。我在 XP 上使用 WinEdt 6 和 MikTex 2.8

在将您的代码复制并粘贴到我的编辑器中后,删除出现的所有?之后,您提供的代码就可以正常工作了。

您可能还需要考虑删除所有个人信息并将其替换为虚拟文本。

希望这有帮助,祝你好运。

答案2

代码U+200E LEFT-TO-RIGHT MARK中每一行都包含不可见的“字符”。教你的编辑器删除这些。

相关内容