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.

KON3
  • 425
  • This may sound silly, but ... Find the cause of your problem and get rid of it. – Johannes_B May 20 '16 at 06:09
  • I have tried my best to provide the cause at most. No idea what to do – KON3 May 20 '16 at 06:25
  • 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 06:30
  • I have edited just now regarding the \question matter. Please check now if it works. Actually I forgot to provide \begin{questions} and \end{questions} environments. And as I said, after creating 22nd question I faced the trouble in 23 rd question. – KON3 May 20 '16 at 06:35
  • 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 06:36
  • Let me share with you what happened. Except the question statement everything including \questions, \choices, \choices etc are woring. But the moment i am going to type the question statement, its getting stuck :-( – KON3 May 20 '16 at 06:42
  • Such an error can happen if you have in a page to many things that triggers the output routine but don't lead to an output. Last time I saw it it was caused by too many marginpars (which are floats). It is normally not very difficult too find out what's causing it, but one need the true code to reproduce the problem. E.g. Are you using the \addanswer command in your real document? – Ulrike Fischer May 20 '16 at 06:56
  • @UlrikeFischer Yes, I am using \showanswers after the \end{questions} command. – KON3 May 20 '16 at 07:05
  • Just now what I did, I have created a new file, by copying one by one each line from the previous file, but still getting the same error. I really have no idea what to do. Is there any possibility that I send my file through mail to you ? – KON3 May 20 '16 at 07:11
  • 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 07:30
  • @ebo as you wish, but the length will be bigger then. I am trying. Please give me a minute – KON3 May 20 '16 at 07:33
  • @ebo I have no issue of sharing the questions with you or anyone as this is just classroom materials. Please have a look I tried my best to give full description of my problem :-( – KON3 May 20 '16 at 07:42
  • 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 08:01
  • @DavidCarlisle I've edited the MWE since there was two \begin{question}for one \end (and one \begin{multicols}` without any end as well). With these edits, the code compile fine, even with the 23rd question uncommented... – ebosi May 20 '16 at 08:02
  • @DavidCarlisle I've edited the MWE because errors we obtained (! LaTeX Error: Something's... and Underfull \hbox ...) were not the one for which OP asked help... but I got what you mean! – ebosi May 20 '16 at 08:11
  • 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 08:34
  • Dear Sir. I have used \begin{multicols} command and after that the same previous problems appeared. I have used all the commands copied exactly from here and compiled but as I said same error appeared. And I have no idea where shall I upload as you suggested . :-( please let me know about it – KON3 May 20 '16 at 09:21
  • @Anjan3 is the MWE you provide working for you or not? (Btw, it works by me, as is and when uncommenting Q22 and Q23 : see output ). Anyway, don't worry: we're going to help you -- we just need relevant information therefor. (-: – ebosi May 20 '16 at 09:37
  • if the file exactly as above is giving an error perhaps you have an old installation, I have Package: multicol 2015/08/19 v1.8n multicolumn formatting (FMi) do you have an older one (see your log file) – David Carlisle May 20 '16 at 09:38
  • I'm not a sir. And the internet if full of sites for uploads. Use e.g. pastebin.com (without zip) or whatever. Btw: notify me with @UlrikeFischer when you comment. – Ulrike Fischer May 20 '16 at 10:47
  • Hi, comments are not for extended discussion; this conversation has been moved to chat, kindly continue there. – Stefan Kottwitz May 24 '16 at 09:40
  • I had this issue with a recent MiKTeX (2016-12-30) and using \savegeometry – koppor Dec 29 '16 at 23:13
  • Related thread with answer here https://tex.stackexchange.com/a/347567/13173 – Léo Léopold Hertz 준영 May 26 '17 at 09:35

0 Answers0