This is a demonstration of Asciidoctor 2.0.22. And this is the preamble of this document.
This document exercises many of the features of AsciiDoc to test the Asciidoctor implementation.
💡
|
If you want the HTML to have the familiar AsciiDoc Python style, load the asciidoc.css stylesheet using the CLI option -a stylesheet=asciidoc.css .
|
-
underlines around a phrase place emphasis
-
astericks around a phrase make the text bold
-
double astericks around one or more letters in a word make those letters bold
-
double underscore around a substring in a word emphasizes that substring
-
use carrots around characters to make them superscript
-
use tildes around characters to make them subscript
-
to pass through HTML directly, surround the text with triple plus
-
characters can be escaped using a \
-
for instance, you can escape a quote inside emphasized text like Here's Johnny!
-
-
you can safely use reserved XML characters like <, > and &, which are escaped when converting
-
force a space between inline elements using the {sp} attribute
-
hold text together with an intrinsic non-breaking space attribute, {nbsp}
-
handle words with unicode characters like in the name Gregory Romé
-
claim your copyright ©, registered trademark ® or trademark ™
-
select View › Zoom › Reset to reset the zoom
You can write text with inline links, optionally using an explicit link prefix. In either case, the link can have a query string.
If you want to break a line
just end it in a + sign
and continue typing on the next line.
-
this list
-
should join
-
to have
-
four items
-
These items
-
will be auto-numbered
-
and can be nested
-
-
A numbered list can nest
-
unordered
-
list
-
items
-
I swear I left it in Guy's car. Let's go look for it.
This should be a standalone paragraph, not grabbed by the definition list.
-
first level written on two lines
-
first level
with this literal text
-
first level
with more literal text
-
second level
-
third level
-
fourth level
-
-
-
-
back to
first level
Let’s make a horizontal rule…
then take a break.
Do you feel safer with the tiger in a box?
Fancy some math?
We’d like to include content, but for now the best we can do is link to it.
require 'asciidoctor'
doc = Asciidoctor.load '*This* is http://asciidoc.org[AsciiDoc]!', header_footer: true
puts doc.convert
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="Asciidoctor 0.1.4">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Untitled</title>
<link rel="stylesheet" href="./asciidoctor.css">
</head>
<body class="article">
<div id="header">
</div>
<div id="content">
<div class="paragraph">
<p><strong>This</strong> is <a href="http://asciidoc.org">AsciiDoc</a>!</p>
</div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2014-01-28 20:11:37 MST
</div>
</div>
</body>
</html>
AsciiDoc is so powerful!
This verse comes to mind.
La la la
Here’s another quote:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
The Adventures of Sherlock Holmes
“Get moving!” he shouted.
Want to get literal? Just prefix a line with a space (just 1 space will do).
I'll join that party, too.
We forgot to mention in Ordered lists that you can change the numbering style.
-
first item (yeah!)
-
second item, looking
so mono
-
third item,
mono
it is!
ℹ️
|
AsciiDoc is quite cool, you should try it! |
💡
|
Info
Go to this URL to learn more about it: Or you could return to the First Steps with AsciiDoc or Purpose. |
Here’s a reference to the definition of another term, in case you forgot it.
ℹ️
|
One more thing. Happy documenting! |
When all else fails, head over to http://google.com.