Skip to content

Commit 26c1d62

Browse files
authored
Merge pull request #24 from lambda-feedback/math_response_areas
Math response areas
2 parents ed6fade + fddf3e3 commit 26c1d62

File tree

4 files changed

+51
-1
lines changed

4 files changed

+51
-1
lines changed

docs/teacher/reference/response_area_components/Expression.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Expression
22

3-
This response area is very similar to [Text](Text.md), differing in that it can display how the user's response was interpreted back to them through the 'live preview' feature. This works using the grading function, providing a `feedback.response_latex` field, which gets rendered.
3+
> **⚠️ DEPRECATED:** This feature is deprecated and will be removed in a future version. Please use [Math_Single_Line](Math_Single_Line.md) instead.
44
55
## Evaluation Function Options
66

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Math_Multi_Line
2+
3+
This response area is a general handwriting input that produces markdown output. Uses the MathPix API, which includes mathematics as dollar-delimited LaTeX.
4+
5+
## Evaluation Function Options
6+
7+
### [chatGPT (experimental)](https://github.com/lambda-feedback/chatGPT/blob/main/app/docs/user.md)
8+
9+
### [evaluateProof (experimental)](https://github.com/lambda-feedback/evaluateProof/blob/main/app/docs/user.md)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ nav:
5656
- Boolean: "teacher/reference/response_area_components/Boolean.md"
5757
- NumericUnits: "teacher/reference/response_area_components/NumericUnits.md"
5858
- Expression: "teacher/reference/response_area_components/Expression.md"
59+
- Math Single Line: "teacher/reference/response_area_components/Math_Single_Line.md"
60+
- Math Multi Line: "teacher/reference/response_area_components/Math_Multi_Line.md"
5961
- MultipleChoice: "teacher/reference/response_area_components/MultipleChoice.md"
6062
- Likert: "teacher/reference/response_area_components/Likert.md"
6163
- Matrix: "teacher/reference/response_area_components/Matrix.md"

0 commit comments

Comments
 (0)