TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use the eqexam package to randomize answers to multiple choice questions in an exam. The package works without options, but when I include the allowrandomize option needed for this feature I get an error. Any suggestions?

My code:



In what year did Columbus sail the ocean blue?
    \Ans0 1st random choice\eAns
    \Ans1\label{eq} 2nd (the correct) random choice\eAns
    \Ans0 3rd random choice\eAns
    \Ans0 4th random choice\eAns
    \Ans0 5th random chioce\eAns
    \Ans0 None of these\eAns


The error is ''missing begin document''. Again, works fine without randomization.

Edit: I have added \listfiles before \begin{document}. This produces the following .log file:

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2011.7.3)  24 DEC 2012 18:34
entering extended mode
 \write18 enabled.
 file:line:error style messages enabled.
 %&-line parsing enabled.
**"Fall Final.tex"
(./Fall Final.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,
 icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or
iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,
 lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol
ish, portuguese, romanian, russian, sanskrit, serbian, serbianc, slovak, sloven
ian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
Package: eqexam 2011/09/17 v3.0m An Exam Construction Package (dps)

Package: xkeyval 2008/08/13 v2.6a package option processing (HA)

File: xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)

Package: amstext 2000/06/29 v2.01

File: amsgen.sty 1999/11/30 v2.0
Package: amssymb 2009/06/22 v3.00

Package: amsfonts 2009/06/22 v3.00 Basic AMSFonts support
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 96.

Excluding comment 'comment')
Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)

File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
Package xcolor Info: Driver file: pdftex.def on input line 225.

File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX

Package: infwarerr 2010/04/08 v1.3 Providing info/warning/message (HO)
Package: ltxcmds 2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
Package xcolor Info: Model `RGB' extended on input line 1353.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
Package: calc 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
LaTeX Info: Redefining \setlength on input line 76.
LaTeX Info: Redefining \addtolength on input line 77.
Package: pifont 2005/04/12 PSNFSS-v9.2a Pi font support (SPQR) 
LaTeX Font Info:    Try loading font information for U+pzd on input line 63.

File: upzd.fd 2001/06/04 font definitions for U/pzd.
LaTeX Font Info:    Try loading font information for U+psy on input line 64.

File: upsy.fd 2001/06/04 font definitions for U/psy.
Package: verbatim 2003/08/22 v1.5q LaTeX2e package for verbatim enhancements
Package: multicol 2008/12/05 v1.6h multicolumn formatting (FMi)

File: eqexam.def 2011/08/30 v6.4m Exerquiz support file for eqexam (dps)
\openout4 = `"Fall Final.sol"'.

\openout5 = `"Fall Final_xdefs.cut"'.

\openout6 = `"Fall Final.qsl"'.

LaTeX Font Info:    Try loading font information for U+msa on input line 1200.

File: umsa.fd 2009/06/22 v3.00 AMS symbols A
LaTeX Font Info:    Try loading font information for U+msb on input line 1200.

File: umsb.fd 2009/06/22 v3.00 AMS symbols B

./Fall Final.tex:3: LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.

As far as I can tell, TeX never got around to listing the used files. Without allowrandomize, I easily found where the used files were listed in the .log

share|improve this question

closed as too localized by egreg, Kurt, David Carlisle, Qrrbrbirlbel, Frank Mittelbach Apr 7 '13 at 21:55

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Your code works for me with miktex 2.9. Which tex distribution and version you are using? – Harish Kumar Dec 24 '12 at 23:11
Does TeX-Live 2011 64bit answer the question? – chrisc Dec 24 '12 at 23:26
Please add \listfiles before the \begin{document}. You will get the files used with version in your log file. Please paste those details in the question. – Harish Kumar Dec 24 '12 at 23:28
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. – Martin Schröder Dec 24 '12 at 23:31
Can you \input random.tex without any errors? What about \input aebrandom.def? The output of \listfiles may still be useful even when you do not use the allowrandomize option. – cyberSingularity Jan 6 '13 at 15:12

Browse other questions tagged or ask your own question.