0

I am trying to TeX the following on texmaker in linux, however I'm running into errors, mainly for the first line. However I have pictex already downloaded. I used the default Quick Build in texmaker. I included the errors I got below as well.

I just need help trying to make this work.

\input pictex\magnification=\magstep1\nopagenumbers
\centerline {
\beginpicture
\setcoordinatesystem units <0.45 truein, 1.5 truein>
\setplotarea x from -5 to 5, y from  0 to 1.0
\axis bottom
ticks numbered from -5 to 5 by 1
/
\plot "Normal.txt"
\plot -5.2 0 -5.1 0 -5.1 1  -5.2 1 /
\put {0} [cr] at -5.3 0
\put {$\frac{1}{\sqrt{2\pi}}$} [cr] at -5.3 1
\put {\sl Standard Normal Histogram} at 0 1.2
\sethistograms
\plot "HistogramData.txt"
\endpicture}\vfill\end

These are the errors

David Carlisle
  • 757,742
  • 1
    You need to build with plain TeX as opposed to LaTeX. By the way, AMS-TeX isn't relevant to that code. – egreg Feb 08 '22 at 23:44
  • 1
    Welcome to tex,sx, Ordinarily, compiling with amstex starts with a \documentstyle and requires a preloaded format. amsppt.sty is the only one I'm familiar with, and I haven't used it for years. – barbara beeton Feb 08 '22 at 23:46
  • I'm sorry: I have no HistogramData.txt file, so I can't run a full try. Do you mind providing a sample? – jarnosc Feb 09 '22 at 18:58
  • see also https://tex.stackexchange.com/a/73825/52679 – jarnosc Feb 09 '22 at 22:20
  • basically: add %&pdftex as the first line and it should run, provided you have your data in your txt files; \frac{}{} is a LaTeX, not a Plain construction; and AMSTeX has nothing to do with this problem, as egreg has pointed out. – jarnosc Feb 09 '22 at 22:39

1 Answers1

2

It looks as if TeXmaker is calling either LaTeX or PDFLaTeX to process your file. To force the engine to use Plain PDFTeX simply add

%&pdftex

\input pictex\magnification=\magstep1\nopagenumbers \centerline { ... \endpicture}\vfill\end

Beware as well that the \frac{}{} command is a LaTeX construct; replace it with the Plain

${1}\over{\sqrt{2\pi}}$

I don't know your data, so I can't guarantee that it will plot correctly.

jarnosc
  • 4,266