Asciidoctor Demo ================ //// Big ol' comment sittin' right 'tween this here title 'n header metadata //// Dan Allen :description: A demo of Asciidoctor. This document + exercises numerous features of AsciiDoc + to test Asciidoctor compliance. :library: Asciidoctor :idprefix: :numbered: :imagesdir: images :toc: manual :css-signature: demo :toc-placement: preamble //:max-width: 800px //:doctype: book //:sectids!: This is a demonstration of {library} {asciidoctor-version}. And this is the preamble of this document. ifdef::env-github[] ++++ ++++ endif::env-github[] [[purpose]] .Purpose **** This document exercises many of the features of AsciiDoc to test the {library} implementation. **** TIP: If you want the output to look familiar, copy (or link) the AsciiDoc stylesheet, asciidoc.css, to the output directory. NOTE: Items marked with TODO are either not yet supported or a work in progress. == First Steps with AsciiDoc .Inline markup * single quotes around a phrase place 'emphasis' * astericks around a phrase make the text *bold* * double astericks around one or more **l**etters in a word make those letters bold * double underscore around a __sub__string in a word emphasizes that substring * use carrots around characters to make them ^super^script * use tildes around characters to make them ~sub~script // separate two adjacent lists using a line comment (only the leading // is required) - characters can be escaped using a {backslash} * 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{sp}between inline elements using the \{sp} attribute - hold text together with an intrinsic non-breaking{nbsp}space attribute, \{nbsp} - handle words with unicode characters like in the name Gregory Romé - claim your copyright (C), registered trademark (R) or trademark (TM) You can write text http://example.com[with inline links], optionally{sp}using an explicit link:http://example.com[link prefix]. In either case, the link can have a http://example.com?foo=bar&lang=en[query string]. If you want to break a line + just end it in a {plus} sign + and continue typing on the next line. === Lists Upon Lists .Adjacent lists * this list * should join * to have * four items ifdef::env-github[] ++++ ++++ endif::env-github[] [[ordered]] .Ordered lists . These items . will be auto-numbered .. and can be nested . A numbered list can nest * unordered * list * items .Statement I swear I left it in 'Guy\'s' car. Let\'s go look for it. [[defs]] term:: definition line two [[another_term]]another term:: another definition, which can be literal (indented) or regular paragraph This should be a standalone paragraph, not grabbed by the definition list. [[nested]] * 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 // this is just a comment Let's make a horizontal rule... ''' then take a break. //// We'll be right with you... after this brief interruption. //// == ...and we're back! Want to see a image:tiger.png[Tiger]? Do you feel safer with the tiger in a box? .Tiger in a box image::tiger.png[] include::includes/include.adoc[] .Asciidoctor usage example. The listing should contain 5 lines. [source,ruby] -- require 'asciidoctor' doc = Asciidoctor.load '*This* is http://asciidoc.org[AsciiDoc]!', header_footer: true puts doc.render -- // TODO: Use ifdef to show output according to current backend .Output of Asciidoctor usage example ```html Untitled

This is AsciiDoc!

``` === Block Quotes and ``Smart'' Ones ____ AsciiDoc is 'so' *powerful*! ____ This verse comes to mind. [verse] La la la Here's another quote: [quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes] ____ When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth. ____ ``Get moving!'' he shouted. Getting Literal [[literally]] ----------------------------- 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 <> that you can change the numbering style. .. first item (yeah!) .. second item, looking `so mono` .. third item, +mono+ it is! // This attribute line will get reattached to the next block // despite being followed by a trailing blank line [id='wrapup'] == Wrap-up NOTE: AsciiDoc is quite cool, you should try it! [TIP] .Info ===== Go to this URL to learn more about it: * http://asciidoc.org Or you could return to the xref:first-steps-with-asciidoc[] or <>. ===== Here's a reference to the definition of <>, in case you forgot it. [NOTE] One more thing. Happy documenting! [[google]]When all else fails, head over to .