<commit_before>/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */

/*************************************************************
 *
 *  MathJax/jax/output/NativeMML/jax.js
 *
 *  Implements the NativeMML OutputJax that displays mathematics
 *  using a browser's native MathML capabilities (if any).
 *  
 *  ---------------------------------------------------------------------
 *  
 *  Copyright (c) 2010-2012 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.
 */

(function (nMML,HUB,AJAX,HTML) {
  var MML, isMSIE = HUB.Browser.isMSIE;
  
  var EVENT, TOUCH, HOVER, ZOOM; // filled in later

  HUB.Register.StartupHook("MathZoom Ready",function () {ZOOM = MathJax.Extension.MathZoom});
  
  var NOPADDING = function (side,obj) {
    var span = HTML.Element("span"); side = "padding"+side;
    if (obj) {
      span.style.cssText = (obj.getAttribute("style")||"");
      if (span.style.padding === "" && (span.style[side]||"") === "") {
        span.style[side] = "0px"; obj.setAttribute("style",span.style.cssText)
      }
    }
  };
  
  var CELLSPACING = function (obj,rowSpacing,columnSpacing) {
    //
    // Webkit default padding on mtd cells is simply
    //
    // mtd {padding: 0.5ex;}
    //
    // Gecko default padding on mtd cells is
    //
    // mtd {padding-right: 0.4em;
    //      padding-left: 0.4em;
    //      padding-bottom: 0.5ex;
    //      padding-top: 0.5ex;}
    // mtr:first-child > mtd {padding-top: 0ex;}
    // mtr:last-child > mtd {padding-bottom: 0ex;}
    // mtd:first-child {padding-left: 0em;}
    // mtd:last-child {padding-right: 0em;}
    //
    // that is the columnspacing/rowspacing is split into two adjacent cells,
    // and the periphery of boundary cells is set to zero.
    //
    // Here, we will set the left/top padding of each cell to
    // rowSpacing/columnSpacing (or 0px for the leftmost/topmost cells) and
    // reset the right/bottom padding to zero.
    //
    if (obj) {
      var span = HTML.Element("span");
      span.style.cssText = (obj.getAttribute("style")||"");
      if (span.style.padding === "") {
        var padding = { paddingLeft: columnSpacing, paddingTop: rowSpacing,
                        paddingRight: "0px", paddingBottom: "0px" };
        for (var side in padding) {if (padding.hasOwnProperty(side)) {
          if ((span.style[side]||"") === "") {span.style[side] = padding[side];}
        }}
      }
      obj.setAttribute("style",span.style.cssText);
    }
  };
 
  nMML.Augment({
    //
    //  User can configure styles
    //
    config: {
      styles: {
        ".MathJax_MathML": {
          "font-style":      "normal",
          "font-weight":     "normal",
          "line-height":     "normal",
          "font-size":       "100%",
          "font-size-adjust":"none",
          "text-indent":     0,
          "text-align":      "left",
          "text-transform":  "none",
          "letter-spacing":  "normal",
          "word-spacing":    "normal",
          "word-wrap":       "normal",
          "white-space":     "nowrap",
          "float":           "none",
          "direction":       "ltr",
          border: 0, padding: 0, margin: 0
        },
        
        "span.MathJax_MathML": {
          display: "inline"
        },
        
        "div.MathJax_MathML": {
          display: "block"
        },
        
        ".MathJax_mmlExBox": {
          display:"block", overflow:"hidden",
          height:"1px", width:"60ex",
          padding:0, border: 0, margin: 0
        }
      }
    },
    settings: HUB.config.menuSettings,
    ex: 1, scale: 1,  // filled in later
    adjustWidths: [], // array of elements to have their widths adjusted
    
    Config: function () {
      this.SUPER(arguments).Config.call(this);
      if (this.settings.scale) {this.config.scale = this.settings.scale}
      //
      //  Insert styling to take account of displayAlign and displayIndent
      //
      if (HUB.config.displayAlign !== "center") {
        var align = HUB.config.displayAlign, indent = HUB.config.displayIndent;<commit_msg>Added '!important' to NativeMML CSS as well.  (Issue #580.)<commit_after>/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */

/*************************************************************
 *
 *  MathJax/jax/output/NativeMML/jax.js
 *
 *  Implements the NativeMML OutputJax that displays mathematics
 *  using a browser's native MathML capabilities (if any).
 *  
 *  ---------------------------------------------------------------------
 *  
 *  Copyright (c) 2010-2012 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.
 */

(function (nMML,HUB,AJAX,HTML) {
  var MML, isMSIE = HUB.Browser.isMSIE;
  
  var EVENT, TOUCH, HOVER, ZOOM; // filled in later

  HUB.Register.StartupHook("MathZoom Ready",function () {ZOOM = MathJax.Extension.MathZoom});
  
  var NOPADDING = function (side,obj) {
    var span = HTML.Element("span"); side = "padding"+side;
    if (obj) {
      span.style.cssText = (obj.getAttribute("style")||"");
      if (span.style.padding === "" && (span.style[side]||"") === "") {
        span.style[side] = "0px"; obj.setAttribute("style",span.style.cssText)
      }
    }
  };
  
  var CELLSPACING = function (obj,rowSpacing,columnSpacing) {
    //
    // Webkit default padding on mtd cells is simply
    //
    // mtd {padding: 0.5ex;}
    //
    // Gecko default padding on mtd cells is
    //
    // mtd {padding-right: 0.4em;
    //      padding-left: 0.4em;
    //      padding-bottom: 0.5ex;
    //      padding-top: 0.5ex;}
    // mtr:first-child > mtd {padding-top: 0ex;}
    // mtr:last-child > mtd {padding-bottom: 0ex;}
    // mtd:first-child {padding-left: 0em;}
    // mtd:last-child {padding-right: 0em;}
    //
    // that is the columnspacing/rowspacing is split into two adjacent cells,
    // and the periphery of boundary cells is set to zero.
    //
    // Here, we will set the left/top padding of each cell to
    // rowSpacing/columnSpacing (or 0px for the leftmost/topmost cells) and
    // reset the right/bottom padding to zero.
    //
    if (obj) {
      var span = HTML.Element("span");
      span.style.cssText = (obj.getAttribute("style")||"");
      if (span.style.padding === "") {
        var padding = { paddingLeft: columnSpacing, paddingTop: rowSpacing,
                        paddingRight: "0px", paddingBottom: "0px" };
        for (var side in padding) {if (padding.hasOwnProperty(side)) {
          if ((span.style[side]||"") === "") {span.style[side] = padding[side];}
        }}
      }
      obj.setAttribute("style",span.style.cssText);
    }
  };
 
  nMML.Augment({
    //
    //  User can configure styles
    //
    config: {
      styles: {
        ".MathJax_MathML": {
          "font-style":      "normal",
          "font-weight":     "normal",
          "line-height":     "normal",
          "font-size":       "100%",
          "font-size-adjust":"none",
          "text-indent":     0,
          "text-align":      "left",
          "text-transform":  "none",
          "letter-spacing":  "normal",
          "word-spacing":    "normal",
          "word-wrap":       "normal",
          "white-space":     "nowrap",
          "float":           "none",
          "direction":       "ltr",
          border: 0, padding: 0, margin: 0
        },
        
        "span.MathJax_MathML": {
          display: "inline!important"
        },
        
        "div.MathJax_MathML": {
          display: "block!important"
        },
        
        ".MathJax_mmlExBox": {
          display:"block!important", overflow:"hidden",
          height:"1px", width:"60ex",
          padding:0, border: 0, margin: 0
        }
      }
    },
    settings: HUB.config.menuSettings,
    ex: 1, scale: 1,  // filled in later
    adjustWidths: [], // array of elements to have their widths adjusted
    
    Config: function () {
      this.SUPER(arguments).Config.call(this);
      if (this.settings.scale) {this.config.scale = this.settings.scale}
      //
      //  Insert styling to take account of displayAlign and displayIndent
      //
      if (HUB.config.displayAlign !== "center") {
        var align = HUB.config.displayAlign, indent = HUB.config.displayIndent;
{'fraction_non_alphanumeric': 0.16815952228620176, 'fraction_numerical': 0.010983152058008105, 'mean_word_length': 2.089262187088274, 'pattern_counts': {'":': 36, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7572462', 'n_tokens_mistral': 2970, 'n_tokens_neox': 2861, 'n_words': 745}