Asciidoctor Demo
This is a demonstration of {library}. And this is the preamble of this document.
If you want the output to look familiar, copy (or link) the AsciiDoc stylesheet, asciidoc.css, to the output directory. |
Items marked with TODO are either not yet supported or work in progress. |
First steps
-
single quotes 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 emphasize that substring.
-
escape characters are supported
-
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 rendering
-
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é.
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
-
second level
-
third level
-
fourth level (TODO)
-
-
-
-
back to
first level
Let’s make a horizontal rule…
then take a break.
We’re back!
Want to see a ? (TODO)
Do you feel more safe with the tiger in a box?
doc = Asciidoctor::Document.new("*This* is it!", :header_footer => false)
puts doc.render
Here’s what it outputs (using the built-in templates):
<div class='paragraph'> <p><strong>This</strong> is it!</p> </div>
Quotes
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
Getting Literal
Want to get literal? Just prefix a line with a space (just one will do).
I'll join that party, too.
-
first rule (yeah!)
-
second rule, looking
so mono
Wrap-up
AsciiDoc is quite cool, you should try it! |
AsciiDoc info
Go to this URL to learn more about it: |
One more thing. Happy documenting! |