0
/NeedsTexFormat{Latex2e} [1994/12/01]
/documentclass[draft]{article}
/usepackage{ams math,amsthm}
/usepackage{graphicx} 
/begin{document}
/begin{figure}
/begin{center} {/includegraphics{graf2.jpg}
/caption{the signal $fx$} /label{fig1}}
/end{center} 
/end{figure}

This is working but it is not showing in (dvi file or pdf file)

1
  • 2
    erh, you should use \ not / for the commands and what exactly do you mean by is working? I would not even add \NeedsTexFormat{Latex2e}[1994/12/01]
    – daleif
    Jul 27, 2021 at 8:40

1 Answer 1

1

Assuming that / actually stands for \, the error you get is

! Undefined control sequence.
l.1 \NeedsTexFormat
                   {Latex2e} [1994/12/01]

TeX is case sensitive and the right command name is

\NeedsTeXFormat{LaTeX2e}

Fixed version:

\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\documentclass[draft]{article}
\usepackage{amsmath,amsthm}
\usepackage{graphicx}

\begin{document}

\begin{figure}
\centering

\includegraphics{graf2.jpg}

\caption{The signal $fx$} \label{fig1}

\end{figure}

\end{document}

On the other hand, the first line is essentially useless. Keep it, if you prefer, but removing it does no harm at all.

Note that you have redundant braces and that center should not be used in the figure environment.

The picture will not show anyway, because you have the document class option draft. Remove it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .