1

The following error

File ended while scanning use of \next.
<inserted text> 
                \par 

appear to me when I compile the following code:

How do I make compile this .tex?

    \documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage[hmargin=1in, vmargin=1in]{geometry}
\usepackage{comment}

\frenchspacing           \addtolength{\hoffset}{-.8cm}   %margen lateral derecha
\addtolength{\textwidth}{3cm}           \addtolength{\voffset}{-3cm}%Margen superior
\addtolength{\textheight}{3cm}     % margen de abajo


\newcommand{\informacion}[1]{
\begin{center}
\parbox{\textwidth}{{\footnotesize#1}}
\end{center}
\vspace{5mm}}
\newcommand{\datos}{\makebox[0.7\textwidth]{Nombre:~\hrulefill} Fecha:~\hrulefill}
\newcommand{\pregunta}[2]{\item{(#1 puntos).~#2} \vspace{5mm}}  %%%% cambiar el orden de los comando a ingresar.%%%%%.%%%%%.%%%%%.%%%%%%%%%%.%%%%%.%%%%%.%%%%%

\newcommand*{\matminus}{%
  \leavevmode
  \hphantom{0}%          %http://tex.stackexchange.com/questions/75545/negative-sign-and-matrix-alignment
  \llap{%
    \settowidth{\dimen0 }{$0$}%
    \resizebox{1.1\dimen0 }{\height}{$-$}%
  }%
}   

\newcommand{\RNum}[1]{\uppercase\expandafter{\romannumeral #1\relax}}

\title{xxxxxxxxxxxxxxxxxxxx}


\begin{document}


\begin{comment}%%%%%%%%%%%%%%5 
 \pregunta{25}{ Indique si los siguientes enunciados son verdaderos o falsos.

 \begin{itemize}
\item[\RNum{1}] Si $T$ es una transformación lineal, entonces $T(3x)=3Tx$.
\item[\RNum{2}] Si $T$ es una transformación lineal, entonces $T(x+y)=Tx+Ty$.
\item[\RNum{3}] Si $T$ es una transformación lineal, entonces $T(xy)=TxTy$.
\item[\RNum{4}] Si A es una matriz de $4 \times 5$, entonces Tx=Ax es una transformación lineal de \mathbb{R}^4 en \mathbb{R}^5
\item[\RNum{5}] Si A es una matriz de $4 \times 5$, entonces Tx=Ax es una transformación lineal de \mathbb{R}^5 en \mathbb{R}^4
\item[\RNum{6}] Los valores propios de una matriz simétrica son reales.
\item[\RNum{7}] Los vectores cpropios de una matriz simétrica son reales.
\item[\RNum{8}] Toda matriz simetrica real es semejante a una matriz diagonal.
\item[\RNum{9}] Si la matriz real $A$ se puede diagonalizar, entonces existe una matriz ortogonal $Q$ tal que $Q^tAQ$ es diagonal.
\item[\RNum{10}] Si $A$ es real y simetrica, entonces existe una matriz ortogonal $Q$ tal que $Q^tAQ$ es diagonal 
\item[\RNum{6}] Toda matriz es semejante a una matriz de Jordan.
¿Cual de las siguientes no es matriz de Jordan?
\item[\RNum{7}] \[
 \text{a.)} 
\left( \begin{array}{ccc}
3 &1 &0\\
0 &3 &1\\
0 & 0 & 4
\end{array}\right) ;\hspace{.5cm}  \text{b.)} \left( \begin{array}{ccc}
3 &1 &0\\
0 &4 &0\\
0 & 0 & 5
\end{array}\right) ;\hspace{.5cm}  \text{b.)} \left( \begin{array}{ccc}
3 &0 &0\\
0 &4 &0\\
0 & 0 & 5
\end{array}\right)
\] 
\item[\RNum{8}]
\item[\RNum{9}]
\item[\RNum{10}]
\item[\RNum{11}]
\end{itemize}•
 %%%%%%%%%%%%%%%%%%%555 Esto es un exprimento para ver donde queda mejor la ubicación.

 }
 \end{comment}




\end{document}
3
  • I find slightly disturbing that you put an itemized environment inside an argument to a macro.
    – jarnosz
    Commented Nov 20, 2015 at 22:57
  • @erreka How would be the correct way to construct the same result? and could you explain me a little bit in wich way is disturbing? thanks
    – JuanMuñoz
    Commented Jan 12, 2016 at 1:15
  • Your macro \pregunta requires two arguments, while its only purpose is to add an \item into a list adding vertical space; it would be better off with only one argument (the number of points) adding the space, while leaving the structure open to add whatever you want after it; otherwise you force the macro processor to chomp the second argument, potentially leading to unforeseen second effects. In this example, using Snow's terminology, you are trying to put a sandwich into a jelly doughnut.
    – jarnosz
    Commented Jan 13, 2016 at 0:56

1 Answer 1

5

The reason for the above mentioned error is due to the white space before \end{comment}. Please ensure \end{comment} always start on a new line.

You must log in to answer this question.

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