0

Good evening,
I'm trying to use this JS library in my mono/gtk# project.

At this moment I'm having simple webview widget provided by webkit-sharp. Webview opens HTML page witch uses ASCIIMathML.js lib to render expression like int_2^3 2x^2 dx. But it looks different in comparison with firefox.

I don't have enough reputation to post images so here is link to imgur.

C# code

private WebView _webView;
protected void CustomInit()
{
    _webView = new WebView();
    _webView.Open("/home/alexey/Projects/Asecti/Core/WebPage/index.html");
    webviewScrollWindows.Add(_webView);
    webviewScrollWindows.ShowAll();
}

Properties in JS lib:

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)

I've tried changing font but this is didn't solve my problem.
Is it a bug in webkit-sharp?

Lex
  • 300
  • 1
  • 11
  • The lib is a wrapper for MathJax, so try use the different renderers to see if you can get a style that separates the sub/superscripts (assuming that your issue. Not a sharp issue, just how it is rendering in webkit, also assuming you do not have any applied CCS styles in your index.html). Otherwise, you would need to style it; render it using HTML-CSS and apply a custom CSS that matches your display preferences. – SushiHangover Aug 14 '15 at 18:02
  • MathJax was first lib on my eye but it's size is very huge, after getting some research I found this little lib witch now included in MathJax. My default browser is Mozilla, so I have no idea that it renders like this in Webkit->Blink...Maybe some suggestions how to get gecko-sharp widget or smth like this? – Lex Aug 14 '15 at 20:47

0 Answers0