Physikerwelt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/284705

Change subject: WIP: Make DPI configurable
......................................................................

WIP: Make DPI configurable

Change-Id: Iec234784ec101d9619df70c983905307057d4715
---
M config.dev.yaml
M package.json
M routes/mathoid.js
3 files changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mathoid 
refs/changes/05/284705/1

diff --git a/config.dev.yaml b/config.dev.yaml
index 6dac3d9..410366e 100644
--- a/config.dev.yaml
+++ b/config.dev.yaml
@@ -67,3 +67,4 @@
       texvcinfo: true
       speech_on: true
       no_check: false
+      dpi: 600
diff --git a/package.json b/package.json
index 0fc7cb6..1c1262e 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
     "js-yaml": "^3.5.2",
     "preq": "^0.4.8",
     "service-runner": "^1.1.3",
-    "mathoid-mathjax-node": "^0.6.3",
+    "mathoid-mathjax-node": 
"git+ssh://[email protected]/physikerwelt/MathJax-node.git#dpi",
     "texvcinfo": "^0.4.2",
     "svgo": "^0.6.0"
   },
diff --git a/routes/mathoid.js b/routes/mathoid.js
index d5a5e12..a47ceb9 100644
--- a/routes/mathoid.js
+++ b/routes/mathoid.js
@@ -93,7 +93,7 @@
         }
     }
 
-    app.mjAPI.typeset({
+    var mathJaxOptions = {
         math: q,
         format: type,
         svg: svg,
@@ -101,7 +101,11 @@
         mml: mml,
         speakText: speech,
         png: png
-    }, function (data) {
+    };
+    if ( app.conf.dpi ){
+        mathJaxOptions.dpi = app.conf.dpi;
+    }
+    app.mjAPI.typeset(mathJaxOptions, function (data) {
         if (data.errors) {
             data.success = false;
             // @deprecated replace with emitError

-- 
To view, visit https://gerrit.wikimedia.org/r/284705
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec234784ec101d9619df70c983905307057d4715
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mathoid
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to