1

Here's my code:

\documentclass{12pt}{article}
\usepackage{amssymb,amsmath,latexsym}
\begin{document}
\title{Assignment-1}
\date{\today}
\author{xyz}
\maketitle
\tableofcontents
\newpage
\section{ODE}
Hello
\subsection{Maths}
\subsubsection{Hello}
\section{Paragraph-2}
\subsection{stats}
$$a^2+b^2=c^2$$
\end{document} 

The error I keep getting:

Command Line: pdflatex.exe --interaction=errorstopmode --synctex=-1 "one.tex" Startup Folder: C:\Users\xyz\Desktop

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6930) entering extended mode (one.tex LaTeX2e <2018-12-01>

! LaTeX Error: File `12pt.cls' not found.

Type X to quit or to proceed, or enter new name. (Default extension: cls)

Enter file name:

I am new to this, please answer in a detailed manner.

  • Welcome to TeX.SE. It is preferible to use \[ ... \] for displayed equations instead of $$ ... $$: see this link: tex.stackexchange.com/questions/503/why-is-preferable-to – Sebastiano Mar 11 at 21:11
  • 1
    Could be your installation of MiKTeX is faulty. Because you are using an older version have you considered to update your MiKTeX? I recommend it. – Mensch Mar 11 at 21:13
5

The fix here should be simple. Use

\documentclass[12pt]{article}

instead of

\documentclass{12pt}{article}

Note the use of [12pt] as an optional argument to the \documentclass command, rather than your supply of {12pt} - a mandatory argument.

  • Thanks for quick response. Now I am getting a warning saying AcroRd32.exe "C:\Users\xyz\Desktop\one.pdf" – M.M. Mar 11 at 21:26
  • 2
    @M.M.: That sounds like a setup issue with your editor, not (La)TeX. – Werner Mar 11 at 21:36

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.