# latex error “undefined control sequence” \begin{document}

I am preparing a document in Latex and it shows error "Undefined control sequence" for \begin{document} Here is the code I have tried

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{orange}

\usepackage[scale=0.75]{geometry} % Reduce document margins

\usepackage{fancyhdr}
\begin{document}

Content

\end{document}


In order for moderncv to function properly, it requires you to specify at least \firstname and \lastname within the preamble since these are used to populate the PDF document properties (using hyperref) at the end of the preamble, even though it might not be used within the document (such as your minimal example):

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{classic}
\moderncvcolor{orange}

\usepackage[scale=0.75]{geometry} % Reduce document margins
\usepackage{fancyhdr}

\firstname{First}
\lastname{Last}

\begin{document}

Content

\end{document}