1

Below is the LaTeX code for which I am getting the LaTeX error "missing \begin {document}. How can I resolve this error?

\documentclass[a4paper]{MY CV}

\begin{document}
    Hello!
\end{document}

And this is the error:

Error

Werner
  • 603,163

2 Answers2

1

Do not create your own class file with spaces in them. That is, instead of MY CV.cls, create MYCV.cls and use

\documentclass[..]{MYCV}
Werner
  • 603,163
0
\documentclass[a4paper]{MY CV}

This is not ment to specify your file "MY CV". Instead it should contain something like:

\documentclass[a4paper]{article}

to specify, what type of document you are writing.

Have closer look at some tutorials/instructions :)

Edit: You can actually specify a class like "MY CV" (or "MYCV"), but this does not seem to be the issue...

Edit2: As mentioned by Werner, the "MY CV"-part IS the issue. Changing it to "MYCV" will solve this, if a "MYCV.cls" exists.

dudakl
  • 198
  • What does \documentclass{article article} \begin{document} test \end{document} yield when you compile it? – Werner Aug 31 '16 at 20:38
  • I get the same error-message, as shown in the question above. But I have not tried to write a class file, with a name separated by spaces. – dudakl Aug 31 '16 at 21:08
  • So why would you say "this does not seem to be the issue..." if a space introduced in the name of a document class replicates the error (even if the class does not exist)? – Werner Aug 31 '16 at 21:09
  • The class name "MY CV" looked somewhat like a beginners try on a first latex-document, so i assumed, he needed a more general help.

    Maybe I should not read that much between the lines, but I still have to learn many things on forums, as I am very new too.

    – dudakl Aug 31 '16 at 21:13
  • Thank you both. Yes this was my first attempt at LaTeX and as a matter of fact I didnt know that I also have to create a class file – Mehul Bhatt Sep 01 '16 at 11:32