Skip to content

Commit

Permalink
Slob, Win-specific: Increase scale for MathJax SVG and HTML-CSS output
Browse files Browse the repository at this point in the history
  • Loading branch information
Abs62 committed Jul 12, 2017
1 parent 6c30199 commit 4b0df85
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion slob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,18 @@ string SlobDictionary::convert( const string & in, RefEntry const & entry )
pos += list[ 0 ].length();
}
}
#ifdef Q_OS_WIN32
else
{
// Increase equations scale
text = QString::fromLatin1( "<script type=\"text/x-mathjax-config\">MathJax.Hub.Config({" )
+ " SVG: { scale: 170, linebreaks: { automatic:true } }"
+ ", \"HTML-CSS\": { scale: 210, linebreaks: { automatic:true } }"
+ ", CommonHTML: { scale: 210, linebreaks: { automatic:true } }"
+ " });</script>"
+ text;
}
#endif

// Fix outstanding elements
text += "<br style=\"clear:both;\" />";
Expand All @@ -922,7 +934,6 @@ string SlobDictionary::convert( const string & in, RefEntry const & entry )
void SlobDictionary::loadResource( std::string & resourceName, string & data )
{
vector< WordArticleLink > link;
string resData;
RefEntry entry;

link = resourceIndex.findArticles( Utf8::decode( resourceName ) );
Expand Down

0 comments on commit 4b0df85

Please sign in to comment.