blob: 994d9cce750ce7f49b79a732b3c510571eb035cc [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Asciidoc Syntax :: Apache Isis</title>
<link rel="canonical" href="https://isis.apache.org/conguide/2.0.0-M3/documentation/asciidoc-syntax.html">
<meta name="generator" content="Antora 2.2.0">
<link rel="stylesheet" href="../../../_/css/site.css">
<link rel="stylesheet" href="../../../_/css/site-custom.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800|Montserrat:300,400,700" rel="stylesheet">
<link rel="home" href="https://isis.apache.org" title="Apache Isis">
</head>
<body class="article">
<header class="header">
<nav class="navbar">
<div class="navbar-brand">
<a class="navbar-item" href="https://isis.apache.org">
<span class="icon">
<img src="../../../_/img/isis-logo-48x48.png"></img>
</span>
<span>Apache Isis</span>
</a>
<button class="navbar-burger" data-target="topbar-nav">
<span></span>
<span></span>
<span></span>
</button>
</div>
<div id="topbar-nav" class="navbar-menu">
<a class="navbar-end">
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Quick Start</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">Starter Apps</span>
<a class="navbar-item" href="../../../docs/latest/starters/helloworld.html">Hello World</a>
<a class="navbar-item" href="../../../docs/latest/starters/simpleapp.html">Simple App</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Demos &amp; Tutorials</span>
<a class="navbar-item" href="../../../docs/latest/demo/about.html">Demo App</a>
<a class="navbar-item" href="https://danhaywood.gitlab.io/isis-petclinic-tutorial-docs/petclinic/1.16.2/intro.html">Petclinic (tutorial)</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Resources</span>
<a class="navbar-item" href="../../../docs/latest/resources/cheatsheet.html">Cheatsheet</a>
<a class="navbar-item" href="../../../docs/latest/resources/icons.html">Icons</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Guides</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">Development</span>
<a class="navbar-item" href="../../../setupguide/latest/about.html">Setup Guide</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Core</span>
<a class="navbar-item" href="../../../userguide/latest/about.html">User Guide</a>
<a class="navbar-item" href="../../../refguide/latest/about.html">Reference Guide</a>
<a class="navbar-item" href="../../../testing/latest/about.html">Testing Guide</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Libraries</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">For Use in Apps</span>
<a class="navbar-item" href="../../../subdomains/latest/about.html">Subdomain Libraries</a>
<a class="navbar-item" href="../../../valuetypes/latest/about.html">Value Types</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Integrate between Apps</span>
<a class="navbar-item" href="../../../mappings/latest/about.html">Bounded Context Mapping Libraries</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Other</span>
<a class="navbar-item" href="../../../incubator/latest/about.html">Incubator</a>
<a class="navbar-item" href="../../../legacy/latest/about.html">Legacy</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Components</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">Viewers</span>
<a class="navbar-item" href="../../../vw/latest/about.html">Wicket UI</a>
<a class="navbar-item" href="../../../vro/latest/about.html">Restful Objects (REST)</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Security</span>
<a class="navbar-item" href="../../../security/latest/about.html">Security Guide</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Persistence</span>
<a class="navbar-item" href="../../../pjdo/latest/about.html">DataNucleus (JDO)</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Extensions</span>
<a class="navbar-item" href="../../../extensions/latest/about.html">Extensions Catalog</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Support</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">Contact</span>
<a class="navbar-item" href="../../../docs/latest/support/slack-channel.html">Slack</a>
<a class="navbar-item" href="../../../docs/latest/support/mailing-list.html">Mailing Lists</a>
<a class="navbar-item" href="https://issues.apache.org/jira/browse/ISIS">JIRA</a>
<a class="navbar-item" href="https://stackoverflow.com/questions/tagged/isis">Stack Overflow</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Releases</span>
<a class="navbar-item" href="../../../docs/latest/downloads/how-to.html">Downloads</a>
<a class="navbar-item" href="../../../relnotes/latest/about.html">Release Notes</a>
<a class="navbar-item" href="../../../docs/latest/archive/1-x.html">Archive (1.x)</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Framework</span>
<a class="navbar-item" href="../../../conguide/latest/about.html">Contributors' Guide</a>
<a class="navbar-item" href="../../../comguide/latest/about.html">Committers' Guide</a>
<a class="navbar-item" href="../../../core/latest/about.html">Core Design</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">ASF</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="http://www.apache.org/">Apache Homepage</a>
<a class="navbar-item" href="https://www.apache.org/events/current-event">Events</a>
<a class="navbar-item" href="https://www.apache.org/licenses/">Licenses</a>
<a class="navbar-item" href="https://www.apache.org/security/">Security</a>
<a class="navbar-item" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
<a class="navbar-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
<hr class="navbar-divider"/>
<a class="navbar-item" href="https://whimsy.apache.org/board/minutes/Isis.html">PMC board minutes</a>
</div>
</div>
<a class="navbar-item" href="../../../docs/latest/about.html">
<span class="icon">
<img src="../../../_/img/home.png"></img>
</span>
</a>
</div>
</div>
</nav>
</header>
<div class="body ">
<div class="nav-container" data-component="conguide" data-version="2.0.0-M3">
<aside class="nav">
<div class="panels">
<div class="nav-panel-pagination">
<a class="page-previous disabled" rel="prev" href="" title=""><span></span></a>
<a class="page-next disabled" rel="next"
href="" title=""><span></span></a>
<!--
page.parent doesn't seem to be set...
<a class="page-parent disabled" rel="prev" href="" title=""><span></span></a>
-->
</div>
<div class="nav-panel-menu is-active" data-panel="menu">
<nav class="nav-menu">
<h3 class="title"><a href="../about.html">Contributors&#x27; Guide</a></h3>
<ul class="nav-list">
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<a class="nav-link" href="../contributing.html">Contributing</a>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="../building-apache-isis.html">Building Apache Isis</a>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="../building-docs-and-website.html">Building Docs and Website</a>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="#asciidoc-syntax.adoc">Asciidoc Syntax</a>
</li>
<li class="nav-item" data-depth="1">
<a class="nav-link" href="../agilej.html">AgileJ</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<a class="nav-link" href="../git/about.html">Git Cookbook</a>
</li>
</ul>
</li>
</ul>
</nav>
</div>
<div class="nav-panel-explore" data-panel="explore">
<div class="context">
<span class="title">Contributors&#x27; Guide</span>
<span class="version">2.0.0-M3</span>
</div>
<ul class="components">
<li class="component">
<span class="title"> </span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../docs/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">BC Mappings Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../mappings/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Committers' Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../comguide/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component is-current">
<span class="title">Contributors' Guide</span>
<ul class="versions">
<li class="version is-current is-latest">
<a href="../about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Design Docs</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../core/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Extensions Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../extensions/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Incubator Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../incubator/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">JDO/DataNucleus</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../pjdo/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Legacy Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../legacy/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Reference Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../refguide/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Release Notes</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../relnotes/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Restful Objects Viewer</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../vro/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Security Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../security/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Setup Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../setupguide/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Subdomains Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../subdomains/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Testing Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../testing/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">User Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../userguide/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Value Types Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../valuetypes/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Wicket Viewer</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../vw/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</aside>
</div>
<main role="main">
<div class="toolbar" role="navigation">
<button class="nav-toggle"></button>
<a href="../../../docs/2.0.0-M3/about.html" class="home-link"></a>
<nav class="breadcrumbs" aria-label="breadcrumbs">
<ul>
<li><a href="../about.html">Contributors' Guide</a></li>
<li><a href="asciidoc-syntax.html">Asciidoc Syntax</a></li>
</ul>
</nav>
<div class="edit-this-page"><a href="https://github.com/apache/isis/edit/2.0.0-M3/antora/components/conguide/modules/documentation/pages/asciidoc-syntax.adoc">Edit</a></div>
</div>
<article class="doc">
<a name="section-top"></a>
<h1 class="page">Asciidoc Syntax</h1>
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>This page describes the main syntax conventions when writing Asciidoctor/Asciidoc.</p>
</div>
<div class="paragraph">
<p>For more info, see:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="asciidoc-syntax-quick-reference.pdf">asciidoc-syntax-quick-reference.pdf</a></p>
</li>
<li>
<p><a href="asciidoc-writers-guide.pdf">asciidoc-writers-guide.pdf</a></p>
</li>
<li>
<p><a href="https://powerman.name/doc/asciidoc">online cheat sheet</a></p>
</li>
<li>
<p><a href="http://asciidoctor.org/docs/user-manual">asciidoctor online user manual</a></p>
</li>
<li>
<p><a href="http://www.methods.co.nz/asciidoc/userguide.html">asciidoc online user manual</a></p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="headings"><a class="anchor" href="#headings"></a>Headings</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The number of preceding <code>=</code> signs indicates the heading level.</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 60%;">
<col style="width: 40%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Syntax</th>
<th class="tableblock halign-left valign-top">Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>= Level 1</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>There can only be one level 1 per .adoc (at the very top).</p>
</div>
<div class="paragraph">
<p>The paragraph immediately following the heading is the "preamble", and is rendered in a larger font.
It&#8217;s therefore a good place to summarize the content of the document.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>== Level 2</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Level 2</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>=== Level 3</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Level 3</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>==== Level 4</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Level 4</p>
</div></div></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect1">
<h2 id="paragraphs"><a class="anchor" href="#paragraphs"></a>Paragraphs</h2>
<div class="sectionbody">
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 60%;">
<col style="width: 40%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Syntax</th>
<th class="tableblock halign-left valign-top">Example</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>Paragraphs are separated by one or more blank lines.
So, this is a separate paragraph.</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Paragraphs are separated by one or more blank lines.</p>
</div>
<div class="paragraph">
<p>So, this is a separate paragraph.</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>All consecutive sentences are rendered in the same paragraph.
This is another sentence in the para.
And another one.
Yet another.</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Sentences without a blank line are in the same paragraph.
Don&#8217;t worry about word wrapping, just start the next sentence on the next line.</p>
</div></div></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>In general, there&#8217;s no need to indent paragraphs; keep things left-aligned.
Let the markup specify the logical indentation.</p>
</div>
<div class="sidebarblock">
<div class="content">
<div class="title">Start each sentence on a new line</div>
<div class="paragraph">
<p>Don&#8217;t worry about wrapping sentences at 80 characters, just start each new sentence on a new line.
Asciidoc will take care of the rendering.</p>
</div>
<div class="paragraph">
<p>This simple tip has a number of other benefits:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>when the document is edited (eg correct a typo or insert a missing word), then only a single line in the file is changed.<br></p>
<div class="paragraph">
<p>This will reduce change of merge conflicts, too.</p>
</div>
</li>
<li>
<p>You can easily see if a sentence is too long, and should be split</p>
</li>
<li>
<p>You can easily see if all sentences are the same length: good writing should vary the length of sentences</p>
</li>
<li>
<p>You can easily see if successive sentences start with the same phrase (that might be a good thing, or a bad thing, depending).</p>
</li>
</ol>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="bulleted-lists"><a class="anchor" href="#bulleted-lists"></a>Bulleted lists</h2>
<div class="sectionbody">
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 60%;">
<col style="width: 40%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Syntax</th>
<th class="tableblock halign-left valign-top">Example</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>The blank line after this para is required:
* Bullet 1 +
+
Indented paragraph (note the '+' to to chain this para with the bullet)
* Bullet 2
** Child bullets +
+
More indenting
** Another child bullet
* Bullet 3</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>The blank line after this para is required:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Bullet 1<br></p>
<div class="paragraph">
<p>Indented paragraph (note the '+' to chain this para with the bullet)</p>
</div>
</li>
<li>
<p>Bullet 2</p>
<div class="ulist">
<ul>
<li>
<p>Child bullets<br></p>
<div class="paragraph">
<p>More indenting</p>
</div>
</li>
<li>
<p>Another child bullet</p>
</li>
</ul>
</div>
</li>
<li>
<p>Bullet 3</p>
</li>
</ul>
</div></div></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect1">
<h2 id="numbered-lists"><a class="anchor" href="#numbered-lists"></a>Numbered lists</h2>
<div class="sectionbody">
<div class="paragraph">
<p>There&#8217;s no need to keep track of numbers, just use '1' or 'a' etc:</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 60%;">
<col style="width: 40%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Syntax</th>
<th class="tableblock halign-left valign-top">Example</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>The blank line after this para is required:
1. Bullet 1 +
+
Indented paragraph
2. Bullet 2
a. Child bullets +
+
More indenting
b. Another child bullet
3. Bullet 3</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>The blank line after this para is required:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Bullet 1<br></p>
<div class="paragraph">
<p>Indented paragraph</p>
</div>
</li>
<li>
<p>Bullet 2</p>
<div class="olist loweralpha">
<ol class="loweralpha" type="a">
<li>
<p>Child bullets<br></p>
<div class="paragraph">
<p>More indenting</p>
</div>
</li>
<li>
<p>Another child bullet</p>
</li>
</ol>
</div>
</li>
<li>
<p>Bullet 3</p>
</li>
</ol>
</div></div></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>While it isn&#8217;t necessary to maintain the ordering manually (could just use '1' for all bullets), this does generate warnings when the document is built.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="links-and-cross-references"><a class="anchor" href="#links-and-cross-references"></a>Links and Cross-references</h2>
<div class="sectionbody">
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 37.5%;">
<col style="width: 25%;">
<col style="width: 37.5%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Syntax</th>
<th class="tableblock halign-left valign-top">Example</th>
<th class="tableblock halign-left valign-top">Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>link:http://ciserver:8080[CI Server]</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a href="http://ciserver:8080">CI Server</a></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Link to an external hyperlink</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>link:http://ciserver:8080[CI Server^]</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a href="http://ciserver:8080" target="_blank" rel="noopener">CI Server</a></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Link to an external hyperlink, with <code>target=blank</code></p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>xref:conguide:ROOT:about.adoc#links-and-xrefs[background]</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p><a href="../about.html#links-and-xrefs" class="page">background</a></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Cross-reference to section in Antora document</p>
</div></div></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect1">
<h2 id="tables"><a class="anchor" href="#tables"></a>Tables</h2>
<div class="sectionbody">
<div class="literalblock">
<div class="content">
<pre>.Some table
[cols="3a,2a", options="header"]
|===
| Header col 1
| Header col 2
| Row 1 col 1
| Row 1 col 2
| Row 2 col 1
| Row 2 col 2
|===</pre>
</div>
</div>
<div class="paragraph">
<p>renders as:</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 1. Some table</caption>
<colgroup>
<col style="width: 60%;">
<col style="width: 40%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Header col 1</th>
<th class="tableblock halign-left valign-top">Header col 2</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Row 1 col 1</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Row 1 col 2</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Row 2 col 1</p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>Row 2 col 2</p>
</div></div></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>where:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>the <code>cols</code> attribute says how many columns there are and their respective widths.</p>
</li>
<li>
<p>the "a" suffix indicates that the contents is parsed as Asciidoc</p>
</li>
</ul>
</div>
<div class="sect2">
<h3 id="column-attributes"><a class="anchor" href="#column-attributes"></a>Column Attributes</h3>
<div class="paragraph">
<p>Other options are (<a href="http://mrhaki.blogspot.co.uk/2014/11/awesome-asciidoctor-styling-columns-and.html">credit</a>):</p>
</div>
<div class="ulist">
<ul>
<li>
<p>e: emphasized</p>
</li>
<li>
<p>a: Asciidoc markup</p>
</li>
<li>
<p>m: monospace</p>
</li>
<li>
<p>h: header style, all column values are styled as header</p>
</li>
<li>
<p>s: strong</p>
</li>
<li>
<p>l: literal, text is shown in monospace font and line breaks are kept</p>
</li>
<li>
<p>d: default</p>
</li>
<li>
<p>v: verse, keeps line breaks</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>.Table with column style e,a,m
[cols="e,a,m"]
|===
| Emphasized (e) | Asciidoc (a) | Monospaced (m)
| Asciidoctor
| NOTE: *Awesome* way to write documentation
| It is just code
|===</pre>
</div>
</div>
<div class="paragraph">
<p>renders as</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 2. Table with column style e,a,m</caption>
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Emphasized (e)</th>
<th class="tableblock halign-left valign-top">Asciidoc (a)</th>
<th class="tableblock halign-left valign-top">Monospaced (m)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><em>Asciidoctor</em></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<strong>Awesome</strong> way to write documentation
</td>
</tr>
</table>
</div></div></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>It is just code</code></p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>and:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>.Table with column style h,s,l
[cols="h,s,l"]
|===
| Header (h) | Strong (s) | Literal (l)
| Asciidoctor
| Awesome way to write documentation
| It is
just code
|===</pre>
</div>
</div>
<div class="paragraph">
<p>renders as</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 3. Table with column style h,s,l</caption>
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Header (h)</th>
<th class="tableblock halign-left valign-top">Strong (s)</th>
<th class="tableblock halign-left valign-top"> Literal (l)</th>
</tr>
</thead>
<tbody>
<tr>
<th class="tableblock halign-left valign-top"><p class="tableblock">Asciidoctor</p></th>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>Awesome way to write documentation</strong></p></td>
<td class="tableblock halign-left valign-top"><div class="literal"><pre> It is
just code</pre></div></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>and:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>.Table with column style d,v
[cols="d,v"]
|===
| Default (d) | Verse (v)
| Asciidoctor
| Awesome way
to write
documentation
|===</pre>
</div>
</div>
<div class="paragraph">
<p>renders as</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 4. Table with column style d,v</caption>
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Default (d)</th>
<th class="tableblock halign-left valign-top"> Verse (v)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Asciidoctor</p></td>
<td class="tableblock halign-left valign-top"><div class="verse"> Awesome way
to write
documentation</div></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="column-alignment"><a class="anchor" href="#column-alignment"></a>Column Alignment</h3>
<div class="paragraph">
<p>This can be combined with alignment markers (<a href="http://mrhaki.blogspot.co.uk/2014/11/awesome-asciidoctor-table-column-and.html">credit</a>):</p>
</div>
<div class="ulist">
<ul>
<li>
<p>&lt;: top align values (default)</p>
</li>
<li>
<p>&gt;: bottom align values</p>
</li>
<li>
<p>^: center values</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>[cols="^.&gt;,&lt;.&lt;,&gt;.^", options="header"]
|===
| Name
| Description
| Version
| Asciidoctor
| Awesome way to write documentation
| 1.5.0
|===</pre>
</div>
</div>
<div class="paragraph">
<p>renders as:</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-center valign-bottom">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-right valign-middle">Version</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-center valign-bottom"><p class="tableblock">Asciidoctor</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Awesome way to write documentation</p></td>
<td class="tableblock halign-right valign-middle"><p class="tableblock">1.5.0</p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>where:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>the first column is centered and bottom aligned,</p>
</li>
<li>
<p>the second column is left and top aligned and</p>
</li>
<li>
<p>the third column is right aligned and centered vertically.</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="columnrow-spanning"><a class="anchor" href="#columnrow-spanning"></a>Column/Row Spanning</h3>
<div class="paragraph">
<p>We can also have columns or rows spanning multiple cells (<a href="http://mrhaki.blogspot.co.uk/2014/12/awesome-asciidoctor-span-cell-over-rows.html">credit</a>):</p>
</div>
<div class="paragraph">
<p>For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>.Cell spans columns
|===
| Name | Description
| Asciidoctor
| Awesome way to write documentation
2+| The statements above say it all
|===</pre>
</div>
</div>
<div class="paragraph">
<p>renders as:</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 5. Cell spans columns</caption>
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Asciidoctor</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Awesome way to write documentation</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" colspan="2"><p class="tableblock">The statements above say it all</p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>The <code>N+</code> sign notation tells Asciidoctor to span this cell over N columns.</p>
</div>
<div class="paragraph">
<p>while:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>.Cell spans rows
|===
| Name | Description
.2+| Asciidoctor
| Awesome way to write documentation
| Works on the JVM
|===</pre>
</div>
</div>
<div class="paragraph">
<p>renders as:</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 6. Cell spans rows</caption>
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top" rowspan="2"><p class="tableblock">Asciidoctor</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Awesome way to write documentation</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Works on the JVM</p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>The <code>.N+</code> notation tells Asciidoctor to span this cell over N rows.</p>
</div>
<div class="paragraph">
<p>and:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>.Cell spans both rows and columns
|===
| Row 1, Col 1 | Row 1, Col 2 | Row 1, Col 3
2.2+| Cell spans 2 cols, 2 rows
| Row 2, Col 3
| Row 3, Col 3
|===</pre>
</div>
</div>
<div class="paragraph">
<p>renders as:</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 7. Cell spans both rows and columns</caption>
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Row 1, Col 1</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Row 1, Col 2</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Row 1, Col 3</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top" colspan="2" rowspan="2"><p class="tableblock">Cell spans 2 cols, 2 rows</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Row 2, Col 3</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Row 3, Col 3</p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>The <code>N.M+</code> notation tells Asciidoctor to span this cell over N columns and M rows.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="admonitions"><a class="anchor" href="#admonitions"></a>Admonitions</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Callout or highlight content of particular note.</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 60%;">
<col style="width: 40%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Syntax</th>
<th class="tableblock halign-left valign-top">Example</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>NOTE: the entire note must be a single sentence.</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
the entire note must be a single sentence.
</td>
</tr>
</table>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>[NOTE]
====
the note is multiple paragraphs, and can have all the usual styling,
* eg bullet points:
* etc etc
====</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>the note is multiple paragraphs, and can have all the usual styling,</p>
</div>
<div class="ulist">
<ul>
<li>
<p>eg bullet points:</p>
</li>
<li>
<p>etc etc</p>
</li>
</ul>
</div>
</td>
</tr>
</table>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>[TIP]
====
Here's something worth knowing...
====</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Here&#8217;s something worth knowing&#8230;&#8203;</p>
</div>
</td>
</tr>
</table>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>[WARNING]
====
Be careful...
====</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="admonitionblock warning">
<table>
<tr>
<td class="icon">
<i class="fa icon-warning" title="Warning"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Be careful&#8230;&#8203;</p>
</div>
</td>
</tr>
</table>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><div class="content"><div class="literalblock">
<div class="content">
<pre>[IMPORTANT]
====
Don't forget...
====</pre>
</div>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Don&#8217;t forget&#8230;&#8203;</p>
</div>
</td>
</tr>
</table>
</div></div></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect1">
<h2 id="source-code"><a class="anchor" href="#source-code"></a>Source code</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Use <code>[source]</code> macro to specify source content:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>[source,powershell]
----
get-command -module BomiArtifact
----</pre>
</div>
</div>
<div class="paragraph">
<p>will render as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-powershell hljs" data-lang="powershell">get-command -module BomiArtifact</code></pre>
</div>
</div>
<div class="paragraph">
<p>Some languages support syntax highlighting.
For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>[source,java]
----
public class SomeClass extends SomeOtherClass {
...
}
----</pre>
</div>
</div>
<div class="paragraph">
<p>will render as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public class SomeClass extends SomeOtherClass {
...
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Callouts can also be added using an appropriate comment syntax.
For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>[source,java]
----
public class SomeClass
extends SomeOtherClass { // &lt;1&gt;
public static void main(String[] args) { // &lt;2&gt;
...
}
}
----
&lt;1&gt; inherits from `SomeOtherClass`
&lt;2&gt; entry point into the program</pre>
</div>
</div>
<div class="paragraph">
<p>will render as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public class SomeClass
extends SomeOtherClass { <i class="conum" data-value="1"></i><b>(1)</b>
public static void main(String[] args) { <i class="conum" data-value="2"></i><b>(2)</b>
...
}
}</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>inherits from <code>SomeOtherClass</code></td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td>entry point into the program</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>and</p>
</div>
<div class="literalblock">
<div class="content">
<pre>[source,xml]
----
&lt;a&gt;
&lt;b c="foo"/&gt; &lt;!--1--&gt;
&lt;/a&gt;
----
&lt;1&gt; some comment</pre>
</div>
</div>
<div class="paragraph">
<p>renders as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-xml hljs" data-lang="xml">&lt;a&gt;
&lt;b c="foo"/&gt; <i class="conum" data-value="1"></i><b>(1)</b>
&lt;/a&gt;</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>some comment</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>It&#8217;s also possible to include source code snippets; see the guides linked previously</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="images"><a class="anchor" href="#images"></a>Images</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Use the <code>image:</code> macro to reference images.
For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>image:_images/vscode.png[]</pre>
</div>
</div>
<div class="paragraph">
<p>To make the image clickable, add in the <code>link</code> attribute:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>image:_images/vscode.png[link="_images/vscode.png"]</pre>
</div>
</div>
<div class="paragraph">
<p>It&#8217;s also possible to specify the width using <code>scaledwidth</code> (for PDF/HTML) or <code>width</code> and <code>height</code> (for HTML only).</p>
</div>
<div class="paragraph">
<p>For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>image:_images/vscode.png[link="_images/vscode.png",width="800px"]</pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="child-documents"><a class="anchor" href="#child-documents"></a>Child Documents</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Use the <code>include:</code> macro to break up a document into multiple sections.</p>
</div>
<div class="paragraph">
<p>The <code>leveloffset=+1</code> means that each included file&#8217;s heading levels are automatically adjusted.
The net effect is that all documents can and should use heading 1 as their top-level.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="metadata"><a class="anchor" href="#metadata"></a>Metadata</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The top-level document must include the <code>_basedir</code> attribute; this points to the parent directory <code>src/main/asciidoc</code>.
This attribute is set immediately after the top-level heading.</p>
</div>
<div class="paragraph">
<p>In addition, the <code>:toc:</code> adds a table of contents.</p>
</div>
<div class="paragraph">
<p>For example, the <code>setting-up/concepts/concepts.adoc</code> file starts:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-asciidoc hljs" data-lang="asciidoc">[[concepts]]
= Concepts
:_basedir: ../../
...</code></pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="uml-diagrams"><a class="anchor" href="#uml-diagrams"></a>UML diagrams</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Asciidoctor includes support for the <a href="http://plantuml.com/">plantuml</a>, allowing simple UML diagrams to be easily sketched.</p>
</div>
<div class="paragraph">
<p>For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>[plantuml]
----
class Car
Driver - Car : drives &gt;
Car *- Wheel : have 4 &gt;
Car -- Person : &lt; owns
----</pre>
</div>
</div>
<div class="paragraph">
<p>renders as:</p>
</div>
<div class="imageblock plantuml">
<div class="content">
<img src="http://www.plantuml.com/plantuml/png/SoWkIImgAStDuKhEIImkLd1EBEBYSYdAB4ijKj05yHIi5590t685EouGLqjN8JmZDJK7A9wHM9QgO08LrzLL24WjAixF0qhOAEINvnLpEQJcfG1D1W00" alt="diagram">
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="ditaa-diagrams"><a class="anchor" href="#ditaa-diagrams"></a>Ditaa diagrams</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Asciidoctor includes support for the <a href="http://ditaa.sourceforge.net/">ditaa</a>, allowing boxes-and-lines diagrams to be easily sketched.</p>
</div>
<div class="paragraph">
<p>For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>[ditaa,images/asciidoctor/ditaa-demo,png]
----
+--------+ +-------+ +-------+
| | --+ ditaa +--&gt; | |
| Text | +-------+ |diagram|
|Document| |!magic!| | |
| {d}| | | | |
+---+----+ +-------+ +-------+
: ^
| Lots of work |
+-------------------------+
----</pre>
</div>
</div>
<div class="paragraph">
<p>renders as:</p>
</div>
<div class="imageblock plantuml">
<div class="content">
<img src="http://www.plantuml.com/plantuml/png/SoWkIImgISaiIKpaKW02RLqeq4RYQ2FBQ8FLrIX0GOq2I1vi04Y97Loc1gOk9BMY1A81nRoQbCp4zAB4NAWwb_paqjpKl1AGkXh5tCJqp6J56cIRQf3ihKwfhK6MmbG7iagR27-0W9K2BX37fO1i1H3uv9SKA-IdAPJd5sKZsuSITXX0cyiXDIy574W0" alt="images/asciidoctor/ditaa-demo">
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="graphviz-diagrams"><a class="anchor" href="#graphviz-diagrams"></a>Graphviz diagrams</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Asciidoctor includes support for the <a href="http://ditaa.sourceforge.net/">ditaa</a>, allowing boxes-and-lines diagrams to be easily sketched.</p>
</div>
<div class="paragraph">
<p>For example:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>[graphviz,images/asciidoctor/graphviz-demo,png]
----
digraph automata_0 {
size ="8.5, 11";
node [shape = circle];
0 [ style = filled, color=lightgrey ];
2 [ shape = doublecircle ];
0 -&gt; 2 [ label = "a " ];
0 -&gt; 1 [ label = "other " ];
1 -&gt; 2 [ label = "a " ];
1 -&gt; 1 [ label = "other " ];
2 -&gt; 2 [ label = "a " ];
2 -&gt; 1 [ label = "other " ];
"Machine: a" [ shape = plaintext ];
}
----</pre>
</div>
</div>
<div class="paragraph">
<p>renders as:</p>
</div>
<div class="imageblock plantuml">
<div class="content">
<img src="http://www.plantuml.com/plantuml/png/VP1B2i90343tFKMOjOfJ44Ifz0AUe8Z4JkmCn9aoJS4FtjrMAtJJRlFU2oHv8nZ514cCgoBM5h2LS4F1ynfU2K3ZdWIPsgus2z1QxRkH3uQWQ2pM7O7InPBfr8Cr5D38W_lnrJ6JMK0PECICNMMbYlI0hvZsuj2Rq5wOVbjWMBCyV1N62t6dA0GrGdgCWbYAVwodIprVfjDbEb-g8vRMUTe1gj5PDQFpGdVfhNUIapVTbpy0" alt="images/asciidoctor/graphviz-demo">
</div>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
<div class="paragraph">
<p>This requires graphviz to be installed and the <code>dot.exe</code> on the PATH.
Alternatively, specify the location, eg using:</p>
</div>
<div class="literalblock">
<div class="content">
<pre>:graphvizdot: c:\Program Files (x86)\Graphviz2.38\bin\dot.exe</pre>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="kroki"><a class="anchor" href="#kroki"></a>Kroki</h2>
<div class="sectionbody">
<div class="paragraph">
<p>An alternative to using plantuml etc is <a href="https://kroki.io/">kroki</a>.
This is an online service (can also be <a href="https://kroki.io/#install">installed</a> to run on-prem) which generates textual markup for any of a number of different formats (including all of plantuml, ditaa and graphviz).</p>
</div>
<div class="paragraph">
<p>Getting Kroki to work with Antora is possible, but not (at the time of writing) completely smooth.
But this should become seamless in the future.</p>
</div>
</div>
</div>
</article>
<aside class="article-aside toc" role="navigation">
<p class="toc-title">On this page</p>
<div id="article-toc"></div>
</aside>
</main>
</div>
<footer class="footer">
<div class="content">
<div class="copyright">
<p>
Copyright © 2010~2020 The Apache Software Foundation, licensed under the Apache License, v2.0.
<br/>
Apache, the Apache feather logo, Apache Isis, and the Apache Isis project logo are all trademarks of The Apache Software Foundation.
</p>
</div>
<div class="revision">
<p>Revision: SNAPSHOT</p>
</div>
</div>
</footer>
<script src="../../../_/js/site.js"></script>
<script async src="../../../_/js/vendor/highlight.js"></script>
<script src="../../../_/js/vendor/jquery-3.4.1.min.js"></script>
<script src="../../../_/js/vendor/jquery-ui-1.12.1.custom.widget-only.min.js"></script>
<script src="../../../_/js/vendor/jquery.tocify.min.js"></script>
<script>
$(function() {
$("#article-toc").tocify( {
showEffect: "slideDown",
hashGenerator: "pretty",
hideEffect: "slideUp",
selectors: "h2, h3",
scrollTo: 120,
smoothScroll: true,
theme: "jqueryui",
highlightOnScroll: true
} );
});
</script>
</body>
</html>