diff --git a/types/mathjax/index.d.ts b/types/mathjax/index.d.ts index 47796e3113..e90c3aeee8 100644 --- a/types/mathjax/index.d.ts +++ b/types/mathjax/index.d.ts @@ -4,27 +4,22 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // These are slightly preliminary and can use some more strong typing here and there. Please feel free to improve. -declare var MathJax:jax.IMathJax; +declare namespace MathJax { + export const Hub: Hub; + export const Ajax: Ajax; + export const Message: Message; + export const HTML: HTML; + export const Callback: Callback; + export const Localization: Localization; + export const InputJax: InputJax; + export const OutputJax: OutputJax; -declare namespace jax { - - export interface IMathJax { - Hub?:IMathJaxHub; - Ajax?:IAjax; - Message?:IMessage; - HTML?:IHTML; - Callback?:ICallback; - Localization?:ILocalization; - InputJax?:IInputJax; - OutputJax?:IOutputJax; - } - - export interface ICallback { - (fn:Function):ICallbackObject; - (fns:Function[]):ICallbackObject; - (objs:any[]):ICallbackObject; - (obj:any):ICallbackObject; - (code:string):ICallbackObject; + export interface Callback { + (fn: Function): CallbackObject; + (fns: Function[]): CallbackObject; + (objs: any[]): CallbackObject; + (obj: any): CallbackObject; + (code: string): CallbackObject; /*Waits for the specified time (given in milliseconds) and then performs the callback. It returns the Callback * object (or a blank one if none was supplied). The returned callback structure has a timeout property set to * the result of the setTimeout() call that was used to perform the wait so that you can cancel the wait, if @@ -33,94 +28,94 @@ declare namespace jax { * Since MathJax.Callback.Delay() returns a callback structure, it can be used in a callback queue to insert a * delay between queued commands. */ - Delay(time:number, callback:any):ICallbackObject; + Delay(time: number, callback: any): CallbackObject; /*Creates a MathJax.CallBack.Queue object and pushes the given callbacks into the queue. See Using Queues for * more details about MathJax queues. */ - Queue(...args:any[]):IQueue; + Queue(...args: any[]): Queue; /*Looks for a named signal, creates it if it doesn’t already exist, and returns the signal object. See Using * Signals for more details. */ - Signal(name:string):ISignal; + Signal(name: string): Signal; /*Calls each callback in the hooks array (or the single hook if it is not an array), passing it the arguments * stored in the data array. If reset is true, then the callback’s reset() method will be called before each hook * is executed. If any of the hooks returns a Callback object, then it collects those callbacks and returns a new * callback that will execute when all the ones returned by the hooks have been completed. Otherwise, * MathJax.Callback.ExecuteHooks() returns null. */ - ExecuteHooks(hooks:any[], data:any[], reset:boolean):ICallbackObject; + ExecuteHooks(hooks: any[], data: any[], reset: boolean): CallbackObject; /*Creates a prioritized list of hooks that are called in order based on their priority (low priority numbers are * handled first). This is meant to replace MathJax.Callback.ExecuteHooks() and is used internally for signal * callbacks, pre- and post-filters, and other lists of callbacks. */ - Hooks(reset:boolean):IHooks; + Hooks(reset: boolean): Hooks; } - export interface IHooks { - Add(hook:any, priority:number):ICallbackObject; - Remove(hook:ICallbackObject):void; - Execute():ICallbackObject; + export interface Hooks { + Add(hook: any, priority: number): CallbackObject; + Remove(hook: CallbackObject): void; + Execute(): CallbackObject; } - export interface IQueue { + export interface Queue { /*This is non-zero when the queue is waiting for a command to complete, i.e. a command being processed returns a * Callback object, indicating that the queue should wait for that action to complete before processing * additional commands. */ - pending:number; + pending: number; /*This is non-zero when the queue is executing one of the commands in the queue.*/ - running:number; + running: number; /*An array containing the queued commands that are yet to be performed.*/ - queue:any[]; + queue: any[]; /*Adds commands to the queue and runs them (if the queue is not pending or running another command). If one of * the callbacks is an actual Callback object rather than a callback specification, then the command queued is * an internal command to wait for the given callback to complete. That is, that callback is not itself queued * to be executed, but a wait for that callback is queued. The Push() method returns the last callback that was * added to the queue (so that it can be used for further synchronization, say as an entry in some other queue). */ - Push(specs:any[]):ICallbackObject; + Push(specs: any[]): CallbackObject; /*Process the commands in the queue, provided the queue is not waiting for another command to complete. This * method is used internally; you should not need to call it yourself. */ - Process():void; + Process(): void; /*Increments the running property, indicating that any commands that are added to the queue should not be * executed immediately, but should be queued for later execution (when its Resume() is called). This method is * used internally; you should not need to call it yourself. */ - Suspend():void; + Suspend(): void; /*Decrements the running property, if it is positive. When it is zero, commands can be processed, but that is * not done automatically — you would need to call Process() to make that happen. This method is used * internally; you should not need to call it yourself. */ - Resume():void; + Resume(): void; /*Used internally when an entry in the queue is a Callback object rather than a callback specification. * A callback to this function (passing it the original callback) is queued instead, and it simply returns the * callback it was passed. Since the queue will wait for a callback if it is the return value of one of the * commands it executes, this effectively makes the queue wait for the original callback at that point in the * command queue. */ - wait(callback:Function):Function; + wait(callback: Function): Function; /*An internal function used to restart processing of the queue after it has been waiting for a command to * complete. */ - call():void; + call(): void; } - export interface ISignal { + export interface Signal { /*The name of the signal. Each signal is named so that various components can access it. The first one to * request a particular signal causes it to be created, and other requests for the signal return references * to the same object. */ - name:string; + name: string; /*Array used internally to store the post history so that when new listeners express interests in this signal, * they can be informed of the signals that have been posted so far. This can be cleared using the signal’s * Clear() method. */ - posted:any[]; + posted: any[]; /*Array of callbacks to the listeners who have expressed interest in hearing about posts to this signal. * When a post occurs, the listeners are called, each in turn, passing them the message that was posted. */ - listeners:ICallbackObject[]; + listeners: CallbackObject[]; /*Posts a message to all the listeners for the signal. The listener callbacks are called in turn (with the * message as an argument), and if any return a Callback object, the posting will be suspended until the callback * is executed. In this way, the Post() call can operate asynchronously, and so the callback parameter is used to @@ -135,8 +130,8 @@ declare namespace jax { * * Returns the callback object (or a blank callback object if none was provided). */ - Post(message:string):ICallbackObject; - Post(message:string, callback:ICallbackObject):ICallbackObject; + Post(message: string): CallbackObject; + Post(message: string, callback: CallbackObject): CallbackObject; /*This causes the history of past messages to be cleared so new listeners will not receive them. Note that since * the signal may be operating asynchronously, the Clear() may be queued for later. In this way, the Post() and * Clear() operations will be performed in the proper order even when they are delayed. The callback is called @@ -144,8 +139,8 @@ declare namespace jax { * * Returns the callback (or a blank callback if none is provided). */ - Clear():ICallbackObject; - Clear(callback:ICallbackObject):ICallbackObject; + Clear(): CallbackObject; + Clear(callback: CallbackObject): CallbackObject; /*This method registers a new listener on the signal. It creates a Callback object from the callback * specification, attaches it to the signal, and returns that Callback object. When new messages are posted to * the signal, it runs the callback, passing it the message that was posted. If the callback itself returns a @@ -155,13 +150,13 @@ declare namespace jax { * If ignorePast is false or not present, then before Interest() returns, the callback will be called with all * the past messages that have been sent to the signal. */ - Interest(callback:ICallbackObject):ICallbackObject; - Interest(callback:ICallbackObject, ignorePast:boolean):ICallbackObject; + Interest(callback: CallbackObject): CallbackObject; + Interest(callback: CallbackObject, ignorePast: boolean): CallbackObject; /*This removes a listener from the signal so that no new messages will be sent to it. The callback should be the * one returned by the original Interest() call that attached the listener to the signal in the first place. * Once removed, the listener will no longer receive messages from the signal. */ - NoInterest(callback:ICallbackObject):void; + NoInterest(callback: CallbackObject): void; /*This creates a callback that is called whenever the signal posts the given message. This is a little easier * than having to write a function that must check the message each time it is called. Although the message here * is a string, if a message posted to the signal is an array, then only the first element of that array is used @@ -170,97 +165,97 @@ declare namespace jax { * * Returns the Callback object that was produced. */ - MessageHook(message:string, callback:ICallbackObject):ICallbackObject; + MessageHook(message: string, callback: CallbackObject): CallbackObject; /*Used internally to call the listeners when a particular message is posted to the signal.*/ - ExecuteHook(message:string):void; + ExecuteHook(message: string): void; } - export interface ICallbackObject { + export interface CallbackObject { /*The function to be called when the callback is executed.*/ - hook:number; + hook: number; /*An array containing the arguments to pass to the callback function when it is executed.*/ - data:any[]; + data: any[]; /*The object to use as this during the call to the callback function.*/ - object:any; + object: any; /*Set to true after the callback has been called, and undefined otherwise. A callback will not be executed a * second time unless the callback’s reset() method is called first, or its autoReset property is set to true. */ - called:boolean; + called: boolean; /*Set this to true if you want to be able to call the callback more than once. (This is the case for signal * listeners, for example).*/ - autoReset:boolean; + autoReset: boolean; /*Clears the callback’s called property.*/ - reset():void; + reset(): void; } - export interface IMathJaxHub { + export interface Hub { /*This holds the configuration parameters for MathJax. Set these values using MathJax.Hub.Config() described * below. The options and their default values are given in the Core Options reference page. */ - config?:IMathJaxConfig; + config?: Config; /*The minimum time (in milliseconds) between updates of the “Processing Math” message. After this amount of time * has passed, and after the next equation has finished being processed, MathJax will stop processing momentarily * so that the update message can be displayed, and so that the browser can handle user interaction. */ - processUpdateTime?:number; + processUpdateTime?: number; /*The amount of time (in milliseconds) that MathJax pauses after issuing its processing message before starting * the processing again (to give browsers time to handle user interaction). */ - processUpdateDelay?:number; + processUpdateDelay?: number; /*The hub processing signal (tied to the MathJax.Hub.Register.MessageHook() method).*/ - signal?:ISignal; + signal?: Signal; /*MathJax’s main processing queue. Use MathJax.Hub.Queue() to push callbacks onto this queue.*/ - queue?:any; + queue?: any; /*The name of the browser as determined by MathJax. It will be one of Firefox, Safari, Chrome, Opera, MSIE, * Konqueror, or unkown. This is actually an object with additional properties and methods concerning the * browser */ - Browser?:IBrowserInfo; + Browser?: BrowserInfo; /*An object storing the MIME types associated with the various registered input jax (these are the types of the * * would display “[math]” in place of the math until MathJax is able to typeset it. */ - preRemoveClass?:string; + preRemoveClass?: string; /*This value controls whether the Processing Math: nn% messages are displayed in the lower left-hand corner. * Set to false to prevent those messages (though file loading and other messages will still be shown). */ - showProcessingMessages?:boolean; + showProcessingMessages?: boolean; /*This value controls the verbosity of the messages in the lower left-hand corner. Set it to "none" to eliminate * all messages, or set it to "simple" to show “Loading...” and “Processing...” rather than showing the full file * name or the percentage of the mathematics processed. */ - messageStyle?:string; + messageStyle?: string; /*These two parameters control the alignment and shifting of displayed equations. The first can be "left", * "center", or "right", and determines the alignment of displayed equations. When the alignment is not "center", * the second determines an indentation from the left or right side for the displayed equations.*/ - displayAlign?:string; - displayIndent?:string; + displayAlign?: string; + displayIndent?: string; /*Normally MathJax will perform its startup commands (loading of configuration, styles, jax, and so on) as soon * as it can. If you expect to be doing additional configuration on the page, however, you may want to have it * wait until the page’s onload handler is called. If so, set this to "onload". You can also set this to * "configured", in which case, MathJax will delay its startup until you explicitly call * MathJax.Hub.Configured(). See Configuring MathJax after it is loaded for more details. */ - delayStartupUntil?:string; + delayStartupUntil?: string; /*Normally MathJax will typeset the mathematics on the page as soon as the page is loaded. If you want to delay * that process, in which case you will need to call MathJax.Hub.Typeset() yourself by hand, set this value to * true. */ - skipStartupTypeset?:boolean; + skipStartupTypeset?: boolean; /*This is a list of DOM element ID’s that are the ones to process for mathematics when any of the Hub typesetting * calls (Typeset(), Process(), Update(), etc.) are called with no element specified, and during MathJax’s initial * typesetting run when it starts up. This lets you restrict the processing to particular containers rather than * scanning the entire document for mathematics. If none are supplied, the complete document is processed. */ - elements?:string[]; + elements?: string[]; /*ince typesetting usually changes the vertical dimensions of the page, if the URL contains an anchor position, * then after the page is typeset, you may no longer be positioned at the correct position on the page. MathJax * can reposition to that location after it completes its initial typesetting of the page. This value controls * whether MathJax will reposition the browser to the #hash location from the page URL after typesetting for * the page. */ - positionToHash?:boolean; + positionToHash?: boolean; /*These control whether to attach the MathJax contextual menu to the expressions typeset by MathJax. Since the * code for handling MathPlayer in Internet Explorer is somewhat delicate, it is controlled separately via * showMathMenuMSIE, but the latter is now deprecated in favor of the MathJax contextual menu settings for @@ -703,106 +698,106 @@ declare namespace jax { * since they are shared by all output jax. MathJax will still honor their values from their original positions, * if they are set there. */ - showMathMenu?:boolean; - showMathMenuMSIE?:boolean; + showMathMenu?: boolean; + showMathMenuMSIE?: boolean; /*This block contains settings for the mathematics contextual menu that act as the defaults for the user’s * settings in that menu. * There are also settings for format, renderer, font, mpContext, and mpMouse, but these are maintained by * MathJax and should not be set by the page author. */ - menuSettings?:IMenuSettings; + menuSettings?: MenuSettings; /*This block contains settings that control how MathJax responds to unexpected errors while processing * mathematical equations. Rather than simply crash, MathJax can report an error and go on. */ - errorSettings?:IErrorSettings; - "v1.0-compatible"?:boolean; + errorSettings?: ErrorSettings; + "v1.0-compatible"?: boolean; } - export interface IMathZoom { + export interface MathZoom { /*This is a list of CSS declarations for styling the zoomed mathematics. See the definitions in * extensions/MathZoom.js for details of what are defined by default. See CSS Style Objects for details on how * to specify CSS style in a JavaScript object. */ - styles:any; + styles: any; } - export interface IMathMenu { + export interface MathMenu { /*This is the hover delay for the display (in milliseconds) for submenus in the contextual menu: when the mouse * is over a submenu label for this long, the menu will appear. (The submenu also will appear if you click on its * label.) */ - delay?:number; + delay?: number; /*This is the URL for the MathJax Help menu item. When the user selects that item, the browser opens a new window * with this URL. */ - helpURL?:string; + helpURL?: string; /*This controls whether the “Math Renderer” item will be displayed in the “Math Settings” submenu of the MathJax * contextual menu. It allows the user to change between the HTML-CSS, NativeMML, and SVG output processors for * the mathematics on the page. Set to false to prevent this menu item from showing. */ - showRenderer?:boolean; + showRenderer?: boolean; /*This controls whether the “Font Preference” item will be displayed in the “Math Settings” submenu of the MathJax * contextual menu. This submenu lets the user select what font to use in the mathematics produced by the HTML-CSS * output processor. Note that changing the selection in the font menu will cause the page to reload. Set to false * to prevent this menu item from showing. * */ - showFontMenu?:boolean; + showFontMenu?: boolean; /*This controls whether the “Language” item will be displayed in the MathJax contextual menu. This submenu allows * the user to select the language to use for the MathJax user interface, including the contextual menu, the about * and help dialogs, the message box at the lower left, and any warning messages produced by MathJax. Set this to * false to prevent this menu item from showing. This will force the user to use the language you have set for * MathJax. */ - showLocale?:boolean; + showLocale?: boolean; /*This controls whether the “MathPlayer” item will be displayed in the “Math Settings” submenu of the MathJax * contextual menu. This submenu lets the user select what events should be passed on to the MathPlayer plugin, * when it is present. Mouse events can be passed on (so that clicks will be processed by MathPlayer rather than * MathJax), and menu events can be passed on (to allow the user access to the MathPlayer menu). Set to false to * prevent this menu item from showing. * */ - showMathPlayer?:boolean; + showMathPlayer?: boolean; /*This controls whether the “Contextual Menu” item will be displayed in the “Math Settings” submenu of the MathJax * contextual menu. It allows the user to decide whether the MathJax menu or the browser’s default contextual menu * will be shown when the context menu click occurs over mathematics typeset by MathJax. Set to false to prevent * this menu item from showing. */ - showContext?:boolean; + showContext?: boolean; /*These are the settings for the Annotation submenu of the “Show Math As” menu. If the root element has a * child that contains one of the following annotation formats, the source will be available via the * “Show Math As” menu. Each format has a list of possible encodings. For example, "TeX": ["TeX", "LaTeX", * "application/x-tex"] will map an annotation with an encoding of "TeX", "LaTeX", or "application/x-tex" to the * "TeX" menu. */ - semanticsAnnotations?:any; + semanticsAnnotations?: any; /*These are the settings for the window.open() call that creates the Show Source window. The initial width and * height will be reset after the source is shown in an attempt to make the window fit the output better. */ - windowSettings?:any; + windowSettings?: any; /*This is a list of CSS declarations for styling the menu components. See the definitions in * extensions/MathMenu.js for details of what are defined by default. See CSS Style Objects for details on how * to specify CSS style in a JavaScript object. */ - styles?:any; + styles?: any; } - export interface IMathEvents { + export interface MathEvents { /*This value is the time (in milliseconds) that a user must hold the mouse still over a math element before it * is considered to be hovering over the math. */ - hover?:number; + hover?: number; /*This is a list of CSS declarations for styling the zoomed mathematics. See the definitions in * extensions/MathEvents.js for details of what are defined by default. See CSS Style Objects for details on how * to specify CSS style in a JavaScript object. */ - styles?:any; + styles?: any; } - export interface IFontWarnings { + export interface FontWarnings { /*This sets the CSS styles to be used for the font warning message window. See the extensions/FontWarnings.js * file for details of what are set by default. See the CSS style objects for details about how to specify CSS * styles via javascript objects. */ - messageStyle?:any; + messageStyle?: any; /*This block contains HTML snippets to be used for the various messages that the FontWarning extension can * produce. * See the description of HTML snippets for details about how to describe the messages using HTML snippets. Note @@ -811,116 +806,116 @@ declare namespace jax { * below in the HTML block, and are referenced using ["name"] within the snippet, where name is the name of one * of the snippets defined in the HTML configuration block */ - Message?:IHTMLMessages; + Message?: HTMLMessages; /*This object defines HTML snippets that are common to more than one message in the Message section above. They * can be included in other HTML snippets by by using ["name"] in an HTML snippet, where name refers to the name * of the snippet in the HTML block. * You can add your own pre-defined HTML snippets to this object, or override the ones that are there with your * own text. */ - HTML?:IHTMLSnippets; + HTML?: HTMLSnippets; /*This is the amount of time to show the FontWarning message, in milliseconds. The default is 12 seconds. * Setting this value to zero means that the message will not fade out (the user must close it manually). */ - removeAfter?:number; + removeAfter?: number; /*This is the number of steps to take while fading out the FontWarning message. More steps make for a smoother * fade-out. Set to zero to cause the message to be removed without fading. */ - fadeoutSteps?:number; + fadeoutSteps?: number; /*This is the time used to perform the fade-out, in milliseconds. The default is 1.5 seconds.*/ - fadeoutTime?:number; + fadeoutTime?: number; } - export interface IHTMLMessages { + export interface HTMLMessages { /*The message used for when MathJax uses web-based fonts (rather than local fonts installed on the user’s * system). */ - webFont?:any[]; + webFont?: any[]; /*The message used for when MathJax must use image fonts rather than local or web-based fonts (for those * browsers that don’t handle the @font-face CSS directive). */ - imageFonts?:any[]; + imageFonts?: any[]; /*The message used when MathJax is unable to find any font to use (i.e., neither local nor web-based nor * image-based fonts are available). */ - noFonts?:any[]; + noFonts?: any[]; } - export interface IHTMLSnippets { + export interface HTMLSnippets { /*The HTML for the close box in the FontWarning message.*/ - closeBox?:string; + closeBox?: string; /*The HTML for a paragraph suggesting an upgrade to a more modern browser that supports web fonts.*/ - webfonts?:string; + webfonts?: string; /*HTML that includes links to the MathJax and STIX font download pages.*/ - fonts?:string; + fonts?: string; /*HTML that gives the download link for the STIX fonts only. (Used in place of fonts when the HTML-CSS option * for availableFonts only includes the STIX fonts.) */ - STIXfonts?:string; + STIXfonts?: string; /*HTML that gives the download link for the MathJax TeX fonts only. (Used in place of fonts when the HTML-CSS * option for availableFonts only includes the TeX fonts.) */ - TeXfonts?:string; + TeXfonts?: string; } - export interface ISafe { + export interface Safe { /*This block contains the flags that control what the Safe extension will allow, and what it will block. The * flags can be set to "all", "none", or "safe". When set to "all", no filtering is done for these values (this * gives MathJax’s default behavior). When set to "none", these values are always filtered out. When set to * "safe", then only some values are allowed. */ - allow?:ISafeAllow; + allow?: SafeAllow; /*This is the minimum font size (in em’s) that the TeX input jax will allow when fontsize is set to "safe" above. * The default is the size of \scriptsize. Values less than this are set to this value. */ - sizeMin?:number; + sizeMin?: number; /*This is the maximum font size (in em’s) that the TeX input jax will allow when fontsize is set to "safe" above. * The default is the size of \large. Values larger than this are set to this value. */ - sizeMax?:number; + sizeMax?: number; /*This is an object that lists the protocols that can be used in href attributes and the \href macro when URLs * is set to "safe" above. * Note that if a protocol doesn’t appear in the list, it is assumed to be false, so technically, javascript need * not have been listed, but it is given to make it explicit that it should not be allowed. */ - safeProtocols?:ISafeProtocols; + safeProtocols?: SafeProtocols; /*This is an object that lists the style properties that can be used in MathML style attributes and the \style * and \bbox macros when styles is set to "safe" in the allowed property above. * Any style property that doesn’t appear on this list is not allowed to be entered and will be removed (silently) * from the style definition. */ - safeStyles?:ISafeStyles; + safeStyles?: SafeStyles; /*This is an object that lists the TeX extensions that can be loaded via the \require{} macro when require is * set to "safe" in the allowed property above. * These configuration options give you a lot of control over what actions MathJax is allowed to take. It is also * possible override the individual filtering functions in order to customize the filtering even further, should * that be needed. See the code for the details of the function names and their definitions. */ - safeRequire?:ISafeRequire; + safeRequire?: SafeRequire; } - export interface ISafeAllow { + export interface SafeAllow { /*When set to "safe" only URL’s with protocols that are listed in the safeProtocols property (see below) are * allowed as targets of href attributes or the \href macro. By default, these are http://, https://, and * file:// URL’s. */ - URLs?:string; + URLs?: string; /*When set to "safe", only class names that begin with MJX- and contain only letters, numbers, or the * characters -, _, or . are allowed. */ - classes?:string; + classes?: string; /*When set to "safe", only ID’s that begin with MJX- and contain only letters, numbers, or the characters -, _, * or . are allowed. */ - cssIDs?:string; + cssIDs?: string; /*When set to "safe", only styles taken from a predefined set of styles are allowed to be given. These are * listed in the safeStyles property (see below). */ - styles?:string; + styles?: string; /*When set to "safe", only the extensions listed in the safeRequire property (see below) are allowed to be * loaded by the \require{} macro. */ - require?:string; + require?: string; /*When set to "safe", MathJax will try to limit the font size to sizes between those given by the sizeMin and * sizeMax properties. These are .7 and 1.44 by default, which means sizes between \scriptsize and \large are * allowed. This also filters MathML fontsize, mathsize, and scriptminsize attributes, but here, "safe" acts as @@ -929,171 +924,171 @@ declare namespace jax { * non-negative values (so scripts can’t be made larger), and the scriptsizemultiplier is restricted to being * no larger than 1, and no less than .6. */ - fontsize?:string; + fontsize?: string; } - export interface ISafeProtocols { - http?:boolean; - https?:boolean; - file?:boolean; - javascript?:boolean; + export interface SafeProtocols { + http?: boolean; + https?: boolean; + file?: boolean; + javascript?: boolean; } - export interface ISafeStyles { - color?:boolean; - backgroundColor?:boolean; - border?:boolean; - cursor?:boolean; - margin?:boolean; - padding?:boolean; - textShadow?:boolean; - fontFamily?:boolean; - fontSize?:boolean; - fontStyle?:boolean; - fontWeight?:boolean; - opacity?:boolean; - outline?:boolean; + export interface SafeStyles { + color?: boolean; + backgroundColor?: boolean; + border?: boolean; + cursor?: boolean; + margin?: boolean; + padding?: boolean; + textShadow?: boolean; + fontFamily?: boolean; + fontSize?: boolean; + fontStyle?: boolean; + fontWeight?: boolean; + opacity?: boolean; + outline?: boolean; } - export interface ISafeRequire { - action?:boolean; - amscd?:boolean; - amsmath?:boolean; - amssymbols?:boolean; - autobold?:boolean; - "autoload-all"?:boolean; - bbox?:boolean; - begingroup?:boolean; - boldsymbol?:boolean; - cancel?:boolean; - color?:boolean; - enclose?:boolean; - extpfeil?:boolean; - HTML?:boolean; - mathchoice?:boolean; - mhchem?:boolean; - newcommand?:boolean; - noErrors?:boolean; - noUndefined?:boolean; - unicode?:boolean; - verb?:boolean; + export interface SafeRequire { + action?: boolean; + amscd?: boolean; + amsmath?: boolean; + amssymbols?: boolean; + autobold?: boolean; + "autoload-all"?: boolean; + bbox?: boolean; + begingroup?: boolean; + boldsymbol?: boolean; + cancel?: boolean; + color?: boolean; + enclose?: boolean; + extpfeil?: boolean; + HTML?: boolean; + mathchoice?: boolean; + mhchem?: boolean; + newcommand?: boolean; + noErrors?: boolean; + noUndefined?: boolean; + unicode?: boolean; + verb?: boolean; } - export interface IMatchWebFonts { + export interface MatchWebFonts { /*This block controls whether to apply font size matching for each output mode.*/ - matchFor?:IMatchFor; + matchFor?: MatchFor; /*Initial delay before the first check for web fonts (in milliseconds).*/ - fontCheckDelay?:number; + fontCheckDelay?: number; /*How long to keep looking for fonts (in milliseconds).*/ - fontCheckTimeout?:number; + fontCheckTimeout?: number; } - export interface IMatchFor { + export interface MatchFor { /*Whether to match the font size for the HTML-CSS output.*/ - "HTML-CSS"?:boolean; + "HTML-CSS"?: boolean; /*Whether to match the font size for the NativeMML output.*/ - NativeMML?:boolean; + NativeMML?: boolean; /*Whether to match the font size for the SVG output.*/ - SVG?:boolean; + SVG?: boolean; } - export interface ISVGOutputProcessor { + export interface SVGOutputProcessor { /*The scaling factor (as a percentage) of math with respect to the surrounding text. The SVG output processor * tries to match the ex-size of the mathematics with that of the text where it is placed, but you may want to * adjust the results using this scaling factor. The user can also adjust this value using the contextual menu * item associated with the typeset mathematics. */ - scale?:number; + scale?: number; /*This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the * surrounding text. This will prevent MathJax from making the mathematics too small. */ - minScaleAdjust?:number; + minScaleAdjust?: number; /*This is the font to use for rendering the mathematics. The possible values are TeX, STIX-Web, Asana-Math, * Neo-Euler, Gyre-Pagella, Gyre-Termes and Latin-Modern. Note that not all mathematical characters are available * in all fonts (e.g., Neo-Euler does not include italic characters), so some mathematics may work better in some * fonts than in others. The STIX-Web font is the most complete. */ - font?:string; + font?: string; /*This is the stroke width to use for all character paths (1em = 1000 units). This is a cheap way of getting * slightly lighter or darker characters, but remember that not all displays will act the same, so a value that * is good for you may not be good for everyone. */ - blacker?:number; + blacker?: number; /*This is the font-family CSS value used for characters that are not in the selected font (e.g., this is where * to look for characters not included in the MathJax TeX fonts). IE will stop looking after the first font that * exists on the system (even if it doesn’t contain the needed character), so order these carefully. */ - undefinedFamily?:string[]; + undefinedFamily?: string[]; /*This setting controls whether elements will be typeset using the math fonts or the font of the * surrounding text. When false, the font for mathvariant="normal" will be used; when true, the font will be * inherited from the surrounding paragraph. */ - mtextFontInherit?:boolean; + mtextFontInherit?: boolean; /*This controls whether the MathML structure is retained and CSS classes are added to mark the original MathML * elements (as in the output from the HTML-CSS output jax). By default, the SVG output jax removes unneeded * nesting in order to produce a more efficient markup, but if you want to use CSS to style the elements as if * they were MathML, you might need to set this to true. */ - addMMLclasses?:boolean; + addMMLclasses?: boolean; /*EqnChunk is the number of equations that will be typeset before they appear on screen. Larger values make for * less visual flicker as the equations are drawn, but also mean longer delays before the reader sees anything. */ - EqnChunk?:number; + EqnChunk?: number; /*EqChunkFactor is the factor by which the EqnChunk will grow after each chunk is displayed.*/ - EqnChunkFactor?:number; + EqnChunkFactor?: number; /*EqChunkDelay is the time (in milliseconds) to delay between chunks (to allow the browser to respond to other * user interaction). * Set EqnChunk to 1, EqnChunkFactor to 1, and EqnChunkDelay to 10 to get the behavior from MathJax v1.1 and * below. */ - EqnChunkDelay?:number; + EqnChunkDelay?: number; /*This option indicates whether MathJax should try to adjust the x-height of equations to match the x-height of * the surrounding text. See the MatchWebFonts options for finer control, especially if you are using Web fonts. */ - matchFontHeight?:boolean; + matchFontHeight?: boolean; /*This is an object that configures automatic linebreaking in the SVG output. In order to be backward compatible * with earlier versions of MathJax, only explicit line breaks are performed by default, so you must enable line * breaks if you want automatic ones. */ - linebreaks?:ILineBreaks; + linebreaks?: LineBreaks; /*This is a list of CSS declarations for styling the SVG output. See the definitions in jax/output/SVG/config.js * for some examples of what are defined by default. See CSS Style Objects for details on how to specify CSS * style in a JavaScript object. */ - styles?:any; + styles?: any; /*This sets the configuration options for elements with actiontype="tooltip". (See also the * #MathJax_Tooltip style setting in jax/output/SVG/config.js, which can be overridden using the styles option * above.) */ - tooltip?:IToolTip; + tooltip?: ToolTip; } - export interface ILineBreaks { + export interface LineBreaks { /*This controls the automatic breaking of expressions: when false, only linebreak="newline" is processed; when * true, line breaks are inserted automatically in long expressions. */ - automatic?:boolean; + automatic?: boolean; /*This controls how wide the lines of mathematics can be. * Use an explicit width like "30em" for a fixed width. Use "container" to compute the size from the containing * element. Use "nn% container" for a portion of the container. Use "nn%" for a portion of the window size. * The container-based widths may be slower, and may not produce the expected results if the layout width changes * due to the removal of previews or inclusion of mathematics during typesetting. */ - width?:string; + width?: string; } - export interface IToolTip { + export interface ToolTip { /*The delay (in milliseconds) before the tooltip is posted after the mouse is moved over the maction element.*/ - delayPost:number; + delayPost: number; /*The delay (in milliseconds) before the tooltop is cleared after the mouse moves out of the maction element.*/ - delayClear:number; + delayClear: number; /*The X offset from the mouse position (in pixels) where the tooltip will be placed.*/ - offsetX:number; + offsetX: number; /*The Y offset from the mouse position (in pixels) where the tooltip will be placed.*/ - offsetY:number; + offsetY: number; } - export interface IMMLorHTMLConfiguration { + export interface MMLorHTMLConfiguration { /*This lets you set the preferred renderer on a browser-by-browser basis. You set the browser to either "MML" or * "HTML" depending on whether you want to use the NativeMML or HTML-CSS output processor. Note that although * Opera and Safari do process some MathML natively, their support is not sufficient to handle the more @@ -1104,62 +1099,62 @@ declare namespace jax { * Note that users can still use the MathJax contextual menu to select a different renderer after the default * one has been chosen by MMLorHTML.js. */ - prefer?:IBrowserPreference; + prefer?: BrowserPreference; } - export interface IBrowserPreference { - MSIE?:string; - Firefox?:string; - Safari?:string; - Chrome?:string; - Opera?:string; - other?:string; + export interface BrowserPreference { + MSIE?: string; + Firefox?: string; + Safari?: string; + Chrome?: string; + Opera?: string; + other?: string; } - export interface INativeMMLOutputProcessor { + export interface NativeMMLOutputProcessor { /*The scaling factor (as a percentage) of math with respect to the surrounding text. The NativeMML output * processor tries to match the ex-size of the mathematics with that of the text where it is placed, but you may * want to adjust the results using this scaling factor. The user can also adjust this value using the contextual * menu item associated with the typeset mathematics. */ - scale?:number; + scale?: number; /*This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the * surrounding text. This will prevent MathJax from making the mathematics too small. */ - minScaleAdjust?:number; + minScaleAdjust?: number; /*This option indicates whether MathJax should try to adjust the x-height of equations to match the x-height of * the surrounding text. See the MatchWebFonts options for finer control, especially if you are using Web fonts. */ - matchFontHeight?:boolean; + matchFontHeight?: boolean; /*This is a list of CSS declarations for styling the NativeMML output. See the definitions in * jax/output/NativeMML/config.js for some examples of what are defined by default. See CSS Style Objects for * details on how to specify CSS style in a JavaScript object. */ - styles?:any; + styles?: any; } - export interface IHTMLCSSOutputProcessor { + export interface HTMLCSSOutputProcessor { /*The scaling factor (as a percentage) of math with respect to the surrounding text. The HTML-CSS output * processor tries to match the ex-size of the mathematics with that of the text where it is placed, but you may * want to adjust the results using this scaling factor. The user can also adjust this value using the contextual * menu item associated with the typeset mathematics. */ - scale?:number; + scale?: number; /*This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the * surrounding text. This will prevent MathJax from making the mathematics too small. */ - minScaleAdjust?:number; + minScaleAdjust?: number; /*This is a list of the fonts to look for on a user’s computer in preference to using MathJax’s web-based fonts. * These must correspond to directories available in the jax/output/HTML-CSS/fonts directory, where MathJax * stores data about the characters available in the fonts. Set this to ["TeX"], for example, to prevent the use * of the STIX fonts, or set it to an empty list, [], if you want to force MathJax to use web-based or image * fonts. */ - availableFonts?:string[]; + availableFonts?: string[]; /*Which font to prefer out of the availableFonts list, when more than one is available on the user’s computer. * Set it to null if you want MathJax to use web-based or image fonts. */ - preferredFont?:string; + preferredFont?: string; /*This is the web-based font to use when none of the fonts listed above are available on the user’s computer. The * possible values are TeX, STIX-Web, Asana-Math, Neo-Euler, Gyre-Pagella, Gyre-Termes and Latin-Modern. Note * that not all mathematical characters are available in all fonts (e.g., Neo-Euler does not include italic @@ -1169,7 +1164,7 @@ declare namespace jax { * These fonts are stored in the fonts/HTML-CSS folder in the MathJax directory. Set this to null to disable web * fonts. */ - webFont?:string; + webFont?: string; /* This is the font to use for image fallback mode (when none of the fonts listed above are available and the * browser doesn’t support web-fonts via the @font-face CSS directive). Note that currently only the TeX font is * available as an image font (they are stored in the fonts/HTML-CSS directory). @@ -1180,121 +1175,121 @@ declare namespace jax { * fonts include: IE6 and later, Chrome, Safari3.1 and above, Firefox3.5 and later, and Opera10 and later. Note * that Firefox3.0 is not on this list. */ - imageFont?:string; + imageFont?: string; /*This is the font-family CSS value used for characters that are not in the selected font (e.g., for web-based * fonts, this is where to look for characters not included in the MathJax web fonts). IE will stop looking after * the first font that exists on the system (even if it doesn’t contain the needed character), so order these * carefully. */ - undefinedFamily?:string[]; + undefinedFamily?: string[]; /*This setting controls whether elements will be typeset using the math fonts or the font of the * surrounding text. When false, the font for mathvariant="normal" will be used; when true, the font will be * inherited from the surrounding paragraph. */ - mtextFontInherit?:boolean; + mtextFontInherit?: boolean; /*EqnChunk is the number of equations that will be typeset before they appear on screen. Larger values make for * less visual flicker as the equations are drawn, but also mean longer delays before the reader sees anything. */ - EqnChunk?:number; + EqnChunk?: number; /*EqChunkFactor is the factor by which the EqnChunk will grow after each chunk is displayed.*/ - EqnChunkFactor?:number; + EqnChunkFactor?: number; /*EqChunkDelay is the time (in milliseconds) to delay between chunks (to allow the browser to respond to other * user interaction). * Set EqnChunk to 1, EqnChunkFactor to 1, and EqnChunkDelay to 10 to get the behavior from MathJax v1.1 and * below. */ - EqnChunkDelay?:number; + EqnChunkDelay?: number; /*This option indicates whether MathJax should try to adjust the x-height of equations to match the x-height of * the surrounding text. See the MatchWebFonts options for finer control, especially if you are using Web fonts. */ - matchFontHeight?:boolean; + matchFontHeight?: boolean; /*This is an object that configures automatic linebreaking in the SVG output. In order to be backward compatible * with earlier versions of MathJax, only explicit line breaks are performed by default, so you must enable line * breaks if you want automatic ones. */ - linebreaks?:ILineBreaks; + linebreaks?: LineBreaks; /*This is a list of CSS declarations for styling the SVG output. See the definitions in jax/output/SVG/config.js * for some examples of what are defined by default. See CSS Style Objects for details on how to specify CSS * style in a JavaScript object. */ - styles?:any; + styles?: any; /*This value has been moved to the core configuration block, since it applies to all output jax, but it will * still be honored (for now) if it is set here. See the Core configuration options for more details. */ - showMathMenu?:boolean; + showMathMenu?: boolean; /*This sets the configuration options for elements with actiontype="tooltip". (See also the * #MathJax_Tooltip style setting in jax/output/SVG/config.js, which can be overridden using the styles option * above.) */ - tooltip?:IToolTip; + tooltip?: ToolTip; } - export interface ICommonHTMLOutputProcessor { + export interface CommonHTMLOutputProcessor { /*The scaling factor (as a percentage) of math with respect to the surrounding text. The CommonHTML output * processor tries to match the ex-size of the mathematics with that of the text where it is placed, but you may * want to adjust the results using this scaling factor. The user can also adjust this value using the contextual * menu item associated with the typeset mathematics. */ - scale?:number; + scale?: number; /*This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the * surrounding text. This will prevent MathJax from making the mathematics too small. */ - minScaleAdjust?:number; + minScaleAdjust?: number; /*This setting controls whether elements will be typeset using the math fonts or the font of the * surrounding text. When false, the font for mathvariant="normal" will be used; when true, the font will be * inherited from the surrounding paragraph. */ - mtextFontInherit?:boolean; + mtextFontInherit?: boolean; /*This is an object that configures automatic linebreaking in the CommonHTML output. In order to be backward * compatible with earlier versions of MathJax, only explicit line breaks are performed by default, so you must * enable line breaks if you want automatic ones. */ - linebreaks?:ILineBreaks; + linebreaks?: LineBreaks; } - export interface IAsciiMathInputProcessor { + export interface AsciiMathInputProcessor { /*Determines whether operators like summation symbols will have their limits above and below the operators * (true) or to their right (false). The former is how they would appear in displayed equations that appear on * their own lines, while the latter is better suited to in-line equations so that they don’t interfere with the * line spacing so much. */ - displaystyle?:boolean; + displaystyle?: boolean; /*This is the character to be used for decimal points in numbers. if you change this to ",", then you need to be * careful about entering points or intervals. E.g., use (1, 2) rather than (1,2) in that case. */ - decimal?:string; + decimal?: string; } - export interface IMathMLInputProcessor { + export interface MathMLInputProcessor { /*Specifies whether to use TeX spacing or MathML spacing when the HTML-CSS output jax is used.*/ - useMathMLspacing?:boolean; + useMathMLspacing?: boolean; } - export interface ITeXInputProcessor { + export interface TeXInputProcessor { /*This specifies the side on which \tag{} macros will place the tags. Set it to "left" to place the tags on the * left-hand side. */ - TagSide?:string; + TagSide?: string; /*This is the amount of indentation (from the right or left) for the tags produced by the \tag{} macro.*/ - TagIndent?:string; + TagIndent?: string; /*The width to use for the multline environment that is part of the AMSmath extension. This width gives room for * tags at either side of the equation, but if you are displaying mathematics in a small area or a thin column of * text, you might need to change the value to leave sufficient margin for tags. */ - MultLineWidth?:string; + MultLineWidth?: string; /*This object controls the automatic equation numbering and the equation referencing.*/ - equationNumbers?:IEquationNumbers; + equationNumbers?: EquationNumbers; /*This lists macros to define before the TeX input processor begins. These are name:value pairs where the name * gives the name of the TeX macro to be defined, and value gives the replacement text for the macro. The value * can be an array of the form [value,n], where value is the replacement text and n is the number of parameters * for the macro. Note that since the value is a javascript string, backslashes in the replacement text must be * doubled to prevent them from acting as javascript escape characters. */ - Macros?:any; + Macros?: any; /*Because a definition of the form \def\x{\x} \x would cause MathJax to loop infinitely, the MAXMACROS constant * will limit the number of macro substitutions allowed in any expression processed by MathJax. */ - MAXMACROS?:number; + MAXMACROS?: number; /*Because a definition of the form \def\x{\x aaa} \x would loop infinitely, and at the same time stack up lots * of a’s in MathJax’s equation buffer, the MAXBUFFER constant is used to limit the size of the string being * processed by MathJax. It is set to 5KB, which should be sufficient for any reasonable equation. @@ -1309,43 +1304,43 @@ declare namespace jax { extensions?: string[]; } - export interface IEquationNumbers { + export interface EquationNumbers { /*This controls whether equations are numbered and how. By default it is set to "none" to be compatible with * earlier versions of MathJax where auto-numbering was not performed (so pages will not change their * appearance). You can change this to "AMS" for equations numbered as the AMSmath package would do, or "all" to * get an equation number for every displayed equation. */ - autoNumber?:string; + autoNumber?: string; /*A function that tells MathJax what tag to use for equation number n. This could be used to have the equations * labeled by a sequence of symbols rather than numbers, or to use section and subsection numbers instead. */ - formatNumber?:(n:number)=>string; + formatNumber?: (n: number) => string; /*A function that tells MathJax how to format an equation number for displaying as a tag for an equation. This * is what appears in the margin of a tagged or numbered equation.*/ - formatTag?:(n:number)=>string; + formatTag?: (n: number) => string; /*A function that tells MathJax what ID to use as an anchor for the equation (so that it can be used in URL * references). */ - formatID?:()=>string; + formatID?: () => string; /*A function that takes an equation ID and returns the URL to link to it.*/ - formatURL?:(id:string)=>string; + formatURL?: (id: string) => string; /*This controls whether element ID’s use the \label name or the equation number. When true, use the label, when * false, use the equation number. */ - useLabelIds?:boolean; + useLabelIds?: boolean; } - export interface IJSMath2jaxPreprocessor { + export interface JSMath2jaxPreprocessor { /*This controls whether jsMath2jax inserts MathJax_Preview spans to make a preview available, and what preview * to use, when it locates in-line or display mathematics in the page. The default is "TeX", which means use the * TeX code as the preview (which will be visible until it is processed by MathJax). Set to "none" to prevent * previews from being inserted (the math will simply disappear until it is typeset). Set to an array containing * the description of an HTML snippet in order to use the same preview for all equations on the page. */ - preview:any; + preview: any; } - export interface IAsciimath2jaxPreprocessor { + export interface Asciimath2jaxPreprocessor { /*Array of pairs of strings that are to be used as math delimiters. The first in each pair is the initial * delimiter and the second is the terminal delimiter. You can have as many pairs as you want. For example, * @@ -1358,7 +1353,7 @@ declare namespace jax { * turned into tags by the browser before MathJax has the chance to run. You can only include text, not tags, * as your math delimiters. */ - delimiters?:any; + delimiters?: any; /*This controls whether asciimath2jax inserts MathJax_Preview spans to make a preview available, and what * preview to use, when it locates in-line or display mathematics in the page. The default is "AsciiMath", which * means use the ASCIIMath code as the preview (which will be visible until it is processed by MathJax). Set to @@ -1371,12 +1366,12 @@ declare namespace jax { * preview: ["[math]"], // insert the text "[math]" as the preview * preview: [["img",{src: "/images/mypic.jpg"}]], // insert an image as the preview */ - preview?:any; + preview?: any; /*This array lists the names of the tags whose contents should not be processed by asciimath2jax (other than to * look for ignore/process classes as listed below). You can add to (or remove from) this list to prevent MathJax * from processing mathematics in specific contexts. */ - skipTags?:string[]; + skipTags?: string[]; /*This is the class name used to mark elements whose contents should not be processed by asciimath2jax (other * than to look for the processClass pattern below). Note that this is a regular expression, and so you need to * be sure to quote any regexp special characters. The pattern is inserted into one that requires your pattern to @@ -1385,7 +1380,7 @@ declare namespace jax { * vertical line character (|). For instance, with ignoreClass: "class1|class2" any element assigned a class of * either class1 or class2 will be skipped. */ - ignoreClass?:string; + ignoreClass?: string; /*This is the class name used to mark elements whose contents should be processed by asciimath2jax. This is used * to restart processing within tags that have been marked as ignored via the ignoreClass or to cause a tag that * appears in the skipTags list to be processed rather than skipped. Note that this is a regular expression, and @@ -1395,10 +1390,10 @@ declare namespace jax { * separating them by the vertical line character (|). For instance, with processClass: "class1|class2" any * element assigned a class of either class1 or class2 will have its contents processed. */ - processClass?:string; + processClass?: string; } - export interface IMML2jaxPreprocessor { + export interface MML2jaxPreprocessor { /*This controls whether mml2jax inserts MathJax_Preview spans to make a preview available, and what preview to * use, when it locates mathematics on the page. Possible values are: "mathml", "alttext", , "altimg", "none", * or an HTML snippet. @@ -1415,10 +1410,10 @@ declare namespace jax { * preview: ["[math]"], // insert the text "[math]" as the preview * preview: [["img",{src: "/images/mypic.jpg"}]], // insert an image as the preview */ - preview?:any; + preview?: any; } - export interface ITEX2jaxPreprocessor { + export interface TEX2jaxPreprocessor { /*Array of pairs of strings that are to be used as in-line math delimiters. The first in each pair is the * initial delimiter and the second is the terminal delimiter. You can have as many pairs as you want. For * example, @@ -1432,7 +1427,7 @@ declare namespace jax { * turned into tags by the browser before MathJax has the chance to run. You can only include text, not tags, as * your math delimiters. */ - inlineMath?:any; + inlineMath?: any; /*Array of pairs of strings that are to be used as delimiters for displayed equations. The first in each pair is * the initial delimiter and the second is the terminal delimiter. You can have as many pairs as you want. * @@ -1440,7 +1435,7 @@ declare namespace jax { * turned into tags by the browser before MathJax has the chance to run. You can only include text, not tags, as * your math delimiters. */ - displayMath?:any; + displayMath?: any; /*This value determines whether tex2jax requires braces to be balanced within math delimiters (which allows for * nested dollar signs). Set to false to get pre-v2.0 compatibility. When true, * @@ -1448,18 +1443,18 @@ declare namespace jax { * will be properly handled as a single expression. When false, it would be interpreted as two searpate * expressions, each with improperly balanced braces. */ - balanceBraces?:boolean; + balanceBraces?: boolean; /*When set to true, you may use \$ to represent a literal dollar sign, rather than using it as a math delimiter. * When false, \$ will not be altered, and the dollar sign may be considered part of a math delimiter. Typically * this is set to true if you enable the $ ... $ in-line delimiters, so you can type \$ and tex2jax will convert * it to a regular dollar sign in the rendered document. */ - processEscapes?:boolean; + processEscapes?: boolean; /*When true, tex2jax looks not only for the in-line and display math delimiters, but also for LaTeX environments * (\begin{something}...\end{something}) and marks them for processing by MathJax. When false, LaTeX environments * will not be processed outside of math mode. */ - processEnvironments?:boolean; + processEnvironments?: boolean; /*This controls whether tex2jax inserts MathJax_Preview spans to make a preview available, and what preview to * use, when it locates in-line or display mathematics in the page. The default is "TeX", which means use the TeX * code as the preview (which will be visible until it is processed by MathJax). Set to "none" to prevent @@ -1471,12 +1466,12 @@ declare namespace jax { * preview: ["[math]"], // insert the text "[math]" as the preview * preview: [["img",{src: "/images/mypic.jpg"}]], // insert an image as the preview */ - preview?:any; + preview?: any; /*This array lists the names of the tags whose contents should not be processed by tex2jax (other than to look * for ignore/process classes as listed below). You can add to (or remove from) this list to prevent MathJax from * processing mathematics in specific contexts. */ - skipTags?:string[]; + skipTags?: string[]; /*This is the class name used to mark elements whose contents should not be processed by tex2jax (other than to * look for the processClass pattern below). Note that this is a regular expression, and so you need to be sure * to quote any regexp special characters. The pattern is inserted into one that requires your pattern to match @@ -1485,7 +1480,7 @@ declare namespace jax { * line character (|). For instance, with ignoreClass: "class1|class2" any element assigned a class of either * class1 or class2 will be skipped. */ - ignoreClass?:string; + ignoreClass?: string; /*This is the class name used to mark elements whose contents should be processed by tex2jax. This is used to * restart processing within tags that have been marked as ignored via the ignoreClass or to cause a tag that * appears in the skipTags list to be processed rather than skipped. Note that this is a regular expression, and @@ -1494,62 +1489,62 @@ declare namespace jax { * with class="class1 class2 class3" but not class="myclass2". Note that you can assign several classes by * separating them by the vertical line character (|). For instance, with processClass: "class1|class2" any * element assigned a class of either class1 or class2 will have its contents processed.*/ - processClass?:string; + processClass?: string; } - export interface ILocalization { + export interface Localization { /*The currently selected locale, e.g., "fr". This is set by the setLocale() method, and should not be modified * by hand. */ - locale:string; + locale: string; /*The URL for the localization data files. This can be overridden for individual languages or domains * (see below). The default is [MathJax]/localization. */ - directory:string; + directory: string; /*This is the main data structure that holds the translation strings. It consists of an entry for each language * that MathJax knows about, e.g., there would be an entry with key fr whose value is the data for the French * translation. Initially, these simply reference the files that define the translation data, which MathJax will * load when needed. After the file is loaded, they will contain the translation data as well. This is described * in more detail below. */ - strings:any; + strings: any; /*The function (described in detail above) that returns the translated string for a given id, substituting the * given arguments as needed. */ - _(id:number, message:string, ...args:any[]):void; + _(id: number, message: string, ...args: any[]): void; /*Sets the selected locale to the given one*/ - setLocale(locale:string):void; + setLocale(locale: string): void; /*Defines (or adds to) the translation data for the given locale and domain. The def is the definition to be * merged with the current translation data (if it exists) or to be used as the complete definition (if not). */ - addTranslation(locale:string, domain:string, def:any):void; + addTranslation(locale: string, domain: string, def: any): void; /*Sets the CSS for the given div to reflect the needs of the locale. In particular, it sets the font-family, * if needed, and the direction (for right-to-left languages). */ - setCSS(div:any):any; + setCSS(div: any): any; /*Get the font-family needed to display text in the selected language. Returns null if no special font is * required. */ - fontFamily():string; + fontFamily(): string; /*Get the direction needed to display text in the selected language. Returns null if no special font is * required.*/ - fontDirection():string; + fontDirection(): string; /*The method that returns the index into the list of plural texts for the value n. See the [CLDR rules] * (http://unicode.org/cldr/charts/supplemental/language_plural_rules.html) for more information. This calls the * locale’s plural() method, if there is one, otherwise it defaults to the English version. */ - plural(value:any):number; + plural(value: any): number; /*The method that returns the localized version of the number n. This calls the locale’s number() method, if * there is one, otherwise it defaults to the English version. */ - number(value:number):string; + number(value: number): string; /*This causes MathJax to load the data file for the given domain in the current language, and calls the callback * when that is complete. If the domain is already loaded, the callback is called immediately. This lets you * synchronize actions that require localization with the loading of the needed data so that you are sure that * the needed translations are available. See the section on synchonization above for details. */ - loadDomain(domain:string):ICallbackObject; - loadDomain(domain:string, callback:ICallbackObject):ICallbackObject; + loadDomain(domain: string): CallbackObject; + loadDomain(domain: string, callback: CallbackObject): CallbackObject; /*This method runs the function fn with error trapping and if an asynchronous file load is performed (for loading * localizaton data), reruns the function again after the file loads. This lets you synchronize actions that * require localization with the loading of the needed data (see the section on synchronization above for @@ -1557,20 +1552,20 @@ declare namespace jax { * can return before the fn has been completed, so you should consider fn to be running asynchronously (you can * use callbacks to synchronize with other actions, if needed). */ - Try(spec:any):void; + Try(spec: any): void; } - export interface IInputJax { + export interface InputJax { /*The name of the jax.*/ - id:string; + id: string; /*The version number of the jax.*/ - version:string; + version: string; /*The directory where the jax files are stored (e.g., "[MathJax]/jax/input/TeX").*/ - directory:string; + directory: string; /*The name of the ElementJax class that this input jax will produce (typically mml, as that is the only * ElementJax at the moment). */ - elementJax:string; + elementJax: string; /*This is the method that the MathJax.Hub calls when it needs the input jax to process the given math