Add (mostly non-working) equation demonstrations using LaTex, MathML and SVG.

[SVN r76838]
This commit is contained in:
John Maddock 2012-02-02 10:36:43 +00:00
parent 6e8fe14b44
commit 0155e6527d
5 changed files with 55 additions and 0 deletions

View file

@ -186,6 +186,8 @@ boostbook standalone
<xsl:param>chunk.section.depth=1
<xsl:param>boost.root=../../..
<xsl:param>navig.graphics=1
<xsl:param>boost.mathjax=1
<xsl:path>$(images_location)/..
# PDF Options:
@ -205,3 +207,4 @@ install pdf-install : standalone : <location>. <install-type>PDF ;

30
doc/test/test.mml Normal file
View file

@ -0,0 +1,30 @@
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mtext>asinh</mtext>
<mfenced>
<mrow>
<mi>x</mi>
</mrow>
</mfenced>
<mo>&#x2248;</mo>
<mi>x</mi>
<mo>&#x2212;</mo>
<mfrac>
<mrow>
<msup>
<mi>x</mi>
<mn>3</mn>
</msup>
</mrow>
<mn>6</mn>
</mfrac>
<mspace width="1em"></mspace>
<mo>;</mo>
<mspace width="1em"></mspace>
<mi>x</mi>
<mo>&lt;</mo>
<msqrt>
<mi>&#x03B5;</mi>
</msqrt>
</mrow>
</math>

BIN
doc/test/test.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -604,6 +604,26 @@ Now try again with a sample SVG image:
[$images/open_clipart_library_logo.svg]
[endsect]
[section Equations]
This page is largely to test equation handling in various browsers, unfortunately none of this works as well as it should (or at all?)
in Internet Explorer....
This equation is formatted from Latex text:
'''<inlinemediaobject><textobject role="tex">ax^2 + bx + c = 0</textobject></inlinemediaobject>'''
This equation is formed from MathML:
'''<inlinemediaobject><textobject role="MathML"><?dbhtml-include href="test.mml"?></textobject></inlinemediaobject>'''
This equation is SVG:
'''<inlinemediaobject><imageobject><imagedata format="SVG" fileref="../test.svg"></imagedata></imageobject></inlinemediaobject>'''
[endsect]
[include test_HTML4_symbols.qbk]

2
doc/test/test.svg Normal file
View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<svg:svg xmlns="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg" height="22.714688pt" width="148.172543pt" xmlns:svgmath="http://www.grigoriev.ru/svgmath" viewBox="0 -16.849453 148.172543 22.714688"><svg:metadata><svgmath:metrics top="22.7146875" axis="9.849609375" baseline="5.865234375" bottom="0.0"/></svg:metadata><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="12.665039" font-family="Times New Roman" fill="black">asinh</svg:text><svg:g transform="translate(27.330082, 0.000000)"><svg:g transform="translate(0.000000, -3.984375)"><svg:text font-size="12.012889" transform="scale(0.998927, 1)" text-anchor="middle" y="3.981593" x="2.000193" font-family="Times New Roman" fill="black">(</svg:text></svg:g><svg:g transform="translate(3.996094, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(9.720703, -3.984375)"><svg:text font-size="12.012889" transform="scale(0.998927, 1)" text-anchor="middle" y="3.981593" x="2.000193" font-family="Times New Roman" fill="black">)</svg:text></svg:g></svg:g><svg:g transform="translate(44.380215, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.292969" font-family="Times New Roman" fill="black"></svg:text></svg:g><svg:g transform="translate(54.299489, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(62.690762, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black"></svg:text></svg:g><svg:g transform="translate(72.710942, -3.984375)"><svg:g transform="translate(0.585938, -1.740234)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text><svg:g transform="translate(5.724609, -5.367188)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.130000" font-family="Times New Roman" fill="black">3</svg:text></svg:g></svg:g><svg:g transform="translate(2.578242, 9.708984)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.000000" font-family="Times New Roman" fill="black">6</svg:text></svg:g><svg:line stroke-width="0.585938" y2="0.000000" x2="11.156484" stroke="black" stroke-linecap="butt" stroke-dasharray="none" y1="0.000000" x1="0.000000" fill="none"/></svg:g><svg:g transform="translate(84.453363, 0.000000)"/><svg:g transform="translate(96.453363, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="1.666992" font-family="Times New Roman" fill="black">;</svg:text></svg:g><svg:g transform="translate(103.120684, 0.000000)"/><svg:g transform="translate(115.120684, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="3.061523" font-family="Times New Roman" font-style="italic" fill="black">x</svg:text></svg:g><svg:g transform="translate(124.178629, -3.984375)"><svg:text font-size="12.000000" text-anchor="middle" y="3.984375" x="3.383789" font-family="Times New Roman" fill="black">&lt;</svg:text></svg:g><svg:g transform="translate(134.759543, 0.000000)"><svg:g transform="translate(7.377844, 0.000000)"><svg:text font-size="12.000000" text-anchor="middle" y="0.000000" x="2.364258" font-family="Times New Roman" font-style="italic" fill="black">ε</svg:text></svg:g><svg:path stroke-linejoin="miter" d="M 0.000000 -5.059336 L 2.541361 -5.059336 L 4.648084 -1.157996 L 4.568343 -0.638998 L 2.310961 -4.819336 L 1.950961 -4.819336 L 4.553402 0.000000 L 6.071203 -9.878672 L 13.413000 -9.878672" stroke="black" stroke-linecap="butt" stroke-miterlimit="10" stroke-width="0.480000" fill="none"/></svg:g></svg:svg>

After

Width:  |  Height:  |  Size: 3.9 KiB