当我在文档中添加了几行常规文本后,我尝试编译它以查看它是什么样子。突然,它停止正确编译并给我一个错误!LaTeX Error: Missing \begin document
,当我跳过所有警告时,它只给我一个没有文本的方程式的 pdf。我已经尝试了在论坛中找到的一些提示,它已经用 utf-8 编码了。我还问了一个朋友他是否能帮我,他告诉我它也没有在他的计算机上正确编译,但他设法获得了一个正确的 pdf。但当我尝试使用不同的编译器(在线和离线)时,我无法获得正确的 pdf。`
\documentclass[12pt,a4paper,oneside]{report}
\usepackage{multirow}
\usepackage[english,french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{shadow}
\usepackage{epsfig}
\usepackage{subfig}
\usepackage{svrsymbols}
%
\usepackage[usenames]{color}
\usepackage[toc,page]{appendix}
\usepackage{hyperref}
%
%\setmarginsrb{2cm}{2cm}{2cm}{2cm}{1cm}{1cm}{1cm}{1cm}
%
\definecolor{jd_blue0}{rgb}{0.51,0.34,1.00}
\definecolor{jdbishop}{rgb}{0.27,0.14,0.29}
\definecolor{jddarkbl}{rgb}{0.18,0.14,0.29}
\definecolor{jd_brown}{rgb}{0.29,0.14,0.14}
\definecolor{jd_green}{rgb}{0.00,0.14,0.14}
\definecolor{jdorange}{rgb}{1.00,0.55,0.00}
\definecolor{jdredred}{rgb}{0.50,0.00,0.00}
%
\setlength{\parskip}{0.2cm} %space between paragraphs
\setlength{\parindent}{0.7cm} %shift into the right at the beginning of P.
%
\setlength{\fboxrule}{0.05cm} %line thickness for the frames
\setlength{\fboxsep}{0.20cm} %spacing between frames and formulae
\addtolength{\topmargin}{-0.5cm}
\addtolength{\textwidth}{2.5cm}
\addtolength{\textheight}{2.0cm}
\addtolength{\oddsidemargin}{-1.5cm}
\renewcommand{\baselinestretch}{0.90}
%\pagestyle{empty}
%\pagestyle{plain}
\pagestyle{myheadings}
\markright{Name, "Title"}
\setcounter{chapter}{0} % to start with the chapter no 1
\setcounter{page}{1} % to start with the page number
\setcounter{figure}{0} % to start the numbering of figures
\def\ds{\displaystyle}
\def\sty{\scriptstyle}
\def\Vec{\overrightarrow}
\def\vep{\varepsilon}
\def\E{ {\mathcal{E}}}
\def\F{ {\mathcal{F}}}
\def\H{\hat{\mathcal{H}}}
\def\M{\hat{\mathcal{M}}}
\def\N{\hat{\mathcal{N}}}
\def\P{\hat{\mathcal{P}}}
\def\R{ {\mathcal{R}}}
\def\T{\hat{\mathcal{T}}}
\def\K{\hat{\mathcal{K}}}
\def\U{\hat{U}}
\def\ap{{\hat{a}}^{\,+}}
\def\am{{\hat{a}}^{\, }}
\def\etap{{\hat{\eta}}^{\,+}}
\def\etam{{\hat{\eta}}^{\, }}
\def\be{\boldmath\begin{equation}}
\def\ee{\end{equation}\unboldmath}
\def\beq{\boldmath\begin{eqnarray}}
\def\eeq{\end{eqnarray}\unboldmath}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
...
这是从开头到结尾的所有代码\begin{document}
。我还尝试过移动文档中的包,但没有成功。谢谢。
编辑:这是 .log 文档
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=latex 2018.10.13) 7 MAY 2020 21:08
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**Template.tex
(./Template.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 .
..
?
! Interruption.
\GenericError ...
\endgroup
l.1 .
..
? x
Here is how much of TeX's memory you used:
5 strings out of 492983
138 string characters out of 6134921
53951 words of memory out of 5000000
3671 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
5i,0n,4p,21b,14s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.