\documentclass{article} \usepackage[tight,designv]{web} \usepackage{insdljs} \usepackage[testmode,quiet]{rangen} %\usepackage[seed=30,quiet]{rangen} \parindent0pt\parskip6pt \begin{document} \RandomL{\a}{1,-1}$\texttt{\string\a}=\a, \cfmt\a x$ \RandomP[index=5]{\a}{1,x,x^2,x^3}$\a$ \RandomI{\indx}{5} \RandomP[index=\indx]{\q}{1+16,\cos(\pi),\pi\sin(\pi),\frac{d}{dx}\frac{1}{2}x^2,{\int \cos(x)\,dx}} $\displaystyle\q$ \RandomI{\i}{2}\i \RandomP[index=\i]{\q}{1+16, \frac{d}{dx}\frac{1}{2}x^2} \RandomP[index=\i]{\a}{17,x} $ \q = \a $ \RandomP{\q}{1+16,\frac{d}{dx}\frac{1}{2}x^2} \RandomP[index=\iOf\q]{\a}{17,x} $\displaystyle\q = \a $ \RandomI{\i}{6}RandomI=\i \RandomL[index=1]{\a}{17,\rPI,3/4,\rE,88,1/2}\a\quad index=\iOf{\a} \RandomL[index=\i]{\a}{17,\rPI,3/4,\rE,88,1/2}\a\quad index=\iOf{\a} \RandomL{\a}{17,\rPI,3/4,\rE,88,1/2}\a\quad index=\iOf{\a} In practice, \verb!\RandomI! can be used to select one of n problems. Here, we have selected the \RandomI{\i}{6} \ifcase\i\relax\or first\or second\or third\or fourth\or fifth\or sixth\fi\space problem. \end{document}