「Mathjax 不具合 小文字がずっと大文字になる問題20-05-01」の版間の差分

提供:yonewiki
編集の要約なし
編集の要約なし
1行目: 1行目:
<yjavascript></script>
<script type='text/x-mathjax-config'>
MathJax = {
  tex: {
    packages: ['base'],        // extensions to use
    inlineMath: [              // start/end delimiter pairs for in-line math
      ['\\(', '\\)']
    ],
    displayMath: [            // start/end delimiter pairs for display math
      ['$$', '$$'],
      ['\\[', '\\]']
    ],
    processEscapes: true,      // use \$ to produce a literal dollar sign
    processEnvironments: true, // process \begin{xxx}...\end{xxx} outside math mode
    processRefs: true,        // process \ref{...} outside of math mode
    digits: /^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,
                              // pattern for recognizing numbers
    tags: 'none',              // or 'ams' or 'all'
    tagSide: 'right',          // side for \tag macros
    tagIndent: '0.8em',        // amount to indent tags
    useLabelIds: true,        // use label name rather than tag for ids
    multlineWidth: '85%',      // width of multline environment
    maxMacros: 1000,          // maximum number of macro substitutions per expression
    maxBuffer: 5 * 1024,      // maximum size for the internal TeX string (5K)
    baseURL:                  // URL for use with links to tags (when there is a <base> tag in effect)
      (document.getElementsByTagName('base').length === 0) ?
        '' : String(document.location).replace(/#.*$/, ''))
  }
};
</script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script></yjavascript>
[[Mathjax 不具合]]に戻る  
[[Mathjax 不具合]]に戻る  
== '''概要''' ==
== '''概要''' ==

2024年12月20日 (金) 13:59時点における版

Mathjax 不具合に戻る

概要

V3.0.4でEdgeブラウザのみに起こる現象で結構、悩みましたが不具合だと感じたので記述しておきます。

たとえば以下のように、平方根の分子にアルファベットの大文字を一度使います。


\[ \sqrt{\frac{\mathstrut \mathrm{A}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{B}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{C}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{D}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{E}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{F}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{G}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{H}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{I}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{J}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{K}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{L}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{M}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{N}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{O}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{P}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{Q}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{R}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{S}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{T}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{U}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{V}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{W}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{X}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{Y}}{\mathstrut \pi}}\sqrt{\frac{\mathstrut \mathrm{Z}}{\mathstrut \pi}} \]


すると!


\$\$ \frac{ a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+s+t+u+v+w+x+y+z}{4} \$\$

と記述した数式が


<ymath>$$ \frac{ a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+s+t+u+v+w+x+y+z}{4} $$</ymath>


となってしまいます。Edgeブラウザ以外では正常に表示されます。これは平方根ではなくても、同じです。 最初は平方根の分子のアルファベットだけが対象だと思っていましたが、関係なくインラインではないディスプレイ表示について、そのページで使った最初のアルファベットが大文字なのか小文字なのかが優先されていると思います。


  Mathjax 不具合に戻る