Menu

Noteworthy

JamesCox

Welcome to the Noteworthy markup tutorial!

One of the things I did as a teacher was HTML slides designed to accompany my lectures. These slides defined terms, spelled out procedures and occasionally held SVG or Canvas element illustrations. After designing the HTML by hand got old (which didn't take long at all!) I designed a custom Java program to produce the slides. That gave way to a web page with a JavaScript that did basically the same thing but without needing to 'compile' the (text markup) notation to HTML files before use. After my first encounter with Markdown I decided to revise my technology to take advantage of Markdown's combined human readability and HTML convertabiity.

The result is the Noteworthy markup notation and parser class (NoteworthyParser). Noteworthy is philosophically similar to Markdown and it shares some of the notation, but it is also significantly different. Noteworthy concentrates on the things most useful to a teacher whose handwriting is not pretty (me!). Specifically it includes HTML divisions, paragraphs, lists and tables. The lists it supports are ordered, unordered and definition.

Noteworthy also enhances readability of the plain text document by trimming spaces before formatting characters and afterward, thus allowing 'hard-space' formatting of the document. In the document itself all Noteworthy markup begins with a double-quote, the parser ignores lines that don't begin with it. This allows non-extractable notes to be wrapped around the HTML so the notes and the slides to accompany them are combined in one document.

The NoteworthyParser itself uses the markup.html.* package to generate HTML markup. It accepts a MathGenHTML instance for generating tag classes and returns an HTMLTag containing the parsed document. Default attributes can be set and the tags generated will contain them. In addition to the formatting commands, Noteworthy includes macro commands to set the (HTML) document title and include content from external files, either directly or via getResourceAsStream().

The best way to explore Noteworthy is to fire up the demo and experiment! The NoteworthyParser javadoc contains a more thorough explanation along with the list of formatting characters and macro commands and the Noteworthy demo panel contains a TextArea for entering markup, a button for loading it and another to start the process. Its output is dumped to the console (BasicMathPrinter) and, optionally, to the clipboard as well.

For embedding purposes the NoteworthyParser class is in the MathTools.util.* package. Scripts obtain instances via MathGenHTML's getNoteParser() method.

Enjoy!


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.