2

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}
1

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):

enter image description here

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.