File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,7 @@ function ConfigureMathJax() {
245245 // Set up the default ex-size and width
246246 //
247247 InitializeSVG : function ( ) {
248+ this . pxPerInch = 96 ;
248249 this . defaultEx = 6 ;
249250 this . defaultWidth = 100 ;
250251 } ,
Original file line number Diff line number Diff line change 1+ var tape = require ( 'tape' ) ;
2+ var mjAPI = require ( "../lib/main.js" ) ;
3+ var jsdom = require ( 'jsdom' ) . jsdom ;
4+
5+ tape ( 'SVG output: physical units' , function ( t ) {
6+ t . plan ( 1 ) ;
7+ mjAPI . start ( ) ;
8+ var mml = '<math><mspace width="1cm"></mspace></math>' ;
9+
10+ mjAPI . typeset ( {
11+ math : mml ,
12+ format : "MathML" ,
13+ svg : true
14+ } , function ( data ) {
15+ var document = jsdom ( data . svg ) ;
16+ var doc = document . defaultView . document ;
17+ var width = doc . querySelector ( 'svg' ) . getAttribute ( 'width' ) ;
18+ t . notEqual ( width , '0' , '' ) ;
19+ } ) ;
20+ } ) ;
You can’t perform that action at this time.
0 commit comments