Code: Select all
\hideanswers
\loadallproblems[tema01]{tema1.tex}
\begin{enumerate}
\foreachproblem[tema01]{\item\label{\thisproblemlabel}\thisproblem}
end{enumerate}
\section*{Soluciones}
\showanswers
\begin{enumerate}
\foreachproblem[tema01]{\item\thisproblem}
\end{enumerate}
probsoln
I define problems without solutions with:Code: Select all
\begin{defproblem}{inheritance}%
Describe what is meant by the term \emph{inheritance} in
object-oriented programming. Use examples.%
\end{defproblem}
Code: Select all
\begin{defproblem}{t01:02}%
\begin{onlyproblem}%
Velocidad de una molecula%
\end{onlyproblem}%
\begin{onlysolution}%
0.0791.
\end{onlysolution}%
\end{defproblem}
Problems:
1. text 1
2. text 2
3. text 3
4. text 4
Solutions:
1. solution 1
2. solution 2
4. solution 4
Where the problem number three has no solution.
I mean, if the solution is empty no number should be printed. I have tried defining:
Code: Select all
\begin{defproblem}{inheritance}%
\begin{onlyproblem}%
Describe what is meant by the term \emph{inheritance} in
object-oriented programming. Use examples.%
\end{onlyproblem}%
\begin{onlysolution}%
\end{onlysolution}%
\end{defproblem}
Solutions:
1. solution 1
2. solution 2
3.
4. solution 4
Is there a way to avoid the display of the item with no solution?
Thanks in advance for the attention