My professor gave me a template which I compiled but it gave me lots of errors.
The code is:
\documentclass[12pt]{article}
\usepackage{rotating,graphics,psfrag,epsfig}
\usepackage{graphicx}
\usepackage{color}
\usepackage{latexsym}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage[T1]{fontenc}
\usepackage{multicol}
\usepackage[dvipdfm]{hyperref}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{lastpage}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{marvosym}
\newcommand{\ff}{Marzo del 2007}
\renewcommand{\headrulewidth}{0.0pt}
\renewcommand{\footrulewidth}{0.4pt}
%\usepackage[thickspace]{SIunits}
\usepackage[a]{esvect}
\usepackage{shortlst}
\usepackage{marvosym}
\usepackage[version=3]{mhchem}
\newcommand{\solucion}{\noindent\textbf{Soluci\'on}}
\newcommand{\comentario}{\noindent\textbf{Comentario}}
\newcommand{\nota}{\noindent\textbf{Nota}:}
\newcommand{\suge}{\noindent\textbf{Sugerencia}:}
\newcommand{\analisis}{\noindent\textbf{An\'alisis}}
\newcommand{\modelo}{\noindent\textbf{Modelo}}
\fancyhead[L]{}
\fancyhead[C]{}
\fancyhead[R]{}
%
\fancyfoot[L]{http://fisica.usach.cl/$\sim$cesparza/}
%\fancyfoot[C]{\ff}
\fancyfoot[C]{}
\fancyfoot[R]{TeoIngMat-EXA1s11.pdf -- 15 noviembre 2011}
\headwidth 18.0cm
\textwidth 18.0cm %18.0cm
\textheight 25.00cm % era25
\oddsidemargin -0.8cm
\evensidemargin -0.8cm
\topmargin -3.5000cm %era -2.0cm
\columnsep 0.3cm
\parindent 0pt
\newcommand{\ia}{\'{\i}}
\newcommand{\xu}{\rm {\widehat{\bf{x}}}}
\newcommand{\yu}{\rm {\widehat{\bf{y}}}}
\newcommand{\zu}{\rm {\widehat{\bf{z}}}}
\newcommand{\iu}{\mathbf{\hat{\imath}}}
\newcommand{\ju}{\mathbf{\hat{\jmath}}}
\newcommand{\ku}{\mathbf{\hat{\kappa}}}
\newcommand{\kuw}{\mathbf{\widehat{\kappa}}}
\usepackage[dvipdfm]{hyperref}
\hypersetup{
pdfauthor = Carlos Esparza Barrera,
pdftitle = TeoF1-IngMat-EXA1s11.pdf,
pdfsubject = 2red,
pdfkeywords =carlos.esparza@usach.cl,
pdfcreator = {LaTeX con la paqueteria hyperref },
pdfproducer = {dvpdfm}
}
\usepackage{type1cm}
\usepackage{eso-pic}
\usepackage{color}
\begin{document}
\psfrag{xu}{$\widehat{\bf{x}}$}
\psfrag{yu}{$\widehat{\bf{y}}$}
\psfrag{iu}{$\mathbf{\hat \imath}$}
\psfrag{ju}{$\mathbf{\hat \jmath}$}
\psfrag{i}{$\hat \imath$}
\psfrag{j}{$\hat \jmath$}
\textbf{Departamento de Fisica \hfill Universidad de Santiago de Chile}
Teoria a Física I (22104)\hfill \textbf{EXAMEN} \hfill Ingeniería Matemática \vspace{0.1cm}
\hline \hline \vspace{0.2cm}
Prof. Carlos H. Esparza-Barrera \hfill \begin{LARGE} \raisebox{-0.5ex}{\Email}
\end{LARGE} ~carlos.esparza@usach.cl \hfill \begin{LARGE}\Telefon \end{LARGE} ~(56-2-)7181239
\hfill Oficina 27 \\[0.1cm]
\hline
\begin{itemize}
\item \begin{large} \textbf{Esta prueba
consta de cuatro problemas, usted debe responder tres de ellos. La
elección es suya y debe indicarla en la hoja. Si responde los cuatro, se considerarán los tres
peor evaluados}\end{large}. \hfill Cada problema vale $2,0$ puntos.
\item Fundamente su razonamiento; haga esquemas explicatorios. Use
l\'apiz indeleble; en caso contrario, no puede pretender una segunda revisi\'on de su trabajo. Exprese sus
repuestas numéricas con 3 CS.
\item Las situaciones y los valores num\'ericos de los datos suministrados no necesariamente corresponden a
los de un experimento o situaci\'on pr\'actica real. Se pretende que usted trabaje cada problema con
el modelo adecuado en el marco de la teor\'ia pertinente y obtenga las predicciones correspondientes.
\end{itemize}
\hline
\begin{multicols}{2}
\begin{enumerate}
\item problema 1
\item ...
\item ...
\item ...
\item ...
\item ...
\end{enumerate}
Compiling in Latex=>PS=>PDF, I have the following errors:
Misplaced \noalign x4 and Emergency stop.
I don't know how to fix this.
The result should be the following:

After the last horizontal line, I edited the problems so there's no text in there as you can see in the code.
I had to repost this because I messed up in the other thread. I appreciate the help and thanks in advance.


dvpdfmoption on several packages so it is not for latex-ps-pdf or for pdflatex but for latex-dvi-pdf via dvipdfm, as such psfrag package shouldn't be loaded. epsfig package should never be loaded, you loadmarvosymtwice, you shouldn't use\bfor\rm, especially in math mode... – David Carlisle Apr 30 '15 at 18:49\noalignis from\hlinewhich can only be used insidetabularsimply delete it,. – David Carlisle Apr 30 '15 at 19:00psfragthat relies on postscript and it specifiesdvipdfmwhich does not use postscript, it also uses obsolete package such asepsfigobsolete macros such as\rmand local packages which mean that we can not test it properly here. (shortlst.sty) – David Carlisle Apr 30 '15 at 19:03l2tabu. Most of the code is obsolete by now, starting from scratch would be much faster than starting to fix and hack. – Johannes_B Apr 30 '15 at 19:49