Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including paper-rulings with all npm packages installed. Try it out:

var paperRulings = require("paper-rulings")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

paper-rulings v1.3.15

Measurements and information about paper rulings


Build Status NPM Version Coverage

Measurements and information about paper rulings


npm install --save paper-rulings


const paperRulings = require('paper-rulings')

console.log(JSON.stringify(paperRulings('gregg', { format: 'decimal', units: 'mm' }), null, 2))


  "names": [
  "spacing": "8.730823935791932 mm",
  "margins": [
      "left": "50%"
  "notes": "Used for stenography. Includes a single margin down the center of the page."


paperRulings(rulingName, options)


Type: string

One of the following:

  • Narrow
  • Medium
  • College
  • Wide
  • Legal
  • Gregg
  • Pitman
  • Quad


Type: object


Allows you to specify the output values formats

Type: string

One of the following:

  • fraction
  • decimal

Specify the output measurement units

Type: string

One of the following:

  • mm
  • cm
  • m
  • in
  • ft
  • mi

Quad ruling allows custom spacing

Type: string

A number followed by any of the units allowed in options.units


  • 1/2 in
  • 10 mm
  • 0.1 ft

Change Log

v1.3.0 - 2017-06-30

  • added quad ruling

v1.2.0 - 2017-04-30

  • added unit conversions and units field in options

v1.1.0 - 2017-04-30

  • added decimal/fraction output formats and format field in options
  • improved options validation and handling

v1.0.0 - 2017-04-30

  • initial release


MIT © Forrest Desjardins


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free