こんばんは、 mono/gtk# プロジェクトでこのJS ライブラリ
を使用しようとしています。
現時点では、 webkit-sharpが提供する単純なwebview ウィジェットを使用しています。Webview は HTML ページを開き、ASCIIMathML.js ライブラリを使用して のような式をレンダリングします。しかし、Firefox と比べると見た目が異なります。
画像を投稿するのに十分な評判がないので、ここにimgurへのリンクがあります。
C# コードint_2^3 2x^2 dx
private WebView _webView;
protected void CustomInit()
{
_webView = new WebView();
_webView.Open("/home/alexey/Projects/Asecti/Core/WebPage/index.html");
webviewScrollWindows.Add(_webView);
webviewScrollWindows.ShowAll();
}
JS ライブラリのプロパティ:
var expression = "`int_2^3 (2x^3 + 3x^2) dx`";
var mathcolor = "black"; // change it to "" (to inherit) or another color
var mathfontsize = "8em"; // change to e.g. 1.2em for larger math
var mathfontfamily = "serif"; // change to "" to inherit (works in IE)
// or another family (e.g. "arial")
var automathrecognize = false; // writing "amath" on page makes this true
var checkForMathML = true; // check if browser can display MathML
var notifyIfNoMathML = true; // display note at top if no MathML capability
var alertIfNoMathML = false; // show alert box if no MathML capability
var translateOnLoad = true; // set to false to do call translators from js
var translateLaTeX = true; // false to preserve $..$, $$..$$
var translateLaTeXformatting = true; // false to preserve \emph,\begin{},\end{}
var translateASCIIMath = true; // false to preserve `..`
var translateASCIIsvg = true; // false to preserve agraph.., \begin{graph}..
var avoidinnerHTML = false; // set true if assigning to innerHTML gives error
var displaystyle = true; // puts limits above and below large operators
var showasciiformulaonhover = true; // helps students learn ASCIIMath
var decimalsign = "."; // change to "," if you like, beware of `(1,2)`!
var AMdelimiter1 = "`", AMescape1 = "\\\\`"; // can use other characters
var AMdocumentId = "wikitext" // PmWiki element containing math (default=body)
var checkforprocessasciimathinmoodle = false; // true for systems like Moodle
var dsvglocation = ""; // path to d.svg (blank if same as ASCIIMathML.js loc)
フォントを変更してみましたが、問題は解決しませんでした。
webkit-sharp のバグですか?