I’ve posted code for AsciidocEdit, a MacOS editor/viewer for Asciidoc on github. It is now at version 0.1, but it does work. (You will need Xcode beta 6 or later to compile it; it is written in Swift).
Asciidoc is a markup language that
- Is human readable
- Can produce output in HTML, PDF, EPUB3, and more
Documents in Asciidoc can include media (image, audio, video), and, most importantly for me, can do mathematics. It is a great way of writing lecture notes to post on the web. Basically, you enclose latex in the appropriate delimiters:
\(a^2 + b^2 = c^2\) for inline math, \[ a^2 + b^2 = c^2 \], for display math. These may be additionally enclosed in +…+ if need be. You can find examples of web pages built with Asciidoc, at www.hoteshare.io (beta version 0.2).
Asciihelper, pictured below, has two panes in its main window. On the left is the “source code”. On the right is the rendered HTML. All this works through the magic of Asciidoctor, a truly wonderful (powerful, fast, rationally designed) Ruby processor for Asciidoc.
See offcenterapps.com for some notes on composing
mathematics using asciidoctor.
Asciidoctor give a good way of publishing mathematical text on the web. In-line LaTeX is
enclosed by escaped parentheses
\(a^2 + b^2 = c^2\) while display
math uses escaped braces
\[ a^2 + b^2 = c^2 \]
The asciidoctor-chrome-extension is highly recommended for working with asciidoctor. (The version with the up-to-date math syntax is in beta).
I’ve just posted a tool on github for turning marked up text files into Swift playgrounds. The screenshot below shows a playground produced from the file basic.ad by running the command ./ad2play. See the README on the github repository for more details and installation notes. We use asciidoc markup in its asciidoctor incarnation.
The main point of doing this is to have a way of integrating explanatory text into playgrounds in a visually appealing way (of course, we could just use comments:-). Playgrounds constructed with ad2play can use LaTex for mathematical notation and can also contain images. Clone the github repository and double-click on the .playground files for examples with mathematics and images.
To get an html file instead of a playground, run the command asciidoctor basic.ad.
Playgrounds in Xcode still display flaky behavior.
- I will eventually get rid of the unwanted yellowish space you see in the above screenshot
of a playground.