Submit a request
Submit a request

equivSyntax

equivSyntax

Overview

equivSyntax compares a LaTeX string against a syntax pattern specified in the validation settings.

This method is a purely syntactic check and is unaffected by numeric values. Use equivSyntax as a supporting method in combination with equivSymbolic and equivValue to constrain possible response options.

Options

Ignore text
This refers to LaTeX text only, and when enabled will ignore any LaTeX text the student enters in the response area.

Rule
There are nine possible rules available.

  • Number - Any integer or floating point
  • Integer - Any integer
  • Decimal - Any decimal
  • Scientific - Any number in scientific notation
  • Variable - Any variable
  • Fraction - Any fraction
  • Mixed fraction - Any mixed fraction
  • Simple fraction - Any simple fraction
  • Fraction or decimal - A fraction or a decimal

The rules highlighted in bold can have an additional argument associated with them.

Users can specify arguments to further define the desired correct answer. See table below.

 

Rule

Argument

Input

Result

Number

 

2

0.5

.5

.500

.834

1/2

true

true

true

true

true

false

Number

1

0.5

.5

.500

true

true

false

Integer

 

5

0.50

1÷2

50%

true

false

false

false

Integer

3

100

1000

true

false

Decimal

 

1.0

1.23

1.

1

true

true

true

false

Decimal

3

1.000

1.234

1.2

true

true

false

Scientific

 

2 \times 10^3

1.2 \times 10^{-2}

10 \times 10^2

true

true

false

Scientific

2

2.34 \times 10^3

1.2 \times 10^{-2}

true

false

Variable

 

x

y

a

b

foo

true

true

true

true

false

Variable

2

xy

xx

true

false

 

Was this article helpful?
0 out of 0 found this helpful

Did you arrive here by accident? If so, learn more about Learnosity by clicking here.