huwan / WanHuCV

LaTeX Template for Curriculum Vitæ 个人中英文简历 LaTeX 模板
90 stars 31 forks source link

[English version]Always 'Latex Error: Missing \begin{document}‘. #1

Closed PetersonLian closed 9 years ago

PetersonLian commented 9 years ago

总是会有以上错误。我不知道该用何来编译。 我用pdftex,总是会发现很多语法解析错误; 我用pdflatex,总是出现上述错误。 中文版本更是不敢编译。(因为我很早之前第一次fork你这个repo的时候,我就当初编译英文版成功、中文版失败。这期间,我重装了系统。现在两个版本都不行)。 我的环境ubuntu 14.04 bit 32. tex环境,我是直接:sudo apt-get intall texlive.用的texlive. 多谢!

huwan commented 9 years ago

应该使用XeLaTeX来编译。texlive 以前试过,应该没什么问题。字体也先装一下。 见 https://github.com/mengyingchina/WanHuCV#%E4%BD%BF%E7%94%A8

PetersonLian commented 9 years ago

谢谢解答。
不再出现'Latex Error...‘这个错误了。
不过,目前遇到的错误是,找不到fontawesome。
按照你提供的链接https://github.com/mengyingchina/WanHuCV#%E4%BD%BF%E7%94%A8 。
引用你的原话

安装其中的fontawesome字体,解压moderncv,并将fontawesome.sty、以及要编译的简历TeX文件直接放到moderncv目录,编译即可

所谓的"安装其中的fontawesome字体"这动作我简单理解为是“将fontawesome.sty文件放到moderncv目录下”,结果我按照这个操作就出现了我的“找不到fontawesome”的错误。 所以,我想问,是否“安装fontawesome字体”另有所指,等安装完成了,再复制一个fontawesome.sty到moderncv目录下。
另外,我根据你提供的fontawesome链接,我下载解压了一个文件夹fontawesome.tds。
还有,我试着tlmgr install fontawesome,结果"xzdec: (stdin): Unexpected end of input "
万分抱歉我的无知。真心期待你能花费下宝贵时间指点下。

huwan commented 9 years ago

fontawesome 链接 里的字体文件为FontAwesome.otf,下载下来后直接双击安装就行。fontawesome.sty 我已经放进去了,不需要再放过去了。PS:fontawesome 只是一些图标。如果不需要可以删除,不过需要改的有点多。

PetersonLian commented 9 years ago

用xelatex,现报错

! LaTeX Error: File `titlesec.sty' not found.

huwan commented 9 years ago

应该是主tex文件中引用了CTeX的问题。

\usepackage[adobefonts,noindent]{ctex} %中文支持 \setCJKmainfont{SimSun}

你看看是不是这个问题,你那个错误提示太短了。

PetersonLian commented 9 years ago

应该不是你说的这个问题。因为我这个报错是我在编译(xelatex)你英文简历时候出来的问题。
当我试着去编译你中文简历,则如下报错

! LaTeX Error: File `etoolbox.sty' not found.

更具体输出

This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) restricted \write18 enabled. entering extended mode (./WanHu-CV-ZH.tex LaTeX2e <2011/06/27> Babel <3.9h> and hyphenation patterns for 2 languages loaded. (./moderncv.cls Document Class: moderncv 2013/04/29 v1.5.1 modern curriculum vitae and letter d ocument class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo) ! LaTeX Error: File `etoolbox.sty' not found. Type X to quit or to proceed, or enter new name. (Default extension: sty)

思来想去,估计就是我整个环境某个问题。
想来,继续自行研究latex去,当我法则烂熟于胸之时,就能自行解决了吧。
真是烦,想做个自行车,还要自行研究怎么炼钢。烦。啥也不懂,他人的二手车拿来却是不会改装。