Markdown/LaTeX editable pages
Latest commit 0a3b4e6 Nov 22, 2011 @c-spencer c-spencer Merge pull request #16 from burningTyger/patch-1
added redis to dependency list and added the git clone --recursive to ge...


This is the source code behind, a page site designed to allow quick, technical documents to be written online, without access to a LaTeX distribution or editor such as LyX. The main formatting of the documents is done in Markdown, and maths can be embedded using LaTeX format.

This repository contains the development version, which is available at and runs on the same database. The development version is deployed to live when it has been shown sufficiently stable.


The Notepages server is built upon Node.js/MongoDB, and uses the Express and Mongoose libraries. Both libraries are available through npm. Bundled libraries are quickdiff (created for notepages), and mdext (a showdown fork).

npm install express mongoose jade sass underscore redis

The client editor uses the Ace editor by Mozilla/ with a custom MarkdownMode. Some icons used are from the Retina Display Icon Set. Editor icons are from the Fugue set, Copyright © Yusuke Kamiyamane.

To clone the repo and all its submodules:

git clone --recursive

The database configuration is trivial and at the top of the server.js file. Running node server.js will start the server listening on port 8080 or 8888 depending on what I pushed last.

CDN Content

Notepages serves the MathJax, Google Font API, and jQuery through their respective CDNs.

Browser Support

Reading and editing has been tested across all modern browsers (IE9, Safari 5, Chrome, Firefox 3.6/4). IE6 is not supported. IE7/8 should be able to read, though will not have code highlighting, and the edit experience will be haphazard. Chrome Frame is set to be enabled for users of IE8 or lower, but does not currently prompt for install.

Mobile support

A mobile version is served to detected browsers, using jQuery Mobile Alpha 3. It has been tested on iPad/iPhone browsers. Reading experience is good on the iPad, somewhat constrained on the iPhone due to width. Editing is buggy due to alpha status of jQuery mobile., but functional.

Mobile support is currently not supported in development, and will be moving to a read-only state pending finding suitable input arrangements.


A print stylesheet is served which formats the document in a print friendly manner. Exporting of pages is not self-supported, but Print-to-PDF functionality of most browsers works as expected.

Syntax supports Markdown, but does not allow arbitrary HTML. HTML markup can still be used, but only insofar as elements that can naturally be created with markdown syntax.

Some extensions to markdown syntax have been provided, at this time: tables and figures. Tables are a port of the PHP Markdown Extra syntax. Figures allow an optional > or < after the ! when defining an image. < indicates a left floated figure, and > indicates right floated. The caption used will be the title of the image, which can be defined in two ways (standard markdown):

!>[right alt](http://image.url "right caption")
!<[left alt][lefturl]

  [lefturl]: http://image.url "left caption"