Sorry in advance for the length of this.
I am trying to set up a problem in which students are to predict the products of a chemical reaction.
The reactants and products are currently stored in a macro file with the following format
%reactions=(
1=>{equation=>"N_{2} + H_{2} \longrightarrow NH_{3}",
class=>"combination",
components=>[
{type=>"reactant", compound=>"N_{2}", coef=>1 },
{type=>"reactant", compound=>"H_{2}", coef=>3 },
{type=>"product", compound=>"NH_{3}", coef=>2 },]},
2=>{equation=>"P + O_{2} \longrightarrow P_{2}O_{5}",
class=>"combination",
components=>[
{type=>"reactant", compound=>"P", coef=>4 },
{type=>"reactant", compound=>"O_{2}", coef=>5 },
{type=>"product", compound=>"P_{2}O_{5}", coef=>2 },]},
3=>{equation=>"C_{2}H_{6} + O_{2} \longrightarrow CO_{2} + H_{2}O",
class=>"combustion",
components=>[
{type=>"reactant", compound=>"C_{2}H_{6}", coef=>2 },
{type=>"reactant", compound=>"O_{2}", coef=>7 },
{type=>"product", compound=>"CO_{2}", coef=>4 },
{type=>"product", compound=>"H_{2}O", coef=>6 },]},
4=>{equation=>"KClO_{3} \longrightarrow KCl + O_{2}",
class=>"decomposition",
components=>[
{type=>"reactant", compound=>"KClO_{3}", coef=>2 },
{type=>"product", compound=>"KCl", coef=>2 },
{type=>"product", compound=>"O_{2}", coef=>3 },]},
The problem that I have working asks the student to predict one of the two products (code attached). I would like to develop a problem with two (or more, as the reaction warrants) answer blanks that students would enter the products in LaTeX format. I have set one up that will check answers, the problem is the products must be in a specific order. I would like to be able to let students enter the products in any order. I'm pretty much shot as to how to do this.
Any suggestions/help would be appreciated.