Linux Format

Creating better documents in AsciiDoc

Credit: http://asciidoc.org

A sciiDoc is a shell program that takes source text, formats it and produces legible, correct output. A plus of AsciiDoc is that there are several versions in Ruby, Java, JavaScript and Python (plus Rust and Go unofficially) that produces mostly identical output.

Markup or formatting languages are about separating content from presentation. So tables are special structures with rows and columns, not text aligned by indents and spaces.

AsciiDoc tries to emulate many functions of LaTeX, albeit at a low level. LaTeX documents, for example, allow data to be automatically read in and prepared, as well as define their own macros and more. AsciiDoc does not do this directly, so there is no simple way to define your own elements – the existing ones must suffice. On the other hand, AsciiDoc syntax is much simpler, easier-to-understand and use than LaTeX, and much faster to write. In some places, AsciiDoc takes over elements from LaTeX, such as when citing references. Then the corresponding LaTeX macros are provided as AsciiDoc macros.

A special feature of AsciiDoc is the internal data format. This is closely based on (X)HTML and thus easily supports many output formats with which LaTeX has problems. EPUB and other ebook formats, for example, are based on HTML, which makes AsciiDoc an ideal input. In fact, AsciiDoc is even able to translate the supported formats directly into LaTeX and DocBook formats. While the conversion is largely error-free, it still must still be manually post-processed.

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format1 min read
Ultimate Desktop Upgrade!
LXF316 will be on sale Tuesday 28th May 2024 Word processors that can help craft that novel you’ve always been talking about and organise large projects. Revive the old roleplaying system for a digital age as we recreate our own play-by-mail gaming
Linux Format4 min read
Linux
The #1 open source mag Future Publishing Limited, Quay House, The Ambury, Bath, BA1 1UA Email contact@linuxformat.com EDITORIAL Editor-in-chief Neil Mohr Art editor Fraser McDermott Production editor Katharine Davies Group editor-in-chief Graham Bar
Linux Format2 min read
Platform Support And Editions
Kali has a huge variety of install options, and these include images for ARM-based computers and pre-made virtual K machine images for most of the popular virtualisers. It’s even possible to install a version of Kali on to an Android-powered device.

Related