// Numbas version: exam_results_page_options {"name": "Use \\text in LaTeX to get the plain-text font", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"showQuestionGroupNames": false, "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "parts": [], "variable_groups": [], "ungrouped_variables": [], "name": "Use \\text in LaTeX to get the plain-text font", "rulesets": {}, "metadata": {"description": "

Shows how the \\text command is rendered using the plain-text font, not the LaTeX one. Useful for displaying units of measurement and English words inside equations.

", "licence": "Creative Commons Attribution 4.0 International", "notes": ""}, "tags": ["LaTeX", "demo"], "type": "question", "preamble": {"js": "", "css": ""}, "functions": {}, "advice": "", "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "statement": "

I have $15\\,\\mu m$ of stuff. 

\n

This is in LaTeX, and the units don't match the surrounding text. I used \\, to put a space between the number and the units.

\n

I have $15 \\text{ μm}$ of stuff. 

\n

This uses the \\text command and the Unicode μ character, so the units match the text and the only characters rendered in the LaTeX font are the numbers.

\n

I have $15$ μm of stuff. 

\n

The units are completely outside the LaTeX environment. This is easier to write than the \\text version, but you can't always arrange for the units to be at the end of the LaTeX expression.

\n

When you use English phrases in equations, make sure they're rendered in \\text, or they'll look terrible.

\n

\\[ \\frac{\\text{amount of stuff}}{15 \\times(\\text{stuff quotient})} = x \\]

\n

(by the way, unicodeit.net is a great tool to help you find the Unicode characters for things like Greek letters - you type in the LaTeX command, and it gives you the corresponding symbols to paste in anywhere)

", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}