Author a chemical equation sub-type

This sub-type is authored by selecting the Chemical Equation option from the Sub-type drop-down list during mathematical formula question authoring.

Examples of accepted syntax for defining the Answer field value for this sub-type are:

  • H_2SO_4

  • 2H_2+O_2 -> 2H_2O

The chemical equation sub-type Answer field:

  • Uses only the following 2D text entry characters (which are interpreted by Möbius into symbolic chemistry):

Type of symbol

Keyboard character

Example of text entry

Example of symbolic interpretation by Möbius

Superscripts

^

Ca^2 (aq)

<script src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script> <p>\(Ca^2\,(aq)\)</p>

Subscripts

_ (underscore)

H_2SO_4

<script src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script> <p>\(H_2SO_4\)</p>

Arrows

-> or <- or <=>

2H_2+O_2 -> 2H_2O

<script src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script> <p>\(2H_2 + O_2 \rightarrow 2H_2O\)</p>

Dot operator

*

CuSO_4*5H_2O

<script src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script> <p>\(CuSO_4 \cdot 5H_2O\)</p>

Addition

+

2H_2+O_2

<script src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script> <p>\(2H_2 + O_2\)</p>

Polarity and ion charges

+ or - (combined with ^)

CO_3^2- (aq)

<script src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script> <p>\(CO_3{}^{2-}\,(aq)\)</p>
  • Accepts physical states in parentheses if required by your equation (Example — Ca^2 (aq)).

  • Accepts parentheses to clarify the interpretation of groups of characters if required by your equation (Example — (CO_3)^2- (aq)).

  • Ignores spaces within your equation.

  • Doesn't accept equivalent responses as student responses must be an exact match to the defined correct answer.

Example of this sub-type

  • Question statement:

Enter the reaction of hydrochloric acid (HCl) with sodium hydroxide (NaOH).

For the purpose of correct grading, please write the reactants and products in alphabetical order of elements on either side of the equation.

  • Answer field syntax:

HCl + NaOH -> H_2O + NaCl

Example of this sub-type with an algorithm

  • Question statement:

Write a balanced equation for the complete combustion of $gas gas.

For the purpose of correct grading, please write the reactants and products in alphabetical order on either side of the equation. Include physical states.

The complete and balanced reaction is:

  • Algorithm:

$i=rint(2); $gas=switch($i,"propane","methane"); $formula=switch($i,"C_3H_8(g)+5O_2(g)->3CO_2(g)+4H_2O(l)","CH_4(g)+2O_2(g)->CO_2(g)+2H_2O(l)");

  • Answer field syntax:

$formula