AsciiMath中的二阶导数

时间:2017-03-10 16:24:03

标签: mathjax asciimath

我想在AsciiMath中表达“f(x)的二阶导数”。

在LaTeX中,它只是f''(x)

2nd derivative in LaTeX

AsciiMath中的相同结果是单引号而不是主要符号:

2nd derivative in AsciiMath

我可以使用f^'(x)

在AsciiMath中获得完美的一阶导数

1st derivative in AsciiMath

但是同样的方法对二阶导数不起作用:f^('')(x)

enter image description here

AsciiMath中是否有一个语法导致与LaTeX相同的输出,带有素数符号而不是单引号?

3 个答案:

答案 0 :(得分:1)

正如您所指出的,AsciiMath不能很好地处理这种情况。到目前为止所建议的方法产生了低质量的MathML,虽然MathJax的输出处理这个笨拙的MathML,但渲染的原生MathML(如Firefox)会产生较差的结果。这是由Firefox的原生MathML呈现的f^'text()^'(x)

f''(x)

由于底层的MathML有两个独立的<msup>元素,并且两个上标的基数不同,所以渲染效果很差:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mstyle displaystyle="true">
    <mrow>
      <msup>
        <mi>f</mi>
        <mo>&#x2032;</mo>
      </msup>
      <msup>
        <mrow>
          <mtext></mtext>
        </mrow>
        <mo>&#x2032;</mo>
      </msup>
    </mrow>
    <mrow>
      <mo>(</mo>
      <mi>x</mi>
      <mo>)</mo>
    </mrow>
  </mstyle>
</math>

产生更好的MathML的一种可能的解决方案是使用双引号unicode字符U + 2033,如f^″(x),或者如果要在HTML页面中输入f^&#x2033;(x)。这由MathJax的HTML-CSS输出呈现为

f''(x) by MathJax

f''(x) by Firefox

由Forefox的原生MathML渲染器提供。此外,AsciiMath为此输入生成的MathML在语义上更有意义:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mstyle displaystyle="true">
    <mrow>
      <msup>
        <mi>f</mi>
        <mo>&#x2033;</mo>
      </msup>
      <mrow>
        <mo>(</mo>
        <mi>x</mi>
        <mo>)</mo>
      </mrow>
    </mrow>
  </mstyle>
</math>

在U + 2034还有一个三重素数,U + 2057也有四重素数,如果您需要它们。如果AsciiMath能够自动将两个单独的素数组合成U + 2033,那将会很好,但它目前不会这样做。

答案 1 :(得分:0)

试试这个 f^('')(x) 它产生以下

enter image description here

答案 2 :(得分:0)

我能够通过插入一个空文本块并将第二个主要符号放到其上来实现它,如下所示:f^'text()^'(x)

Second derivative in AsciiMath

使用文本块的引号还有一个略短的表单:f^'""^'(x)

相关问题