3

Recently I have faced the following problem: after compilation in LaTeX, I am getting following error: !Output loop-----100 consecutive dead cycles. \break -> penalty -\@m

Hence the compilation is becoming incomplete.

I am providing here my file.

\documentclass[11pt, twoside]{book}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{multicol}


\newcounter{question}
\newif\ifinchoices
\inchoicesfalse
\newenvironment{questions}{%
  \list{\thequestion.}%
{%
\usecounter{question}%
\def\question{\inchoicesfalse\item}%
\settowidth{\leftmargin}{10.\hskip\labelsep}%
\labelwidth\leftmargin\advance\labelwidth-\labelsep
 }%
}

{%

  \endlist

}%


\newcounter{choice}
\renewcommand\thechoice{\Alph{choice}}
\newcommand\choicelabel{\thechoice.}
\def\choice{%

\ifinchoices
% Do nothing
  \else
    \startchoices
 \fi
  \refstepcounter{choice}%
  \ifnum\value{choice}>1\relax
  \penalty -50\hskip 1em plus 1em\relax
  \fi
  \choicelabel
  \nobreak\enskip
}% choice
\def\CorrectChoice{%
  \choice
  \addanswer{\thequestion}{\thechoice}%
}
\let\correctchoice\CorrectChoice

\newcommand{\startchoices}{%
  \inchoicestrue
  \setcounter{choice}{0}%
 \par % Uncomment this to have choices always start a new line
  % If we're continuing the paragraph containing the question,
  % then leave a bit of space before the first choice:
  \ifvmode\else\enskip\fi
}%

\newbox\allanswers
\setbox\allanswers=\hbox{}
\newcommand{\addanswer}[2]{%
  \global\setbox\allanswers=\hbox{\unhbox\allanswers #1.~#2\quad}%
}
\newcommand{\showanswers}{%
  \vfill
  \begin{center}
    Answers
  \end{center}
  \noindent\unhbox\allanswers
}

\makeindex



%--------------------------------------------------------------------

    \begin{document}
    \begin{multicols}{2}
   \begin{questions}

   \question\label{Binomial Polynomial 1}
   Define Binomial Equation.

  \textbf{Sol.} The $n$th degree Binomial equation is of the form        
    $\mathcal{B}_n(x)=0$ where $\mathcal{B}_n(x):=x^n-1$


  \question\label{Binomial Polynomial 2}
   The roots of $\mathcal{B}_n(x)=0$ are
  \choice $\{\cos \frac{2k\pi}{n}+i \sin \frac{2k\pi}{n}: k\in \mathbb{W}_{n-1} \}$ \\
   \choice $\{e^{2ki\frac{k}{n}}: k\in \mathbb{W}_{n-1} \}$ \\
   \correctchoice B.O.T. \\
   \choice N.O.T.



    \question\label{Binomial Polynomial 3}
 If $\alpha:=e^{2\pi i/n}$, the roots of $\mathcal{B}_n(x)=0$ are
\choice $\{0, 1, \alpha, \alpha^2, \cdots, \alpha^{n-1}  \}$ \\
\correctchoice $\{1, \alpha, \alpha^2, \cdots, \alpha^{n-1}  \}$ \\
\choice $\{\alpha, \alpha^2, \cdots, \alpha^{n-1}  \}$ \\
\choice N.O.T.



\question\label{Binomial Polynomial 4}
The solution set $Z_\mathbb{C}(\mathcal{B}_n)$ found in Q\ref{Binomial Polynomial 3}
\choice can never become a group \\
\choice can become a group  \\
\choice can become an Abelian group \\
\correctchoice can become a cyclic group



\question\label{Binomial Polynomial 5}
Refer Q\ref{Binomial Polynomial 4}. $\mathbb{T}_n\leqslant \_\_~\forall~n\in     \mathbb{N}$.
\correctchoice $\mathbb{C}$
\choice $\mathbb{R}$
\choice $\mathbb{Q}$
\choice $\mathbb{Z}$



 \question\label{Binomial Polynomial 6}
If $n\in \mathbb{Q}$ then $\mathbb{T}_n$ is
\choice a set only~~~~~~~~~~
\choice a group  \\
\correctchoice an Abelian group
\choice a cyclic group



\question\label{Binomial Polynomial 7}
Let $n\in 2\mathbb{N}+1$. Then $|Z_\mathbb{R}(\mathcal{B}_n)|=$
\correctchoice 1
\choice 2
\choice 0
\choice N.O.T.



 \question\label{Binomial Polynomial 8}
Refer Q\ref{Binomial Polynomial 7}. Find $|Z_\mathbb{C}(\mathcal{B}_n)|$.
 \choice 1
 \choice $n$
 \correctchoice $n-1$
 \choice N.O.T.



\question\label{Binomial Polynomial 9}
refer Q\ref{Binomial Polynomial 8}. The set $Z_{\mathbb{C}\backslash \mathbb{R}}(\mathcal{B}_n)$ can be written as
 \correctchoice $\{\alpha, \frac{1}{\alpha}, \alpha^2, \frac{1}{\alpha^2},    \cdots, \alpha^{(n-1)/2}, \frac{1}{\alpha^{(n-1)/2}}  \}$ \\
 \choice $\{\alpha, \frac{1}{\alpha}, \alpha^2, \frac{1}{\alpha^2}, \cdots, \alpha^{(n+1)/2}, \frac{1}{\alpha^{(n-1)/2}}  \}$ \\
 \choice $\{\alpha, \frac{1}{\alpha}, \alpha^2, \frac{1}{\alpha^2}, \cdots, \alpha^{(n-1)/2}, \frac{1}{\alpha^{(n+1)/2}}  \}$ \\
 \choice $\{\alpha, \frac{1}{\alpha}, \alpha^2, \frac{1}{\alpha^2}, \cdots, \alpha^{(n+1)/2}, \frac{1}{\alpha^{(n+1)/2}}  \}$



\question\label{Binomial Polynomial 10}
Let $n\in 2\mathbb{N}$. Then $Z_\mathbb{R}(\mathcal{B}_n)=$
\choice $\{1\}$
\correctchoice $\{1,-1\}$
\choice $\{-1\}$
\choice N.O.T.

\question\label{Binomial Polynomial 11}
Refer Q\ref{Binomial Polynomial 10}. $|Z_{\mathbb{C}\backslash \mathbb{R}}(\mathcal{B}_n)|=$
\choice $n$
\choice $n-1$
\correctchoice $n-2$
\choice $n-3$





\question\label{Binomial Polynomial 12}
Refer Q\ref{Binomial Polynomial 11}. The non-real roots of $x^n-1=0$ will satisfy
\correctchoice $x^{n-2}+x^{n-3}+\cdots+x^2+x+1=0$ \\
\choice $x^{n-2}-x^{n-3}+\cdots+x^2-x+1=0$ \\
\choice $x^{n-1}+x^{n-2}+\cdots+x^2+x+1=0$ \\
\choice $x^{n-1}-x^{n-2}+\cdots-x^2+x-1=0$


\question\label{Binomial Polynomial 13}
If $a=r(\cos\theta + i \sin \theta )$ where $r\in \mathbb{R}\backslash \{0\}, \theta\in (-\pi, \pi],$ \textit{the generalized binomial equation}
\index{the generalized binomial equation} $x^n-a=0$ has $\_\_$ roots.
\correctchoice $n$
\choice $n-1$
\choice $n-2$
\choice N.O.T.



\question\label{Binomial Polynomial 14}
Let $\alpha\in Z_\mathbb{C}(\mathcal{B}_n)$. Then
\choice $\alpha^2\in Z_\mathbb{C}(\mathcal{B}_n)$ \\
\choice $\alpha^{n-1}\in Z_\mathbb{C}(\mathcal{B}_n)$ \\
\choice $\alpha^m\in Z_\mathbb{C}(\mathcal{B}_n)~\forall~m\in \mathbb{Z}$ \\
\correctchoice A.O.T.






\question\label{Binomial Polynomial 15}
(a) $(x^{50}-1, x^{70}-1)=x^{10}-1$ \\
(b) $(x^{m}-1, x^{n}-1)=x^{(m,n)}-1$
\correctchoice TT
\choice TF
\choice FT
\choice FF

\question\label{Binomial Polynomial 16}
The number of common roots of $x^{12}-1=0$ and $x^{28}-1=0$ is
\choice 21
\choice 28
\correctchoice 7
\choice 6



\question\label{Binomial Polynomial 17}
(a) If $p\in \mathbb{P}$ then the complete list of roots of $x^p-1=0$ is $\{1, \alpha, \alpha^2, \cdots, \alpha^{p-1}\}$ where $\alpha$ is imaginary root of $x^p-1=0$.

(b) If $n$ is composite number, $\{1, \alpha, \alpha^2, \cdots, \alpha^{n-1}\}$ need not be the complete list of $x^n-1=0$ where $\alpha$ is imaginary root of $x^n-1=0$
\choice TF
\correctchoice TT
\choice FF
\choice FT



\question\label{Binomial Polynomial 18}
Let $n\in \mathbb{P}$ and $\alpha\in Z_{\mathbb{C}\backslash \mathbb{R}}(\mathcal{B}_n)$. Then $(1-\alpha)(1-\alpha^2)\cdots (1-\alpha^{n-1})=$
\choice $-1$
\choice 1
\choice 0
\correctchoice $n$




\question\label{Binomial Polynomial 19}
Let $\alpha$ be imaginary root of $x^7-1=0$. Find the equation which roots are $\alpha^4+\alpha^3, \alpha^5+\alpha^2, \alpha^6+\alpha$.
\correctchoice $x^3+x^2-2x-1=0$
\choice $x^3+x^2+2x-1=0$ \\
\choice $x^3+x^2-2x+1=0$
\choice $x^3+x^2+2x+1=0$



\question\label{Binomial Polynomial 20}
Let $\alpha\in Z_{\mathbb{C}\backslash \mathbb{R}}(\mathcal{B}_5)$. The equation which roots are $\alpha+2\alpha^4, \alpha^2+2\alpha^3, \alpha^3+2\alpha^2, \alpha^4+2\alpha$ is
\choice  $x^4+3x^3-x^2-3x-13=0$ \\
\choice $x^4+3x^3-x^2-3x-11=0$ \\
\choice $x^4+3x^3-x^2-3x+13=0$ \\
\correctchoice $x^4+3x^3-x^2-3x+11=0$


\question\label{Binomial Polynomial 21}
Define the special roots\index{special roots} of $x^n-1=0$.

\textbf{Sol.} A root of $x^n-1=0$ which is not a root of $x^m-1=0$ for any $m<n$ is called a special root of $x^n-1=0$.

\question\label{Binomial Polynomial 22}
%The special roots of $x^n-1=0$ are $\cos \frac{2r\pi}{n}+i \sin\frac{2r\pi}{n}$ where $r\in$
\choice $U(n)$
\choice $\mathbb{N}_n$
\choice $\mathbb{W}_{n-1}$
\choice N.O.T.

%\question\label{Binomial Polynomial 23}
%cj  v o
%\choice
%\choice
%\choice
%\choice














    \end{questions}    
    \end{multicols}   
    \end{document}  

The problem is, after preparing 21 questions like this, when I am preparing 23rd question, the error message is appearing. What to do?

Just see what happens if you remove % in Q22.

  • 1
    My guess would be that something with question 23 is strange. I cannot even compile your example because \question is undefined. On the other hand, there are packages for that kind of stuff. – Johannes_B May 20 '16 at 6:30
  • 3
    Your MWE is working (for me) -- even with 23 questions... maybe it is within the 23rd question (i.e. the code in it) that there is a typo that leads to this error... ( A tip: You can use backticks ` to mark your inline code ) – ebosi May 20 '16 at 6:36
  • 1
    what about actually posting it in your question, since it is what you're asking? (for what concern privacy, just replace your real content by dummy one, e.g. \question\label{Question 13} Let $1+1=0$. Blablah. \choice $1$ \\ \choice $2$ \\ \choice $3$ \\ \correctchoice $4$) – ebosi May 20 '16 at 7:30
  • 1
    all the Underfull \hbox (badness 10000) in paragraph at lines 159--160 are due to misuse of \\ which should never be used at the end of a paragraph (otherwise it always produces bad spacing and the underfull box warning) – David Carlisle May 20 '16 at 8:01
  • 3
    Make sure that the example really shows the error: Copy it in a new document and compile it. If it shows the error put the document and the log-file in a zip-file and upload it somewhere on the net. If it doesn't show the error make a true example that does. – Ulrike Fischer May 20 '16 at 8:34

Browse other questions tagged or ask your own question.