Asciidoctor – A fast, open-source text processor and publishing toolchain
asciidoctor.org
asciidoctor.org
Personally, I prefer reStructuredText, its design feels more consistent in comparison to the ambiguous implementations of the various markdown dialects.
In Asciidoc, I do not like that lower lever headings occupy more markers than higher level ones. Visually,
=== This heading
appears more important than
== This heading
By the way, a good comparison is at http://hyperpolyglot.org/lightweight-markup
= heading
If you were to do it the other way around, there's no easy way to know which would would map to h1
======= this?
============= this?
The second reason why is because you have to have a baseline of maximum-importance. It's like ticket priorities capping out at P0 for maximum priority. The first intuitive thought would be that P5 should be more important than P0, but if you don't set a baseline of maximum importance, then there will always be someone who feels their thing is slightly more important.
========== Top level heading
=========== Super top level heading
============== Extra super top level heading deluxe
That is also why I stick to reStructeredText, they circumnavigate ATX-style headers at all.
Chapter 1 ............... 5
Section 1a ............. 7
Section 1b ............ 11
Chapter 2 .............. 17
Section 2a ............ 21
is nicely similar to # Chapter 1
Lorem ipsum dolor sit amet.
## Section 1a
Lorem ipsum dolor sit amet.
## Section 1b
Lorem ipsum dolor sit amet.
# Chapter 2
Lorem ipsum dolor sit amet.
## Section 2a
Lorem ipsum dolor sit amet.In Asciidoctor, I can:
* Use GraphViz (and other diagram) docs to describe architectural components.
* Actually test my example code, using named, delineating comments in my test suite and including the code between those comments as an example in my file.
* Support for WARNING, NOTE, etc. callout "admonitions"
* Auto-numbered list blocks with "."
Some of these may be possible with reStructuredText, and can definitely be supported with third party plugins, but all of this is first-party and amazing.
Note: IntelliJ's Asciidoctor plugin is incredible and it live renders mathematical equations AND graphing support in addition to everything else.
And Asciidoctor is a toolchain for working with AsciiDoc.
One thing to have in mind is that AsciiDoc syntax is incredibly complex [1]: it maps to the already complicated-on-its-own-right DocBook standard [2]. It has a lot of bells and whistles that one may want to use on a real print book, but maybe not for general documentation.
I feel like if you are not writing something that you actually intend to print, Asciidoc (and DocBook) are overkill.
1: http://asciidoc.org/userguide.html
2: https://docs.oasis-open.org/docbook/docbook/v5.1/os/docbook-...
Asciidoctor is far superior to Markdown and as easy to use and is also supported on Github.
(Note: This appears to be written by the AsciiDoc team)
I'll use an example: I often need to create "Warning Notes" (aka "Admonitions") in my documentation. Those notes need to stand out, but they also need to not break the flow of reading. I need them to be visible, but easy to spot with the eye and ignore. It makes reading the doc and ignoring less important information easier. With Markdown, I can't create those notes.
Other interesting and useful thing is the ability to use variables. This allows me to make the documentation dynamic. Imagine, for example, a documentation that has many CURL requests examples that must include an X-Auth-Token. I can dynamically generate the documentation with the Auth-Token of the user reading the doc, allowing them to Copy/Paste the examples without having to modify them first.
I've used asciidoc before, and I don't recall it having arbitrary programmability? I'd be interested in how that works.
For macros in AsciiDoc, I've made do with the little bit of support mentioned at https://asciidoctor.org/docs/user-manual/#pass-macros . Everything I found for Markdown always required an additional tool or "something else". I like that AsciiDoctor, for the most parts, has nearly everything I want built-in.
Variously this did things like running embedded unit tests in code examples, validating XSL schemas, making sure GraphViz images were created and up-to-date, running a Z-Notation type-checker, and code that created both SQL and Relational Algebra from a simplified SQL-like DSL.
I'm not saying this is a superior approach to AsciiDoc, just that it's amazing what you can create when you turn your mind to avoiding working on your MSc assignments and let your OCD about creating perfect assignments run wild.
It's very much a Unix stdin-stdout thing. My whole blog [1] uses this, especially the code examples highlighted with pygments, and also links to the glossary, etc.
I dumped a snapshot here [2] awhile ago. It may or may not be of use if asciidoc already works for you.
The bad thing about this format is that it's not pure markdown anymore, so Vim syntax highlighting gets messed up sometimes. If I had to do it again, I would probably try to hook into a CommonMark [3] library to parse HTML blocks. So basically certain <div></div> blocks would get transformed into others.
How does asciidoc do it?
[1] http://www.oilshell.org/blog/
[2] https://github.com/oilshell/blog-code/tree/master/tools-snap...
My book was written in asciidoc for O'Reilly. Honestly, the asciidoc docs are a mess, for example, trying to add a header to a set of documents is much more challenging than it needs to be.
I prefer AsciiDoc over Markdown because it is just a bit more robust. While both are equally simple to use for the most common use cases of marking up a document and adding bold, italics, headings, and code snippets, AsciiDoc has features to add figure captions, cross references, and other slightly more robust features that I use for a lot of my writing.
AsciiDoctor is for the Asciidoc format, but, generally includes some nice tooling for commonly used output formats.
Yes, you can use pandoc to convert asciidoc to something else, but in general, I've noticed that asciidoctor has great support for HTML themes:
https://asciidoctor.org/docs/produce-custom-themes-using-asc...
https://github.com/darshandsoni/asciidoctor-skins
The PDF styling directly out of the asciidoctor tool, on the other hand, isn't as advanced. So going from asciidoc to DocBook can make sense here, and I think is probably still done to do things like create truly professional looking PDFs.
What to use? Depends on your toolchain. I almost never need anything but HTML and PDF.
I've found that people, used to Markdown, can jump into Asciidoc and use `asciidoctor` easily.
The Asciidoctor tool also comes with a very high-quality default CSS style, which makes it very appealing and ready to use. Thumbs up from me for the work on this tool and the format.
Long story short: thanks for sharing your work, that's good and if it serve you it's a very smart move but I do not expect a real "success".