Jump to navigation

Class: JMEDisplayer

Numbas.jme.display.JMEDisplayer

new JMEDisplayer(settings, scope)

An object which can convert a JME tree into some display format.

Parameters:
Name Type Description
settings Numbas.jme.display.displayer_settings
scope Numbas.jme.Scope
Source:
See:
  • Numbas.jme.display.Texifier
  • Numbas.jme.display.JMEifier

Methods

(abstract) complex_number(n) → {*}

Display a complex number.

Parameters:
Name Type Description
n number
Returns:
Type Description
*
Source:
See:
  • Numbas.jme.display.JMEDisplayer.number

getConstants()

Fill the dictionaries of constants from the scope. Done once, on creation of the Texifier.

Source:

number(n) → {*}

Display a number.

Parameters:
Name Type Description
n number | complex
Returns:
Type Description
*
Source:
See:
  • Numbas.jme.display.JMEDisplayer.complex_number
  • Numbas.jme.display.JMEDisplayer.rational_number
  • Numbas.jme.display.JMEDisplayer.real_number

(abstract) rational_number(n) → {*}

Display a number as a fraction.

Parameters:
Name Type Description
n number
Returns:
Type Description
*
Source:
See:
  • Numbas.jme.display.JMEDisplayer.number

(abstract) real_number(n) → {*}

Display a number as a decimal.

Parameters:
Name Type Description
n number
Returns:
Type Description
*
Source:
See:
  • Numbas.jme.display.JMEDisplayer.number