0

Using the exam package I'm making worksheets for topics. Lets say i make one worksheet with 10 questions however i only want to see questions 2,5,7 and 10. How would i create it so only specific questions are shown on the pdf. So basically the worksheets are like a question bank rather then a whole worksheet/exam paper. Also i would like the shown questions we be numbered 1,2,3... no matter if it is actually 2,5,7...

11
  • Maybe the following can help you: Generate exam from a question bank?
    – leandriis
    Commented Mar 1, 2019 at 19:43
  • i have just found that but its not really helping me much. i dont really want to change my code too much i was just wondering if there was a specific package or something to like print questions 1-6 Commented Mar 1, 2019 at 19:45
  • Without changing much of the code, you could comment the questions you don't want to be included and recompile. This way only the uncommented questions appear and are consecutively numbered.
    – leandriis
    Commented Mar 1, 2019 at 19:55
  • 1
    \usepackage{verbatim} and then \begin{comment} and \end{comment}
    – koleygr
    Commented Mar 1, 2019 at 20:32
  • 2
    Commenting the lines from \begin{comment} to \end{comment} without need of % on each line.... Thought it was obvious by the names... You need to include in this environment questions 1, 3-4, 6 and 8-10... So, only 2,5 and 7 will remain in your active code
    – koleygr
    Commented Mar 1, 2019 at 20:50

1 Answer 1

2

You can use \iffalse,...,\fi for skipping the desired questions.

\documentclass[answers]{exam}


    \begin{document}

    \begin{questions}

    \question Approximate $\displaystyle \int_0^1 \sin x^2 \, dx$ within $.001$ of
    its true value.


    \question Calculate the $$\int_{(5,6)}^{(3,3)} \mathbf{F}\cdot d\mathbf{l}$$
    for $\mathbf{F}(x,y,z)=xy\mathbf{a}_x + (3x-y^2)\mathbf{a}_y$.

    \iffalse
    \question Skipped question.
    \fi

    \question Find the gradient of\\[0.5cm]
    a- $f(x,y,z)=xy^2+2z$\\
    b- $f(r,\phi,z)=2rsin\phi$\\
    c- $f(R,\theta,\phi)=2\theta+R^2$\\

    \question Last question.

    \end{questions}
    \end{document}

enter image description here

You must log in to answer this question.

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