12345678910111213141516171819202122232425 |
- /* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
- /* vim: set ts=2 et sw=2 tw=80: */
- /*************************************************************
- *
- * MathJax/extensions/TeX/HTML.js
- *
- * Implements the \href, \class, \style, \cssId macros.
- *
- * ---------------------------------------------------------------------
- *
- * Copyright (c) 2010-2013 The MathJax Consortium
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */MathJax.Extension["TeX/HTML"]={version:"2.2"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX;c.Definitions.Add({macros:{href:"HREF_attribute","class":"CLASS_attribute",style:"STYLE_attribute",cssId:"ID_attribute"}},null,!0);c.Parse.Augment({HREF_attribute:function(a){var b=this.GetArgument(a);a=this.GetArgumentMML(a);this.Push(a.With({href:b}))},CLASS_attribute:function(a){var b=this.GetArgument(a);a=this.GetArgumentMML(a);null!=a["class"]&&(b=a["class"]+" "+b);this.Push(a.With({"class":b}))},STYLE_attribute:function(a){var b=this.GetArgument(a);a=this.GetArgumentMML(a);null!=a.style&&(";"!==b.charAt(b.length-1)&&(b+=";"),b=a.style+" "+b);this.Push(a.With({style:b}))},ID_attribute:function(a){var b=this.GetArgument(a);a=this.GetArgumentMML(a);this.Push(a.With({id:b}))},GetArgumentMML:function(a){a=this.ParseArg(a);a.inferred&&1==a.data.length?a=a.data[0]:delete a.inferred;return a}});MathJax.Hub.Startup.signal.Post("TeX HTML Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/HTML.js");
|