Error: missing \ begin {document} in LaTeX

I have an error in my LaTeX document when running my file, there is an error

! LaTeX Error: Missing \begin{document}. 

and this \begin{document} tag exists in my code

 \documentclass[12ptโ€Ž, โ€Ža4paper]{article}โ€Ž \usepackage{graphicx} % inserting images \usepackage[top=3cm,right=3cm,bottom=2.5cm,left=2.5cm]{geometry} \usepackage[colorlinks,linkcolor=blue,citecolor=red]{hyperref} \usepackage{multirow} \usepackage{subfig} \usepackage{algorithm} \usepackage{algorithmic} %\usepackage[utf8]{inputenc} %\usepackage{color, pdfcolmk} %\usepackage{sweave} % setting the margins of page \usepackage{xepersian} \usepackage{setspace} \settextfont[Scale=1.2]{XB Zar} \setlatintextfont[Scale=1.1]{XB Zar} \setdigitfont{XB Zar} \setcounter{secnumdepth}{3} \SepMark{-} \DefaultMathsDigits %-----------------------list------------------------------------- \renewcommand{\listfigurename}{ูู‡ุฑุณุช ุดฺฉู„ ู‡ุง} \renewcommand{\listtablename}{ูู‡ุฑุณุช ุฌุฏูˆู„โ€Œู‡ุง} \renewcommand{\refname}{\rl{{ู…ุฑุฌุนโ€Œู‡ุง}\hfill}} %---------------------end list------------------------------------- %\usepackage{geometry}\geometry{left=35mm,right=35mm, top=30mm,bottom=30mm} \begin{document} \pagenumbering{gobble} \clearpage \thispagestyle{empty} 
+1
latex
source share
1 answer

When I copy the code you specified here to Notepad ++ with UTF-8 input encoding, I get the following result for the first line:

 \documentclass[12pt?, ?a4paper]{article}? 

From this, I assume that you have characters other than UTF-8 that are not recognized by LaTeX and thus cause an error. Try replacing this line with

 \documentclass[12pt, a4paper]{article} 

As @nowox noted in the comment, \end{document} missing. Make sure you have this in your file.

+1
source share

All Articles