0.1.3 • Published 7 years ago

grunt-mathjax-node-page v0.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

grunt-mathjax-node-page

Grunt plugin to prerender MathJax in your HTML pages, with mathjax-node-page.

Getting Started

This plugin requires Grunt ^1.0.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-mathjax-node-page --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-mathjax-node-page');

The "mathjax_node_page" task

Overview

In your project's Gruntfile, add a section named mathjax_node_page to the data object passed into grunt.initConfig().

grunt.initConfig({
  mathjax_node_page: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});

Options

options.page

Type: Object Default value: {}

pageConfig for mathjax-node-page. For example, you might want {singleDollars: true}.

options.mjnode

Type: Object Default value: {svg: true}

Configuration options for mathjax-node. For example, you might do {linebreaks: true, width: 80} to break long equations at 80ex.

Usage Examples

Here is a simple example that renders index.html into index-rendered.html, allowing single dollar signs as inline math delimiters:

grunt.initConfig({
  mathjax_node_page: {
    options: {
      page: {
        singleDollars: true
      }
    },
    files: {
      'index-rendered.html': ['index.html']
    }
  }
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 2017-07-26 v0.1.3 Remove unused dependency.
  • 2017-07-19   v0.1.2   Finish task properly.
  • 2017-07-19   v0.1.1   Fix README.
  • 2017-07-19   v0.1.0   Initial release.
0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago