|
| 1 | +# Math_Single_Line |
| 2 | + |
| 3 | +This response area allows users to type, write or upload mathematics, and then displays how the user's response was interpreted back to them through the 'live preview' feature. |
| 4 | + |
| 5 | +## Evaluation Function Options |
| 6 | + |
| 7 | +### [compareExpressions](https://lambda-feedback.github.io/user-documentation/user_eval_function_docs/compareExpressions/) |
| 8 | + |
| 9 | +## Component Parameters |
| 10 | + |
| 11 | +### `post_response_text` (optional) |
| 12 | + |
| 13 | +Text block to be displayed to the left of the input field. Markdown and LaTeX are allowed following the usual syntax. |
| 14 | + |
| 15 | +### `pre_response_text` (optional) |
| 16 | + |
| 17 | +Text block to be displayed to the left of the input field. Markdown and LaTeX are allowed following the usual syntax. |
| 18 | + |
| 19 | +### Enable Handwriting Input |
| 20 | + |
| 21 | +Enables a handwriting canvas in the browser, which allows a student to draw their expression, rather than type using Sympy's syntax. |
| 22 | + |
| 23 | +### Enable Photo Upload |
| 24 | + |
| 25 | +Allows a student to upload their expression as an image, as an alternative to handwriting if the student isn't using a phone or tablet. |
| 26 | + |
| 27 | +### Handwriting and Image Handling |
| 28 | +Handwriting and students photo uploads are handled with [MathPix](https://docs.mathpix.com/#request-parameters). |
| 29 | + |
| 30 | +Our default parameters include: |
| 31 | +- **formats**: `['text']` - Returns Mathpix Markdown text with math inside delimiters |
| 32 | +- **include_line_data**: `true` - Adds line-by-line data with geometric information about detected elements |
| 33 | +- **rm_spaces**: `true` - Omits spaces around LaTeX groups and other places where spaces are superfluous |
| 34 | +- **rm_fonts**: `true` - Omits `mathbb`, `mathbf`, `mathcal`, and `mathrm` font commands |
| 35 | +- **idiomatic_braces**: `true` - Returns more compact LaTeX (e.g., `x^2` instead of `x^{2}`) |
| 36 | +- **numbers_default_to_math**: `false` - Standalone numbers are treated as text, not automatically wrapped in math mode |
| 37 | +- **math_fonts_default_to_math**: `false` - Text with math fonts is not automatically converted to math mode |
| 38 | +- **math_inline_delimiters**: `['$', '$']` - Delimiters for inline math mode in text output |
| 39 | +- **math_display_delimiters**: `['$$', '$$']` - Delimiters for display/block math mode in text output |
0 commit comments