slatex / sTeX

A semantic Extension of TeX/LaTeX
50 stars 9 forks source link

HTML attributes for smarter answer matching in fill in boxes #412

Open abchugh opened 10 months ago

abchugh commented 10 months ago

From https://github.com/slatex/sTeX/issues/391#issuecomment-1627388449

""" \fillinsol now takes as optional argument a list of key-value-pairs with keys exact, numrange, regex and values being triples {<string>}{T|F}{<feedback>} (the answer case "description", whether that case is correct/wrong, and feedback). The mandatory argument in \fillinsol is now only used to a) determine the size of the fillinbox, and b) to fill the box with if \ifsolutions is true. """

This information is not yet available in the RusTeX/MMT generated HTML.

Things to note:

  1. The new schema should be backward compatible, i.e., if a solution is provided without any other information, exact will be assumed.
  2. Needs for the regex matching is most urgent. This may be specified by just adding HTML attribute that has the value exact, regex, or numrange. When the provided value is regex, the frontend will treat the provided data as a regular expression.