← 수업 제작 도구
홈 › Components › Math Response (수식 답변) › 화면 1

화면 1. Math Input.latex [source]

원본: Computation Layer 문서(Math Response (수식 답변)) · Try It (원본 화면)

화면 번호1 / 28
문서 항목 설명 (원문)latex Gets the LaTeX string of the input, which is useful for importing into the graphing calculator, the note, and other components.

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 1 캡처

화면에 적힌 영어 문구(원문):

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 그래프그래프


function("f"): simpleFunction(expressionInput.latex,"x")
▶ 그래프의 함수 f는 학생이 expressionInput에 입력한 latex 글자를 x에 관한 함수로 만든 simpleFunction(expressionInput.latex,"x")로 한다.
simpleFunction은 latex 글자를 받아 함수를 돌려주는 함수이고, 첫 인자는 latex 글자, 나머지 인자는 입력 변수 이름이다. 계산기의 function 항목에 넘길 수 있다. function("f")는 simpleFunction()의 결과를 그래프에 정의된 변수에 정한다. latex는 입력한 식의 LaTeX 글자를 가져온다.
2레이블 없는 메모메모
# This extracts the latex-formatted math the student has entered, and inserts
# it into the note's text, wrapping it in ` characters so that it will print as math.
▷ 학생이 입력한 latex 형식의 수식을 가져와 메모의 글에 끼워 넣는다. 이때 ` 문자로 감싸서 수식으로 표시되게 한다.


content: "Trying to graph `${expressionInput.latex}` as a function of `x`."
▶ 메모의 내용(content)은 "Trying to graph `${expressionInput.latex}` as a function of `x`."(`식`을 x에 관한 함수로 그리려는 중)로 한다.
백틱(`)으로 감싼 부분은 latex 값이다. latex는 입력한 식의 LaTeX 글자를 가져오고, ${ }는 글자 안에 변수의 값을 끼워 넣는 표기이다. content는 메모에 직접 적은 글을 덮어쓴다.