## File: inputjax.rst

package info (click to toggle)
mathjax-docs 2.7+20171212-1
 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 .. _api-input-jax: ************************** The MathJax.InputJax Class ************************** Input jax are the components of MathJax that translate mathematics from its original format (like :term:TeX or :term:MathML) to the MathJax internal format (an element jax). An input jax is stored as a pair of files in a subdirectory of the jax/input directory, with the subdirectory name being the name of the input jax. For example, the TeX input jax is stored in jax/input/TeX. The first file, config.js, is loaded when MathJax is being loaded and configured, and is indicated by listing the input jax directory in the jax array of the MathJax configuration. The config.js file creates a subclass of the MathJax.InputJax object for the new input jax and registers that with MathJax, along with the MIME-type that will be used to indicate the mathematics that is to be processed by the input jax. The main body of the input jax is stored in the second file, jax.js, which is loaded when the input jax is first called on to translate some mathematics. This file augments the original input jax subclass with the additional methods needed to do the translation. MathJax calls the input jax's :meth:Translate() method when it needs the input jax to translate the contents of a math