latex审阅模式出现Missing \begin{document}错误

4 篇文章 0 订阅

项目场景:

windows 10中使用latexdiff生成审阅版本tex文件

问题描述:

latex生成审阅版本的.tex文件编译过程中出现Missing \begin{document},出现该错误并不一定说明你的.tex文件缺少\begin{document},而是说明你的\begin{document}之前出现了一些编辑器(我用的是WinEdt)不认识的字符

@Override
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=pdflatex 2020.9.16)  20 OCT 2020 11:06
entering extended mode
**C:/Users/HP/Desktop/article3/MarkRevision20201020/MarkedRevision20201020.tex
(C:/Users/HP/Desktop/article3/MarkRevision20201020/MarkedRevision20201020.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for loaded.

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.1? - -   c o d i n g :   U T F - 8   - - 
? 
! Emergency stop.
 ...                                              
                                                  
l.1? - -   c o d i n g :   U T F - 8   - - 
You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

解决方案:

在确认文件中没有乱码出现的情况下,在文本编辑器(我用的是utraEdit)中重新打开,复制重新粘贴到一个新的空白的.tex文件中即可。个人认为原因是windows系统写入生成的diff文件与winEdt的字符不兼容造成的,mac电脑和linux系统应该不会出现这种问题。

注意细节:

  • 生成为文献需要屏蔽掉这一句方可通过编译
%\RequirePackage[normalem]{ulem} %DIF PREAMBLE
  • 6
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值