| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<meta name="generator" content="AsciiDoc test"> |
| 6 |
<title>ASCIIDOC(1)</title> |
| 7 |
</head> |
| 8 |
<body> |
| 9 |
<hr> |
| 10 |
<h1> |
| 11 |
ASCIIDOC(1) Manual Page |
| 12 |
</h1> |
| 13 |
<hr> |
| 14 |
<h2>NAME</h2> |
| 15 |
<p>asciidoc - |
| 16 |
converts an AsciiDoc text file to HTML or DocBook |
| 17 |
</p> |
| 18 |
<h2><a name="_synopsis"></a>SYNOPSIS</h2> |
| 19 |
<p><strong>asciidoc</strong> [<b>OPTIONS</b>] <b>FILE</b></p> |
| 20 |
<h2><a name="_description"></a>DESCRIPTION</h2> |
| 21 |
<p>The asciidoc(1) command translates the AsciiDoc text file <b>FILE</b> to |
| 22 |
DocBook or HTML. If <b>FILE</b> is <b>-</b> then the standard input is used.</p> |
| 23 |
<h2><a name="_options"></a>OPTIONS</h2> |
| 24 |
<dl> |
| 25 |
<dt> |
| 26 |
<strong>-a, --attribute</strong>=<b>ATTRIBUTE</b> |
| 27 |
</dt> |
| 28 |
<dd> |
| 29 |
<p> |
| 30 |
Define or delete document attribute. <b>ATTRIBUTE</b> is formatted like |
| 31 |
<b>NAME=VALUE</b>. Command-line attributes take precedence over |
| 32 |
document and configuration file attributes. Alternate acceptable |
| 33 |
forms are <b>NAME</b> (the <b>VALUE</b> defaults to an empty string); |
| 34 |
<b>NAME!</b> (delete the <b>NAME</b> attribute); <b>NAME=VALUE@</b> (do not override |
| 35 |
document or configuration file attributes). Values containing |
| 36 |
spaces should be enclosed in double-quote characters. This option |
| 37 |
may be specified more than once. A special attribute named |
| 38 |
<b>trace</b> controls the output of diagnostic information. |
| 39 |
</p> |
| 40 |
</dd> |
| 41 |
<dt> |
| 42 |
<strong>-b, --backend</strong>=<b>BACKEND</b> |
| 43 |
</dt> |
| 44 |
<dd> |
| 45 |
<p> |
| 46 |
Backend output file format: <b>docbook45</b>, <b>docbook5</b>, <b>xhtml11</b>, <b>html4</b>, |
| 47 |
<b>html5</b>, <b>slidy</b>, <b>wordpress</b> or <b>latex</b> (the <b>latex</b> backend is |
| 48 |
experimental). You can also use the backend alias names <b>html</b> |
| 49 |
(aliased to <b>xhtml11</b>) or <b>docbook</b> (aliased to <b>docbook45</b>). |
| 50 |
Defaults to <b>html</b>. The <strong>--backend</strong> option is also used to manage |
| 51 |
backend plugins (see <a href="#X1"><strong>PLUGIN COMMANDS</strong></a>). |
| 52 |
</p> |
| 53 |
</dd> |
| 54 |
<dt> |
| 55 |
<strong>-f, --conf-file</strong>=<b>CONF_FILE</b> |
| 56 |
</dt> |
| 57 |
<dd> |
| 58 |
<p> |
| 59 |
Use configuration file <b>CONF_FILE</b>.Configuration files processed |
| 60 |
in command-line order (after implicit configuration files). This |
| 61 |
option may be specified more than once. |
| 62 |
</p> |
| 63 |
</dd> |
| 64 |
<dt> |
| 65 |
<strong>--doctest</strong> |
| 66 |
</dt> |
| 67 |
<dd> |
| 68 |
<p> |
| 69 |
Run Python doctests in <b>asciidoc</b> module. |
| 70 |
</p> |
| 71 |
</dd> |
| 72 |
<dt> |
| 73 |
<strong>-d, --doctype</strong>=<b>DOCTYPE</b> |
| 74 |
</dt> |
| 75 |
<dd> |
| 76 |
<p> |
| 77 |
Document type: <b>article</b>, <b>manpage</b> or <b>book</b>. The <b>book</b> document |
| 78 |
type is only supported by the <b>docbook</b> backends. Default document |
| 79 |
type is <b>article</b>. |
| 80 |
</p> |
| 81 |
</dd> |
| 82 |
<dt> |
| 83 |
<strong>-c, --dump-conf</strong> |
| 84 |
</dt> |
| 85 |
<dd> |
| 86 |
<p> |
| 87 |
Dump configuration to stdout. |
| 88 |
</p> |
| 89 |
</dd> |
| 90 |
<dt> |
| 91 |
<strong>--filter</strong>=<b>FILTER</b> |
| 92 |
</dt> |
| 93 |
<dd> |
| 94 |
<p> |
| 95 |
Specify the name of a filter to be loaded (used to load filters |
| 96 |
that are not auto-loaded). This option may be specified more than |
| 97 |
once. The <strong>--filter</strong> option is also used to manage filter plugins |
| 98 |
(see <a href="#X1"><strong>PLUGIN COMMANDS</strong></a>). |
| 99 |
</p> |
| 100 |
</dd> |
| 101 |
<dt> |
| 102 |
<strong>-h, --help</strong> [<b>TOPIC</b>] |
| 103 |
</dt> |
| 104 |
<dd> |
| 105 |
<p> |
| 106 |
Print help TOPIC. <strong>--help</strong> <b>topics</b> will print a list of help |
| 107 |
topics, <strong>--help</strong> <b>syntax</b> summarizes AsciiDoc syntax, |
| 108 |
<strong>--help</strong> <b>manpage</b> prints the AsciiDoc manpage. |
| 109 |
</p> |
| 110 |
</dd> |
| 111 |
<dt> |
| 112 |
<strong>-e, --no-conf</strong> |
| 113 |
</dt> |
| 114 |
<dd> |
| 115 |
<p> |
| 116 |
Exclude implicitly loaded configuration files except for those |
| 117 |
named like the input file (<b>infile.conf</b> and |
| 118 |
<b>infile-backend.conf</b>). |
| 119 |
</p> |
| 120 |
</dd> |
| 121 |
<dt> |
| 122 |
<strong>-s, --no-header-footer</strong> |
| 123 |
</dt> |
| 124 |
<dd> |
| 125 |
<p> |
| 126 |
Suppress document header and footer output. |
| 127 |
</p> |
| 128 |
</dd> |
| 129 |
<dt> |
| 130 |
<strong>-o, --out-file</strong>=<b>OUT_FILE</b> |
| 131 |
</dt> |
| 132 |
<dd> |
| 133 |
<p> |
| 134 |
Write output to file <b>OUT_FILE</b>. Defaults to the base name of |
| 135 |
input file with <b>backend</b> extension. If the input is stdin then |
| 136 |
the outfile defaults to stdout. If <b>OUT_FILE</b> is <b>-</b> then the |
| 137 |
standard output is used. |
| 138 |
</p> |
| 139 |
</dd> |
| 140 |
<dt> |
| 141 |
<strong>-n, --section-numbers</strong> |
| 142 |
</dt> |
| 143 |
<dd> |
| 144 |
<p> |
| 145 |
Auto-number HTML article section titles. Synonym for |
| 146 |
<strong>--attribute numbered</strong>. |
| 147 |
</p> |
| 148 |
</dd> |
| 149 |
<dt> |
| 150 |
<strong>--safe</strong> |
| 151 |
</dt> |
| 152 |
<dd> |
| 153 |
<p> |
| 154 |
Enable safe mode. Safe mode is disabled by default. AsciiDoc |
| 155 |
<b>safe mode</b> skips potentially dangerous scripted sections in |
| 156 |
AsciiDoc source files. |
| 157 |
</p> |
| 158 |
</dd> |
| 159 |
<dt> |
| 160 |
<strong>--theme</strong>=<b>THEME</b> |
| 161 |
</dt> |
| 162 |
<dd> |
| 163 |
<p> |
| 164 |
Specify a theme name. Synonym for <strong>--attribute theme</strong>=<b>THEME</b>. |
| 165 |
The <strong>--theme</strong> option is also used to manage theme plugins (see |
| 166 |
<a href="#X1"><strong>PLUGIN COMMANDS</strong></a>). |
| 167 |
</p> |
| 168 |
</dd> |
| 169 |
<dt> |
| 170 |
<strong>-v, --verbose</strong> |
| 171 |
</dt> |
| 172 |
<dd> |
| 173 |
<p> |
| 174 |
Verbosely print processing information and configuration file |
| 175 |
checks to stderr. |
| 176 |
</p> |
| 177 |
</dd> |
| 178 |
<dt> |
| 179 |
<strong>--version</strong> |
| 180 |
</dt> |
| 181 |
<dd> |
| 182 |
<p> |
| 183 |
Print program version number. |
| 184 |
</p> |
| 185 |
</dd> |
| 186 |
</dl> |
| 187 |
<h2><a name="X1"></a>PLUGIN COMMANDS</h2> |
| 188 |
<p>The asciidoc(1) <strong>--filter</strong>, <strong>--backend</strong> and <strong>--theme</strong> options are used |
| 189 |
to install, remove and list AsciiDoc filter, backend and theme |
| 190 |
plugins. Syntax:</p> |
| 191 |
<pre><code>asciidoc OPTION install ZIP_FILE [PLUGINS_DIR] |
| 192 |
asciidoc OPTION remove PLUGIN_NAME [PLUGINS_DIR] |
| 193 |
asciidoc OPTION list |
| 194 |
asciidoc OPTION build ZIP_FILE PLUGIN_SOURCE</code></pre> |
| 195 |
<p>Where:</p> |
| 196 |
<dl> |
| 197 |
<dt> |
| 198 |
<strong>OPTION</strong> |
| 199 |
</dt> |
| 200 |
<dd> |
| 201 |
<p> |
| 202 |
asciidoc(1) <strong>--filter</strong>, <strong>--backend</strong> or <strong>--theme</strong> option specifying |
| 203 |
the type of plugin. |
| 204 |
</p> |
| 205 |
</dd> |
| 206 |
<dt> |
| 207 |
<strong>PLUGIN_NAME</strong> |
| 208 |
</dt> |
| 209 |
<dd> |
| 210 |
<p> |
| 211 |
A unique plugin name containing only alphanumeric or underscore |
| 212 |
characters. |
| 213 |
</p> |
| 214 |
</dd> |
| 215 |
<dt> |
| 216 |
<strong>ZIP_FILE</strong> |
| 217 |
</dt> |
| 218 |
<dd> |
| 219 |
<p> |
| 220 |
A Zip file containing plugin resources, the name must start with the |
| 221 |
plugin name e.g. <code>my_filter-1.0.zip</code> packages filter <code>my_filter</code>. |
| 222 |
</p> |
| 223 |
</dd> |
| 224 |
<dt> |
| 225 |
<strong>PLUGINS_DIR</strong> |
| 226 |
</dt> |
| 227 |
<dd> |
| 228 |
<p> |
| 229 |
The directory containing installed plugins. Each plugin is contained |
| 230 |
in its own separate subdirectory which has the same name as the |
| 231 |
plugin. |
| 232 |
<strong>PLUGINS_DIR</strong> defaults to the <code>$HOME/.asciidoc/filters</code> (for |
| 233 |
filter plugins) or <code>$HOME/.asciidoc/backends</code> (for backend plugins) or |
| 234 |
<code>$HOME/.asciidoc/themes</code> (for theme plugins). |
| 235 |
</p> |
| 236 |
</dd> |
| 237 |
<dt> |
| 238 |
<strong>PLUGIN_SOURCE</strong> |
| 239 |
</dt> |
| 240 |
<dd> |
| 241 |
<p> |
| 242 |
The name of a directory containing the plugin source files or the |
| 243 |
name of a single source file. |
| 244 |
</p> |
| 245 |
</dd> |
| 246 |
</dl> |
| 247 |
<p>The plugin commands perform as follows:</p> |
| 248 |
<dl> |
| 249 |
<dt> |
| 250 |
<strong>install</strong> |
| 251 |
</dt> |
| 252 |
<dd> |
| 253 |
<p> |
| 254 |
Create a subdirectory in <strong>PLUGINS_DIR</strong> with the same name as the |
| 255 |
plugin then extract the <strong>ZIP_FILE</strong> into it. |
| 256 |
</p> |
| 257 |
</dd> |
| 258 |
<dt> |
| 259 |
<strong>remove</strong> |
| 260 |
</dt> |
| 261 |
<dd> |
| 262 |
<p> |
| 263 |
Delete the <strong>PLUGIN_NAME</strong> plugin subdirectory and all its contents |
| 264 |
from the <strong>PLUGINS_DIR</strong>. |
| 265 |
</p> |
| 266 |
</dd> |
| 267 |
<dt> |
| 268 |
<strong>list</strong> |
| 269 |
</dt> |
| 270 |
<dd> |
| 271 |
<p> |
| 272 |
List the names and locations of all installed filter or theme |
| 273 |
plugins (including standard plugins installed in the global |
| 274 |
configuration directory). |
| 275 |
</p> |
| 276 |
</dd> |
| 277 |
<dt> |
| 278 |
<strong>build</strong> |
| 279 |
</dt> |
| 280 |
<dd> |
| 281 |
<p> |
| 282 |
Create a plugin file named <strong>ZIP_FILE</strong> containing the files and |
| 283 |
subdirectories specified by <strong>PLUGIN_SOURCE</strong>. File and directory |
| 284 |
names starting with a period are skipped. |
| 285 |
</p> |
| 286 |
</dd> |
| 287 |
</dl> |
| 288 |
<h2><a name="_environment_variables"></a>ENVIRONMENT VARIABLES</h2> |
| 289 |
<dl> |
| 290 |
<dt> |
| 291 |
<strong><code>SOURCE_DATE_EPOCH</code></strong> |
| 292 |
</dt> |
| 293 |
<dd> |
| 294 |
<p> |
| 295 |
If the <code>SOURCE_DATE_EPOCH</code> environment variable is set to a UNIX |
| 296 |
timestamp, then the <code>{docdate}</code>, <code>{doctime}</code>, <code>{localdate}</code>, and |
| 297 |
<code>{localtime}</code> attributes are computed in the UTC time zone, with any |
| 298 |
timestamps newer than <code>SOURCE_DATE_EPOCH</code> replaced by |
| 299 |
<code>SOURCE_DATE_EPOCH</code>. (This helps software using AsciiDoc to build |
| 300 |
reproducibly.) |
| 301 |
</p> |
| 302 |
</dd> |
| 303 |
</dl> |
| 304 |
<h2><a name="_examples"></a>EXAMPLES</h2> |
| 305 |
<dl> |
| 306 |
<dt> |
| 307 |
<code>asciidoc asciidoc_file_name.txt</code> |
| 308 |
</dt> |
| 309 |
<dd> |
| 310 |
<p> |
| 311 |
Simply generate an html file from the asciidoc_file_name.txt that is in |
| 312 |
current directory using asciidoc. |
| 313 |
</p> |
| 314 |
</dd> |
| 315 |
<dt> |
| 316 |
<code>asciidoc -b html5 asciidoc_file_name.txt</code> |
| 317 |
</dt> |
| 318 |
<dd> |
| 319 |
<p> |
| 320 |
Use the <code>-b</code> switch to use one of the proposed backend or another one you |
| 321 |
installed on your computer. |
| 322 |
</p> |
| 323 |
</dd> |
| 324 |
<dt> |
| 325 |
<code>asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt</code> |
| 326 |
</dt> |
| 327 |
<dd> |
| 328 |
<p> |
| 329 |
Use the <code>-a</code> switch to set attributes from command-line. AsciiDoc generated |
| 330 |
its stand-alone HTML user guide containing embedded CSS, JavaScript and |
| 331 |
images from the AsciiDoc article template with this command. |
| 332 |
</p> |
| 333 |
</dd> |
| 334 |
<dt> |
| 335 |
<code>asciidoc -b html5 -d manpage asciidoc.1.txt</code> |
| 336 |
</dt> |
| 337 |
<dd> |
| 338 |
<p> |
| 339 |
Generating the asciidoc manpage using the html5 backend. |
| 340 |
</p> |
| 341 |
</dd> |
| 342 |
</dl> |
| 343 |
<h2><a name="_exit_status"></a>EXIT STATUS</h2> |
| 344 |
<dl> |
| 345 |
<dt> |
| 346 |
<strong>0</strong> |
| 347 |
</dt> |
| 348 |
<dd> |
| 349 |
<p> |
| 350 |
Success |
| 351 |
</p> |
| 352 |
</dd> |
| 353 |
<dt> |
| 354 |
<strong>1</strong> |
| 355 |
</dt> |
| 356 |
<dd> |
| 357 |
<p> |
| 358 |
Failure (syntax or usage error; configuration error; document |
| 359 |
processing failure; unexpected error). |
| 360 |
</p> |
| 361 |
</dd> |
| 362 |
</dl> |
| 363 |
<h2><a name="_bugs"></a>BUGS</h2> |
| 364 |
<p>See the AsciiDoc distribution BUGS file.</p> |
| 365 |
<h2><a name="_author"></a>AUTHOR</h2> |
| 366 |
<p>AsciiDoc was originally written by Stuart Rackham. Many people have |
| 367 |
contributed to it.</p> |
| 368 |
<h2><a name="_resources"></a>RESOURCES</h2> |
| 369 |
<p>GitHub: <a href="https://github.com/asciidoc/asciidoc-py3/">https://github.com/asciidoc/asciidoc-py3/</a></p> |
| 370 |
<p>Main web site: <a href="https://asciidoc.org/">https://asciidoc.org/</a></p> |
| 371 |
<h2><a name="_see_also"></a>SEE ALSO</h2> |
| 372 |
<p>a2x(1)</p> |
| 373 |
<h2><a name="_copying"></a>COPYING</h2> |
| 374 |
<p>Copyright (C) 2002-2013 Stuart Rackham.</p> |
| 375 |
<p>Copyright (C) 2013-2020 AsciiDoc Contributors.</p> |
| 376 |
<p>Free use of this software is granted under the terms of the GNU General |
| 377 |
Public License version 2 (GPLv2).</p> |
| 378 |
<p></p> |
| 379 |
<p></p> |
| 380 |
<hr><p><small> |
| 381 |
Last updated |
| 382 |
2002-11-25 00:37:42 UTC |
| 383 |
</small></p> |
| 384 |
</body> |
| 385 |
</html> |