Description
Used to place a response object in Inline and Blanks
questions. \blank
may only appear within the argument
to \qutext
.
The \blank
macro has two different definitions,
depending on the question type in which it is used.
\blank
in Inline
questions
In an Inline question, the
\blank
macro can be used with or without
arguments.
If used without an argument, \blank
places a
response object at that point in the question. The properties
of the response object—its mode, display type, correct
answer, and so on—are set outside of \qutext
,
using the blank environment. See the first
example below.
This method of specifying a response object is somewhat
tedious. For math-type blanks (e.g., Equation, Formula,
Maple, MultiFormula,
Numeric), a
streamlined version of \blank
can be used
to completely describe a response object without needing a
separate blank environment. This version of
\blank
takes two arguments: the question
type, and a list of properties.
Syntax
\blank{mode}{property-list}
- mode
- The question type.
- property-list
- A comma-delimited list of key-value pairs, of the
form "
key=value
".
See the second and third examples, below, for a
demonstration of this use of \blank
.
\blank
in Blanks
questions
Syntax
\blank[text|menu|formula]{answer}
- Optional argument 1 must be one of the following:
-
- text
- A text blank.
This is the default. If the optional argument is omitted, it is assumed to betext
. - menu
- A menu blank; the response object will be a drop-down menu.
- formula
- A formula blank.
- answer
-
The correct answer.
- For [text] blanks, this argument should be the answer the student is expected to give.
- For [menu] blanks, this argument should be a
comma-delimited list of the options to appear in the
drop-down menu. The correct answer must be the first
item in the list.
If you need a comma to appear in one of the choices, use the ASCII escape sequence '%2c
'. - For [formula] blanks, this argument should be the answer the student is expected to give. Enter the answer in calculator syntax.
Examples
\begin{question}{Inline} \qutext{The graph of the equation $y=x^2+2x+1$ is a parabola. In which direction does the parabola open?\\ \blank What are the coordinates of the parabola's vertex? \blank What is the equation of the parabola's axis of symmetry? \blank} \begin{blank}{Multiple Choice} \choice*{Up} \choice{Down} \choice{To the right} \choice{To the left} \end{blank} \begin{blank}{Ntuple} \answer{(1,4)} \end{blank} \begin{blank}{Equation} \answer{x = 1} \end{blank} \end{question}
\begin{question}{Inline} \qutext{The graph of the equation $y=x^2+2x+1$ is a parabola. In which direction does the parabola open?\\ \blank What are the coordinates of the parabola's vertex? \blank{Ntuple}{answer={(1,4)}} % Above, we need the braces around (1,4) to protect the comma. What is the equation of the parabola's axis of symmetry? \blank{Equation}{answer={x=1}} % Now, we need the braces around x=1 to protect the =. } \begin{blank}{Multiple Choice} \choice*{Up} \choice{Down} \choice{To the right} \choice{To the left} \end{blank} \end{question}
\begin{question}{Inline} \qutext{A particle's velocity is given by the function $v(t)=5\sqrt{t}$, where $t$ is time in seconds, and $v$ is velocity in meters per second. During the time interval $0\le t\le 4$, how far does the particle travel? Give your answer to three significant figures.\\ \blank{Numeric}{answer=80/3 m, digits=3} During the time interval $0\le t\le 4$, what is the particle's average velocity? Give your answer to three significant figures.\\ \blank{Numeric}{answer=20/3 m/s, digits=3}} \end{question}