# How to guarantee a question appears on an exam created using exsheets?

I really have 3 questions that I want to know how to go about when using the exsheets package.

My main question is if I have a tex file solely as a database for questions and if I create a separate tex file that uses the \includequestions command along with the random option provided by the exsheets package, how can I guarantee that from that database file that a specific question is guaranteed to appear every time. I am creating a database file for the sines, cosines and tangents of the unit circle and I would like to easily create quizzes. However, I want to have the first question always be one in which the students draw the radian circle. Below is my MWE and the database file can be found here.

\documentclass[12pt,leqno]{article}
\usepackage{amsmath, amsfonts, amssymb,amsthm}
\usepackage[auto-label=true]{exsheets} % For Creating Exam
\usepackage[margin=0.7 in]{geometry} %margins
\usepackage{mathptmx} %Changes math font
\newtheorem{exer}{Exercise}
\newtheorem{theorem}{Theorem}
\newtheorem*{theorem*}{Theorem}
\renewcommand*{\proofname}{Solution}
\SetupExSheets[question]{type=exam} %Changes from Exercise to Question
%\SetupExSheets[solution]{print=false} %Prints Solutions
%\DebugExSheets{true}

\title{Principal Angle Quiz}

\begin{document}

\maketitle

\begin{flushleft}
\textbf{Directions:} Answer all parts of the questions. Be sure to neatly show your work and write a solution to a problem in complete sentences as much as possible. Correctly and consistently use proper notation. Improper notation will not be given credit.
\end{flushleft}
\includequestions[random={2}]{Database.tex}
\includequestions[IDs=1]{Database.tex}
\printsolutions
\end{document}


My second question is how can I be able to use the the tasks package to typeset the questions in rows and columns (since I am not requiring for work to be shown) to save vertical space? Example below

My third question is there a simple way to quickly produce the exam and the solutions quickly using exsheets? I know how to print the solutions but I wish to make one pdf with the exam (blank) and then exam again but with the solutions inserted.

I would appreciate any guidance!

• question 1: the first question in your database file is not printed because it doesn't fit the topics you specify with use-topics={cosine}. I don't understand the second question. Do you want to fill the items of a tasks env randomly instead of using the question envs? That's not possible I'm afraid… Question 3: have a look here: tex.stackexchange.com/questions/264619 Oct 19, 2015 at 22:19
• I changed the it to include unitcircle" so it would try to include that question into the exam. However, I recompile and it doesn't always include that question out of the random subset of questions I want. Is there a way to guarantee that every time I compile I will always get that question in the exam? Perhaps even dictate which question number you always want it to be. You answered my second question correctly, it would be so great if we could populate the tasks environment randomly to create worksheets quickly. For the third question you indeed answered my question through that post.
– 1028
Oct 19, 2015 at 22:28
• I'd give the question a unique ID (draw-unitcircle or something), and then use \includequestions[IDs=draw-unitcircle]{Database.tex} \includequestions[random={2},exclude=draw-unitcircle]{Database.tex}. BTW: you have a solution with a print option in your database file… Oct 20, 2015 at 8:52

I'd give the question that should be inserted in every case a unique ID (draw-unitcircle, say), and then use
\includequestions[IDs=draw-unitcircle]{Database.tex}

This way the question is included by the first call of \includequestions. The second will load two random questions but will not choose the excluded one.