Test post [Asciidoc]

4 minutes

I’ve decided to write posts/etc in Asciidoc henceforth. Why? Because Markdown is lacking some schanzy features, but its most redeeming quality is being able to embed arbitrary HTML. However, Asciidoc has more built-in features, and can embed arbitrary HTML!

I shall now show off some these feature-full markups. First up is the note, tip, important, warning, and critical messages:

This is a note message.
This is a tip.
This is important.
This is warning you not to do a thing.
This is cautioning you a thing could happen.

Of course, there is also source code listing support using Pygments:

def fib(n):
    if n <= 1:
        return 1
    else:
        return fib(n-1) + fib(n-2)

print(fib(2))  #=> 2

There’s also math support via MathJax: \(\int \frac{1}{x} dx\)

\[u(x) = \begin{cases} \exp{x} & x \geq 0 \\ 1 & x < 0 \end{cases}\]

There is also nifty built-in support for sidebar notes; it’s around here somewhere…​

You can also put a “literal” block in:

*Literal* block

Use: workaround when literal paragraph (indented) like
  1. First
  2. Second
incorrectly processed as list.

Blockquotes are objectively better, since there is support for citing the author and source:

On November 20, 1982, MIT hacked the Harvard-Yale football game. Just after Harvard’s second touchdown against Yale, in the first quarter, a small black ball popped up out of the ground at the 40-yard line, and grew bigger, and bigger, and bigger. The letters “MIT” appeared all over the ball. As the players and officials stood around gawking, the ball grew to six feet in diameter and then burst with a bang and a cloud of white smoke.

The Boston Globe later reported: “If you want to know the truth, MIT won The Game.”

The prank had taken weeks of careful planning by members of MIT’s Delta Kappa Epsilon fraternity. The device consisted of a weather balloon, a hydraulic ram powered by Freon gas to lift it out of the ground, and a vacuum-cleaner motor to inflate it. They made eight separate expeditions to Harvard Stadium between 1 and 5 AM, locating an unused 110-volt circuit in the stadium and running buried wires from the stadium circuit to the 40-yard line, where they buried the balloon device. When the time came to activate the device, two fraternity members had merely to flip a circuit breaker and push a plug into an outlet.

This stunt had all the earmarks of a perfect hack: surprise, publicity, the ingenious use of technology, safety, and harmlessness. The use of manual control allowed the prank to be timed so as not to disrupt the game (it was set off between plays, so the outcome of the game would not be unduly affected). The perpetrators had even thoughtfully attached a note to the balloon explaining that the device was not dangerous and contained no explosives.

Harvard president Derek Bok commented: “They have an awful lot of clever people down there at MIT, and they did it again.” President Paul E. Gray of MIT said: “There is absolutely no truth to the rumor that I had anything to do with it, but I wish there were.”

― The Meaning of "Hack"
the Jargon File 4.4.7

There’s even Q&As!

  1. Will I use this Q&A feature?

    Probably not.

  2. Does it matter?

    Nope.

Using Asciidoctor Diagram I can even embed Graphviz drawings…​

dot example

…​Ditaa drawings…​

memory

…​and PlantUML diagrams…​

diagram classes
use case

…​and finally nwdiag pictograms:

simple

There are even more supported by Asciidoctor diagrams!


No webmentions were found.