7

I was given some files to update. They were produced in late 1990s and seemed to be related to LaTeX. However, I could not compile them at all. To begin with, there is no \begin{} or \end{}. In addition, the table is very different from what I usually use. One example is listed below. My questions are as follows. Thank you!

1—What is this file, please? LaTeX or some earlier version?

2—How to compile it with TeXmaker, please?

3—Is there a quick way to convert this into the commonly used LaTeX file, please?

\magnification=1095
\baselineskip=14pt
\vfuzz=10pt
\hfuzz=5pt
\vsize=24truecm
\nopagenumbers
\font\bggf=cmr12 at 14pt
\font\bgf=cmr12
\font\bgff=cmbx12


\input psfig.sty


\headline={\ifnum\pageno>1
{\tenrm \hfill TITLE; \hfil Page \folio}
\else\hfil SUBJECT CODE\fi}

\centerline {\bggf UNIVERSITY}
\centerline {\bggf SCHOOL}
\medskip
\centerline {\bgff SUBJECT}
\centerline {\bgf (SUBJECT CODE)}
\centerline {\bf TITLE}

\bigskip

\item{1.} 

\medskip

\centerline{TABLE OF SOMETHING}
\smallskip
\moveright 1.0in \vbox{\hsize=4in
\settabs 5 \columns
\+&&&\hfil Values of $Y$ \hfil&\cr
\kern -6pt
\+\hfil Values \hfil&\cr
\kern -6pt
\+\hfil \ \ of $X$: \hfil&\vrule height 14pt depth 6pt&\hfil 0 \hfil&\hfil 1 \hfil&\hfil 2 \hfil&\cr
%\smallskip
\hrule
\smallskip
\kern -3pt
\+\hfil  \hfil&\vrule height 14pt&\hfil   \hfil&\hfil  \hfil&\hfil  \hfil&\cr
\+\hfil  \hfil&\vrule height 14pt&\hfil   \hfil&\hfil  \hfil&\hfil  \hfil&\cr
\+\hfil  \hfil&\vrule height 14pt depth 4pt&\hfil  \hfil&\hfil  \hfil&\hfil  \hfil&\cr
}

\itemitem{(a)} 
\itemitem{(b)} 
\itemitem{(c)} 
\itemitem{(d)} 
\itemitem{(e)} 
\itemitem{(f)} 

\medskip

\item{2.} 
\item{} 

\vfill\eject
\bye
  • 2
    You should compile it with TeX, not LaTeX. – Werner Feb 10 '15 at 4:11
  • It is a .tex file written in plain TeX. Compile it as pdftex file (file is the file name). Conversion.... Write it new in LaTeX. – user11232 Feb 10 '15 at 4:12
  • @Werner What do you mean? How to do it anyway? Never used TeX before. – LaTeXFan Feb 10 '15 at 4:12
  • @HarishKumar There is no pdftex in texmaker at all. Where to find such thing, please? – LaTeXFan Feb 10 '15 at 4:14
  • 2
    There is a question on the history of TeX/LaTeX here – corporal Feb 10 '15 at 4:43
12

The text is written in the TeX format "plain". It's the very old format, provided by Knuth. Also the file loads package psfig. Neither TeX Live nor MiKTeX do not have this package anymore, thus it needs to be downloaded from CTAN, see this link. Since nowadays there are better packages for graphics inclusion, see package graphicx that can also be used in plain TeX with the help of miniltx, I would not bother to install psfig, but copy the file psfig.sty in the working directory alongside the old plain TeX files from your university. Then the compile sequence (command line) would be:

tex oldtexfile.tex
dvips oldtexfile
ps2pdf oldtexfile

If the old TeX file does not need psfig as in the example of the question, then it can be removed or the line commented:

% \input psfig.sty

Then the example can directly compiled to PDF via pdftex:

pdftex oldtexfile.tex

IMHO the example of the question does not show much worth for preserving. Therefore, I would rewrite the file in LaTeX with better typography. For example, the table could be set with booktabs the following way:

\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\usepackage{caption}
\begin{document}
  \begin{table}
    \centering
    \caption{Table of something}
    \begin{tabular}{cccc}
      \toprule
      & \multicolumn{3}{c}{Values of $Y$} \\
      \cmidrule{2-4}
      Values of $X$ & 1 & 2 & 3 \\
      \midrule
      \dots & \dots & \dots & \dots \\
      \bottomrule
    \end{tabular}
  \end{table}
\end{document}

Result for table

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.