summaryrefslogtreecommitdiff
path: root/INSTALL.html
blob: 7c114bd43acabd396f24dd0d0e3832662cd55866 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 9.0.2" />
<title>AsciiDoc Installation</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css" />
<link rel="stylesheet" href="./layout2.css" type="text/css" />
<script type="text/javascript" src="./asciidoc.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install(1);
/*]]>*/
</script>
</head>
<body style="max-width:70em">
<div id="layout-menu-box">
<div id="layout-menu">
  <div>&#187;<a href="index.html">Home</a></div>
  <div>&#187;<a href="userguide.html">User&nbsp;Guide</a></div>
  <div>&#187;<a href="INSTALL.html">Installation</a></div>
  <div>&#187;<a href="faq.html">FAQ</a></div>
  <div>&#187;<a href="manpage.html">asciidoc(1)</a></div>
  <div>&#187;<a href="a2x.1.html">a2x(1)</a></div>
  <div>&#187;<a href="asciidocapi.html">API</a></div>
  <div>&#187;<a href="plugins.html">Plugins</a></div>
  <div>&#187;<a href="http://powerman.name/doc/asciidoc">Cheatsheet</a></div>
  <div>&#187;<a href="testasciidoc.html">Tests</a></div>
  <div>&#187;<a href="CHANGELOG.html">ChangeLog</a></div>
  <div>&#187;<a href="support.html">Support</a></div>
  <div id="page-source">&#187;<a href="INSTALL.txt">Page&nbsp;Source</a></div>
</div>
</div>
<div id="layout-content-box">
<div id="layout-banner">
  <div id="layout-title">AsciiDoc</div>
  <div id="layout-description">Text based document generation</div>
</div>
<div id="layout-content">
<div id="header">
<h1>AsciiDoc Installation</h1>
<div id="toc">
  <div id="toctitle">Table of Contents</div>
  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="admonitionblock">
<table><tr>
<td class="icon">
<img src="./images/icons/note.png" alt="Note" />
</td>
<td class="content">The current version of AsciiDoc requires <strong>Python 3.5 or later</strong>
to run.  If you don&#8217;t already have an up-to-date version of Python
installed it can be downloaded from the official Python website
<a href="http://www.python.org/">http://www.python.org/</a>.</td>
</tr></table>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_prerequisites">Prerequisites</h2>
<div class="sectionbody">
<div class="paragraph"><p>See the <a href="README.html">README</a> page.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_installing_from_the_github_repository">Installing from the GitHub repository</h2>
<div class="sectionbody">
<div class="paragraph"><p>The AsciiDoc repository is hosted by <a href="https://github.com">GitHub</a>.
To browse the repository go to <a href="https://github.com/asciidoc/asciidoc-py3">https://github.com/asciidoc/asciidoc-py3</a>.
You can install AsciiDoc from the repository if you don&#8217;t have an up to
date packaged version, or you want to get the latest version from the master
branch:</p></div>
<div class="ulist"><ul>
<li>
<p>
Make sure you have <a href="https://git-scm.com/">Git</a>
  installed; you can check with:
</p>
<div class="literalblock">
<div class="content">
<pre><code>$ git --version</code></pre>
</div></div>
</li>
<li>
<p>
Go to the directory you want to install AsciiDoc into and download
  the repository.  This example gets the 9.0.2 tagged release:
</p>
<div class="literalblock">
<div class="content">
<pre><code>$ cd ~/bin
$ git clone https://github.com/asciidoc/asciidoc-py3 asciidoc-9.0.2
$ git checkout 9.0.2</code></pre>
</div></div>
</li>
</ul></div>
<div class="paragraph"><p>You now have two choices: you can run asciidoc locally from your
repository or you can use <em>autoconf(1)</em> and <em>make(1)</em> to perform a
system-wide install.</p></div>
<div class="sect2">
<h3 id="_running_asciidoc_from_your_local_copy">Running asciidoc from your local copy</h3>
<div class="paragraph"><p>Create a symlink to the AsciiDoc script in a search <code>PATH</code> directory
so it&#8217;s easy to execute <code>asciidoc</code> from the command line, for example:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>$ ln -s ~/bin/asciidoc-9.0.2/asciidoc.py ~/bin/asciidoc
$ ln -s ~/bin/asciidoc-9.0.2/a2x.py ~/bin/a2x</code></pre>
</div></div>
<div class="paragraph"><p>Use the git <code>pull</code> command to update your local AsciiDoc repository.</p></div>
</div>
<div class="sect2">
<h3 id="_installing_asciidoc_for_all_users">Installing asciidoc for all users</h3>
<div class="paragraph"><p>Create <code>configure</code> using <em>autoconf(1)</em>; use <code>configure</code> to create the
<code>Makefile</code>; run <em>make(1)</em>; build the man pages; install:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>$ autoconf
$ ./configure
$ make
$ sudo make install</code></pre>
</div></div>
<div class="paragraph"><p>To uninstall:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>$ sudo make uninstall</code></pre>
</div></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="X1">Distribution tarball installation</h2>
<div class="sectionbody">
<div class="paragraph"><p>The distribution source tarballs can be downloaded from GitHub
releases page <a href="https://github.com/asciidoc/asciidoc-py3/releases">https://github.com/asciidoc/asciidoc-py3/releases</a>.</p></div>
<div class="paragraph"><p>If your flavor of UNIX or Linux does not have a packaged AsciiDoc
distribution or if you prefer to install the latest AsciiDoc version
from source, use the <code>configure</code> shell script in the tarball root
directory.</p></div>
<div class="paragraph"><p>The <code>autoconf(1)</code>-generated <code>configure</code> script creates a <code>Makefile</code>
that is tailored for your system. To install:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>$ tar -xzf asciidoc-9.0.2.tar.gz
$ cd asciidoc-9.0.2
$ ./configure
$ sudo make install</code></pre>
</div></div>
<div class="paragraph"><p>To install the documentation:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>$ sudo make docs</code></pre>
</div></div>
<div class="paragraph"><p>To uninstall AsciiDoc:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>$ sudo make uninstall</code></pre>
</div></div>
<div class="paragraph"><p>If Vim is installed on your system the AsciiDoc Vim syntax highlighter
and filetype detection are already installed as built into the vim runtime.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="X3">Microsoft Windows installation</h2>
<div class="sectionbody">
<div class="paragraph"><p>AsciiDoc is developed and tested on Linux but there seem to be quite a
few people using it on Windows. To install AsciiDoc on Windows unzip
the distribution zip file contents:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>$ unzip asciidoc-9.0.2.zip</code></pre>
</div></div>
<div class="paragraph"><p>This will create the folder <code>asciidoc-9.0.2</code> containing the
<code>asciidoc.py</code> and <code>a2x.py</code> executables along with configuration files
and documentation.</p></div>
<div class="paragraph"><p>To generate DocBook based outputs (e.g. PDFs) you will also need a
working DocBook toolchain. Installing and configuring a DocBook
toolchain on Windows can be a challenge&#8201;&#8212;&#8201;this blog post explains
<a href="http://blog.rainwebs.net/2010/02/25/how-to-create-handsome-pdf-documents-without-frustration/">How
to Create Handsome PDF Documents Without Frustration</a> using
<a href="http://www.cygwin.com/">Cygwin</a>,
<a href="http://dblatex.sourceforge.net/">dblatex</a> and AsciiDoc.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_testing_your_installation">Testing your installation</h2>
<div class="sectionbody">
<div class="paragraph"><p>Test out asciidoc by changing to the AsciiDoc application directory
and converting the User Guide document (<code>./doc/asciidoc.txt</code>) to XHTML
(<code>./doc/asciidoc.html</code>):</p></div>
<div class="literalblock">
<div class="content">
<pre><code>$ python3 asciidoc.py doc/asciidoc.txt</code></pre>
</div></div>
<div class="paragraph"><p>The <a href="testasciidoc.html">testasciidoc</a> tool offers a more extensive set of
conformance tests. You can run the tests by executing this command:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>$ python3 ./tests/testasciidoc.py run</code></pre>
</div></div>
<div class="paragraph"><p>A full battery of tests can be run from the <code>Makefile</code> script in the
distribution root directory:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>$ make test</code></pre>
</div></div>
</div>
</div>
<div class="sect1">
<h2 id="X2">Prepackaged AsciiDoc installation</h2>
<div class="sectionbody">
<div class="paragraph"><p>The following platform-specific AsciiDoc packages are available:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<strong>Fedora Linux</strong>
</dt>
<dd>
<p>
  AsciiDoc is included in Fedora Extras, which is available in
  the default Fedora installation. To install asciidoc, execute the
  following command:
</p>
<div class="literalblock">
<div class="content">
<pre><code>$ yum install asciidoc</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<strong>Ubuntu / Debian</strong>
</dt>
<dd>
<p>
  AsciiDoc is included in Ubuntu / Debian package manager. To install,
  execute the following command:
</p>
<div class="literalblock">
<div class="content">
<pre><code>$ apt install asciidoc</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<strong>macOS Homebrew</strong>
</dt>
<dd>
<p>
  AsciiDoc has been packaged in homebrew and is installable using the
  following command:
</p>
<div class="literalblock">
<div class="content">
<pre><code>$ brew install asciidoc</code></pre>
</div></div>
</dd>
</dl></div>
<div class="paragraph"><p>See also <a href="userguide.html#X38">Packager Notes</a> in the <em>AsciiDoc User
Guide</em>.</p></div>
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Version 9.0.2<br />
Last updated 2020-10-05 05:52:31 UTC<br />
AsciiDoc is a trademark of the Eclipse Foundation, Inc.
</div>
<div id="footer-badges">
<a href="https://validator.w3.org/check?uri=referer">
  <img style="border:0;width:88px;height:31px"
    src="https://www.w3.org/Icons/valid-xhtml11-blue"
    alt="Valid XHTML 1.1" height="31" width="88" />
</a>
<a href="https://jigsaw.w3.org/css-validator/">
  <img style="border:0;width:88px;height:31px"
    src="https://jigsaw.w3.org/css-validator/images/vcss-blue"
    alt="Valid CSS!" />
</a>
</div>
</div>
</div>
</div>
</body>
</html>