// Numbas version: exam_results_page_options {"name": "Joshua's copy of Displaying a randomised LaTeX command", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "showQuestionGroupNames": false, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Demonstrates how to create variables containing LaTeX commands, and how to use them in the question text.

", "notes": ""}, "rulesets": {}, "type": "question", "functions": {}, "ungrouped_variables": ["expressions", "expression"], "preamble": {"js": "", "css": ""}, "tags": [], "name": "Joshua's copy of Displaying a randomised LaTeX command", "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "variables": {"expressions": {"group": "Ungrouped variables", "templateType": "anything", "name": "expressions", "definition": "[\n \"\\\\frac\\{1\\}\\{2\\}\",\n \"\\\\sin(x)\",\n \"2 + \\\\hat\\{x\\}\"\n]", "description": ""}, "expression": {"group": "Ungrouped variables", "templateType": "anything", "name": "expression", "definition": "random(expressions)", "description": ""}}, "parts": [], "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

If you don't wrap the string in the latex function, it's displayed as plain text: $\\var{expression}$

\n

The correct way to do it is as follows: $\\var{latex(expression)}$

", "contributors": [{"name": "Joshua Capel", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1479/"}]}]}], "contributors": [{"name": "Joshua Capel", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1479/"}]}