= 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 :experimental: //:toc: macro :toc: preamble :toc-title: pass:[

Contents

] :css-signature: demo //:max-width: 800px //:doctype: book //:sectids!: ifdef::env-github[] :note-caption: :information_source: :tip-caption: :bulb: endif::[] This is a demonstration of {library} {asciidoctor-version}. And this is the preamble of this document. [[purpose]] .Purpose **** This document exercises many of the features of AsciiDoc to test the {library} implementation. **** TIP: 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`. == First Steps with AsciiDoc .Inline markup * underlines 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 ifdef::basebackend-html[* to pass through +++HTML+++ directly, surround the text with triple plus] ifdef::basebackend-docbook[* to pass through +++XML+++ directly, surround the text with triple plus] // 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 converting - 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) - select menu:View[Zoom > Reset] to reset the zoom 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! Do you want to see a image:tiger.png[Tiger,50]? Do you feel safer with the tiger in a box? .Tiger in a box image::tiger.png[] Fancy some math? pass:[$$\sum_{i=1}^N (f_i)^2$$] We'd like to include content, but for now the best we can do is link to it. include::include.adoc[] .Asciidoctor usage example. The listing should contain 5 lines. [,ruby] ---- require 'asciidoctor' doc = Asciidoctor.load '*This* is http://asciidoc.org[AsciiDoc]!', header_footer: true puts doc.convert ---- // 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 .