1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-22 16:23:12 +02:00

Cambria anyway

This commit is contained in:
Pomax
2017-02-27 11:01:13 -08:00
parent f8116a4bc5
commit 5342543012
187 changed files with 313 additions and 238 deletions

View File

@@ -2,6 +2,11 @@ module.exports = function cleanUp(latex) {
// strip any \[ and \], which is an block-level LaTeX markup indicator for MathJax:
latex = latex.replace(/^'/,'').replace(/'$/,'').replace('\\[','').replace('\\]','');
// wrap some known functor words in italics markup
['Bézier'].forEach(term => {
latex = latex.replace(new RegExp(term, 'g'), '\\textit{' + term + '}');
});
// also unindent the LaTeX.
var indent = false;
var lines = latex.split('\n').filter(function(line) { return !!line.trim(); });