Ansref

In the context of generic problems or quickchecks you may want to add an input field inline to your question text.

Example:
Given are
$$a = 2, b = 3, c = 2, d = 1$$

$$a + b = $$ ,

and $$c + d = $$ .

For this purpose you can use the command \ansref in the question text. The placeholder will then be replaced by the answer defined in the answer environment. Make sure you define as many answers as the number of \ansref used.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
\begin{question}
  ...
  \text{
      Given are $a = \var{a}, b = \var{b}, c = \var{c}, d = \var{d}$\\
        $a + b$ = \ansref, and $c + d = $\ansref
  }
 
  \begin{answer}
   \solution{a+b}
  \end{answer}
 
  \begin{answer}
   \solution{c+d}
  \end{answer}
\end{question}