git-scribe 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Rakefile +31 -0
- data/SPEC.asciidoc +126 -0
- data/TODO.txt +29 -0
- data/bin/git-scribe +2 -1
- data/docbook-xsl/.CatalogManager.properties.example +61 -0
- data/docbook-xsl/.urilist +1 -0
- data/git-scribe.gemspec +32 -0
- data/lib/git-scribe.rb +21 -315
- data/lib/git-scribe/check.rb +60 -0
- data/lib/git-scribe/cli.rb +84 -0
- data/lib/git-scribe/generate.rb +222 -0
- data/lib/git-scribe/init.rb +16 -0
- data/lib/git-scribe/version.rb +3 -0
- data/template/.gitignore +1 -0
- data/template/.gitscribe +5 -0
- data/test/check_test.rb +12 -0
- data/test/gen_test.rb +78 -0
- data/test/init_test.rb +36 -0
- data/test/test_helper.rb +44 -0
- metadata +49 -161
- data/example/book/big.asc +0 -5604
- data/example/book/holmes.asc +0 -12983
- data/example/output/META-INF/container.xml +0 -6
- data/example/output/OEBPS/ar01s02.html +0 -15
- data/example/output/OEBPS/ar01s03.html +0 -3
- data/example/output/OEBPS/content.opf +0 -21
- data/example/output/OEBPS/index.html +0 -5
- data/example/output/OEBPS/toc.ncx +0 -37
- data/example/output/a_case_of_identity.html +0 -725
- data/example/output/a_example_appendix.html +0 -63
- data/example/output/a_migration_notes.html +0 -95
- data/example/output/apa.html +0 -20
- data/example/output/apb.html +0 -6
- data/example/output/apc.html +0 -24
- data/example/output/apd.html +0 -30
- data/example/output/ape.html +0 -26
- data/example/output/apf.html +0 -9
- data/example/output/apg.html +0 -42
- data/example/output/aph.html +0 -89
- data/example/output/ar01s02.html +0 -12
- data/example/output/ar01s03.html +0 -34
- data/example/output/ar01s04.html +0 -77
- data/example/output/ar01s05.html +0 -272
- data/example/output/ar01s06.html +0 -35
- data/example/output/ar01s07.html +0 -105
- data/example/output/ar01s08.html +0 -33
- data/example/output/ar01s09.html +0 -12
- data/example/output/ar01s10.html +0 -14
- data/example/output/ar01s11.html +0 -34
- data/example/output/ar01s12.html +0 -63
- data/example/output/ar01s13.html +0 -156
- data/example/output/ar01s14.html +0 -330
- data/example/output/ar01s15.html +0 -22
- data/example/output/ar01s16.html +0 -27
- data/example/output/ar01s17.html +0 -94
- data/example/output/ar01s18.html +0 -359
- data/example/output/ar01s19.html +0 -373
- data/example/output/ar01s20.html +0 -27
- data/example/output/ar01s21.html +0 -33
- data/example/output/ar01s22.html +0 -351
- data/example/output/ar01s23.html +0 -21
- data/example/output/ar01s24.html +0 -69
- data/example/output/ar01s25.html +0 -60
- data/example/output/ar01s26.html +0 -217
- data/example/output/ar01s27.html +0 -88
- data/example/output/ar01s28.html +0 -237
- data/example/output/ar01s29.html +0 -68
- data/example/output/ar01s30.html +0 -154
- data/example/output/ar01s31.html +0 -6
- data/example/output/ar01s32.html +0 -22
- data/example/output/ar01s33.html +0 -209
- data/example/output/asciidoc_backends.html +0 -190
- data/example/output/asciidoc_document_types.html +0 -131
- data/example/output/attribute_entries.html +0 -185
- data/example/output/attribute_lists.html +0 -157
- data/example/output/attribute_references.html +0 -414
- data/example/output/attributelist_element.html +0 -143
- data/example/output/b_packager_notes.html +0 -68
- data/example/output/bi01.html +0 -18
- data/example/output/big.asc +0 -5604
- data/example/output/block_element_definitions.html +0 -448
- data/example/output/block_titles.html +0 -83
- data/example/output/blockid_element.html +0 -80
- data/example/output/book.asc +0 -5604
- data/example/output/book.epub +0 -0
- data/example/output/book.fo +0 -3788
- data/example/output/book.html +0 -8793
- data/example/output/book.xml +0 -8265
- data/example/output/c_asciidoc_safe_mode.html +0 -105
- data/example/output/callouts.html +0 -214
- data/example/output/catalog +0 -10
- data/example/output/colophon.html +0 -397
- data/example/output/configuration_files.html +0 -672
- data/example/output/converting_docbook_to_other_file_formats.html +0 -324
- data/example/output/d_using_asciidoc_with_non-english_languages.html +0 -107
- data/example/output/delimited_blocks.html +0 -455
- data/example/output/document_attributes.html +0 -95
- data/example/output/document_processing.html +0 -116
- data/example/output/document_structure.html +0 -493
- data/example/output/e_vim_syntax_highlighter.html +0 -111
- data/example/output/example_bibliography.html +0 -82
- data/example/output/example_colophon.html +0 -58
- data/example/output/example_glossary.html +0 -73
- data/example/output/example_index.html +0 -108
- data/example/output/f_attribute_options.html +0 -129
- data/example/output/filters.html +0 -179
- data/example/output/footnotes.html +0 -103
- data/example/output/g_diagnostics.html +0 -148
- data/example/output/generating_plain_text_files.html +0 -68
- data/example/output/getting_started.html +0 -87
- data/example/output/glossary.html +0 -95
- data/example/output/go01.html +0 -24
- data/example/output/h_backend_attributes.html +0 -308
- data/example/output/help_commands.html +0 -96
- data/example/output/holmes.asc +0 -12983
- data/example/output/image/octocat_professor.png +0 -0
- data/example/output/include/hello.c +0 -10
- data/example/output/index.html +0 -656
- data/example/output/indexes.html +0 -104
- data/example/output/intrinsic_attributes.html +0 -165
- data/example/output/ix01.html +0 -3
- data/example/output/lists.html +0 -666
- data/example/output/macros.html +0 -737
- data/example/output/manpage_documents.html +0 -124
- data/example/output/master.css +0 -281
- data/example/output/mathematical_formulas.html +0 -125
- data/example/output/page.html +0 -60
- data/example/output/paragraphs.html +0 -192
- data/example/output/pr01.html +0 -3
- data/example/output/source_code_highlighting.html +0 -59
- data/example/output/stylesheets/handbookish-quirks.css +0 -0
- data/example/output/stylesheets/handbookish.css +0 -233
- data/example/output/tables.html +0 -797
- data/example/output/text_formatting.html +0 -273
- data/example/output/the_adventure_of_the_beryl_coronet.html +0 -968
- data/example/output/the_adventure_of_the_blue_carbuncle.html +0 -825
- data/example/output/the_adventure_of_the_copper_beeches.html +0 -998
- data/example/output/the_adventure_of_the_engineer_s_thumb.html +0 -851
- data/example/output/the_adventure_of_the_noble_bachelor.html +0 -861
- data/example/output/the_adventure_of_the_speckled_band.html +0 -1015
- data/example/output/the_boscombe_valley_mystery.html +0 -974
- data/example/output/the_first_chapter.html +0 -110
- data/example/output/the_five_orange_pips.html +0 -776
- data/example/output/the_man_with_the_twisted_lip.html +0 -946
- data/example/output/the_red-headed_league.html +0 -950
- data/example/output/the_second_chapter.html +0 -95
- data/example/output/the_third_chapter.html +0 -58
- data/example/output/tips_and_tricks.html +0 -452
- data/example/output/title.html +0 -120
- data/example/output/titles.html +0 -126
data/example/output/ar01s31.html
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Generating Plain Text Files</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s30.html" title="Converting DocBook to other file formats" /><link rel="next" href="ar01s32.html" title="Help Commands" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Generating Plain Text Files</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s30.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s32.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_generating_plain_text_files"></a>Generating Plain Text Files</h2></div></div></div><p>AsciiDoc does not have a text backend (for most purposes AsciiDoc
|
4
|
-
source text is fine), however you can convert AsciiDoc text files to
|
5
|
-
formatted text using the AsciiDoc <a class="link" href="ar01s30.html#X43" title="a2x Toolchain Wrapper">a2x(1)</a> toolchain wrapper
|
6
|
-
utility.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s30.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s32.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Converting DocBook to other file formats </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Help Commands</td></tr></table></div></body></html>
|
data/example/output/ar01s32.html
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Help Commands</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s31.html" title="Generating Plain Text Files" /><link rel="next" href="ar01s33.html" title="Tips and Tricks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Help Commands</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s31.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s33.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="X36"></a>Help Commands</h2></div></div></div><p>The asciidoc(1) command has a <code class="literal">--help</code> option which prints help topics
|
4
|
-
to stdout. The default topic summarizes asciidoc(1) usage:</p><pre class="literallayout">$ asciidoc --help</pre><p>To print a list of help topics:</p><pre class="literallayout">$ asciidoc --help=topics</pre><p>To print a help topic specify the topic name as a command argument.
|
5
|
-
Help topic names can be shortened so long as they are not ambiguous.
|
6
|
-
Examples:</p><pre class="literallayout">$ asciidoc --help=manpage
|
7
|
-
$ asciidoc -hm # Short version of previous example.
|
8
|
-
$ asciidoc --help=syntax
|
9
|
-
$ asciidoc -hs # Short version of previous example.</pre><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_customizing_help"></a>Customizing Help</h3></div></div></div><p>To change, delete or add your own help topics edit a help
|
10
|
-
configuration file. The help file name <code class="literal">help-<lang>.conf</code> is based on
|
11
|
-
the setting of the <code class="literal">lang</code> attribute, it defaults to <code class="literal">help.conf</code>
|
12
|
-
(English). The <a class="link" href="ar01s22.html#X27" title="Configuration File Names and Locations">help file location</a> will depend on whether you
|
13
|
-
want the topics to apply to all users or just the current user.</p><p>The help topic files have the same named section format as other
|
14
|
-
<a class="link" href="ar01s22.html" title="Configuration Files">configuration files</a>. The <code class="literal">help.conf</code> files are stored in the
|
15
|
-
same locations and loaded in the same order as other configuration
|
16
|
-
files.</p><p>When the <code class="literal">--help</code> command-line option is specified AsciiDoc loads the
|
17
|
-
appropriate help files and then prints the contents of the section
|
18
|
-
whose name matches the help topic name. If a topic name is not
|
19
|
-
specified <code class="literal">default</code> is used. You don’t need to specify the whole help
|
20
|
-
topic name on the command-line, just enough letters to ensure it’s not
|
21
|
-
ambiguous. If a matching help file section is not found a list of
|
22
|
-
available topics is printed.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s31.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s33.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Generating Plain Text Files </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Tips and Tricks</td></tr></table></div></body></html>
|
data/example/output/ar01s33.html
DELETED
@@ -1,209 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Tips and Tricks</title><link rel="stylesheet" href="stylesheets/handbookish.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.74.1" /><link rel="home" href="index.html" title="AsciiDoc User Guide" /><link rel="up" href="index.html" title="AsciiDoc User Guide" /><link rel="prev" href="ar01s32.html" title="Help Commands" /><link rel="next" href="go01.html" title="Glossary" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Tips and Tricks</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s32.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="go01.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_tips_and_tricks"></a>Tips and Tricks</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_know_your_editor"></a>Know Your Editor</h3></div></div></div><p>Writing AsciiDoc documents will be a whole lot more pleasant if you
|
4
|
-
know your favorite text editor. Learn how to indent and reformat text
|
5
|
-
blocks, paragraphs, lists and sentences. <a class="link" href="ar01s33.html#X20" title="Vim Commands for Formatting AsciiDoc">Tips for <span class="emphasis"><em>vim</em></span> users</a>
|
6
|
-
follow.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X20"></a>Vim Commands for Formatting AsciiDoc</h3></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="_text_wrap_paragraphs"></a>Text Wrap Paragraphs</h4></div></div></div><p>Use the vim <code class="literal">:gq</code> command to reformat paragraphs. Setting the
|
7
|
-
<span class="emphasis"><em>textwidth</em></span> sets the right text wrap margin; for example:</p><pre class="literallayout">:set textwidth=70</pre><p>To reformat a paragraph:</p><div class="orderedlist"><ol type="1"><li>
|
8
|
-
Position the cursor at the start of the paragraph.
|
9
|
-
</li><li>
|
10
|
-
Type <code class="literal">gq}</code>.
|
11
|
-
</li></ol></div><p>Execute <code class="literal">:help gq</code> command to read about the vim gq command.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><div class="itemizedlist"><ul type="disc"><li>
|
12
|
-
Assign the <code class="literal">gq}</code> command to the Q key with the <code class="literal">nnoremap Q gq}</code>
|
13
|
-
command or put it in your <code class="literal">~/.vimrc</code> file to so it’s always
|
14
|
-
available (see the <a class="link" href="ar01s33.html#X61" title="Example ~/.vimrc File">Example <code class="literal">~/.vimrc</code> file</a>).
|
15
|
-
</li><li>
|
16
|
-
Put <code class="literal">set</code> commands in your <code class="literal">~/.vimrc</code> file so you don’t have to
|
17
|
-
enter them manually.
|
18
|
-
</li><li>
|
19
|
-
The Vim website (<a class="ulink" href="http://www.vim.org" target="_top">http://www.vim.org</a>) has a wealth of resources,
|
20
|
-
including scripts for automated spell checking and ASCII Art
|
21
|
-
drawing.
|
22
|
-
</li></ul></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="_format_lists"></a>Format Lists</h4></div></div></div><p>The <code class="literal">gq</code> command can also be used to format bulleted, numbered and
|
23
|
-
callout lists. First you need to set the <code class="literal">comments</code>, <code class="literal">formatoptions</code>
|
24
|
-
and <code class="literal">formatlistpat</code> (see the <a class="link" href="ar01s33.html#X61" title="Example ~/.vimrc File">Example <code class="literal">~/.vimrc</code> file</a>).</p><p>Now you can format simple lists that use dash, asterisk, period and
|
25
|
-
plus bullets along with numbered ordered lists:</p><div class="orderedlist"><ol type="1"><li>
|
26
|
-
Position the cursor at the start of the list.
|
27
|
-
</li><li>
|
28
|
-
Type <code class="literal">gq}</code>.
|
29
|
-
</li></ol></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="_indent_paragraphs"></a>Indent Paragraphs</h4></div></div></div><p>Indent whole paragraphs by indenting the fist line with the desired
|
30
|
-
indent and then executing the <code class="literal">gq}</code> command.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h4 class="title"><a id="X61"></a>Example <code class="literal">~/.vimrc</code> File</h4></div></div></div><pre class="screen">" Use bold bright fonts.
|
31
|
-
set background=dark
|
32
|
-
|
33
|
-
" Show tabs and trailing characters.
|
34
|
-
set listchars=tab:»·,trail:·
|
35
|
-
set list
|
36
|
-
|
37
|
-
" Don't highlight searched text.
|
38
|
-
highlight clear Search
|
39
|
-
|
40
|
-
" Don't move to matched text while search pattern is being entered.
|
41
|
-
set noincsearch
|
42
|
-
|
43
|
-
" Reformat paragraphs and list.
|
44
|
-
nnoremap R gq}
|
45
|
-
|
46
|
-
" Delete trailing white space and Dos-returns and to expand tabs to spaces.
|
47
|
-
nnoremap S :set et<CR>:retab!<CR>:%s/[\r \t]\+$//<CR>
|
48
|
-
|
49
|
-
autocmd BufRead,BufNewFile *.txt,README,TODO,CHANGELOG,NOTES
|
50
|
-
\ setlocal autoindent expandtab tabstop=8 softtabstop=2 shiftwidth=2 filetype=asciidoc
|
51
|
-
\ textwidth=70 wrap formatoptions=tcqn
|
52
|
-
\ formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\\|^\\s*<\\d\\+>\\s\\+\\\\|^\\s*[a-zA-Z.]\\.\\s\\+\\\\|^\\s*[ivxIVX]\\+\\.\\s\\+
|
53
|
-
\ comments=s1:/*,ex:*/,://,b:#,:%,:XCOMM,fb:-,fb:*,fb:+,fb:.,fb:></pre></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_troubleshooting"></a>Troubleshooting</h3></div></div></div><p>AsciiDoc diagnostic features are detailed in the <a class="link" href="apg.html" title="G. Diagnostics">Diagnostics appendix</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_gotchas"></a>Gotchas</h3></div></div></div><div class="variablelist"><dl><dt><span class="term">
|
54
|
-
Incorrect character encoding
|
55
|
-
</span></dt><dd>
|
56
|
-
If you get an error message like <code class="literal">'UTF-8' codec can't decode ...</code>
|
57
|
-
then you source file contains invalid UTF-8 characters — set the
|
58
|
-
AsciiDoc <a class="link" href="aph.html#X54">encoding attribute</a> for the correct character set
|
59
|
-
(typically ISO-8859-1 (Latin-1) for European languages).
|
60
|
-
</dd><dt><span class="term">
|
61
|
-
Invalid output
|
62
|
-
</span></dt><dd><p>
|
63
|
-
AsciiDoc attempts to validate the input AsciiDoc source but makes
|
64
|
-
no attempt to validate the output markup, it leaves that to
|
65
|
-
external tools such as <code class="literal">xmllint(1)</code> (integrated into <code class="literal">a2x(1)</code>).
|
66
|
-
Backend validation cannot be hardcoded into AsciiDoc because
|
67
|
-
backends are dynamically configured. The following example
|
68
|
-
generates valid HTML but invalid DocBook (the DocBook <code class="literal">literal</code>
|
69
|
-
element cannot contain an <code class="literal">emphasis</code> element):
|
70
|
-
</p><pre class="literallayout">+monospaced text with an _emphasized_ word+</pre></dd><dt><span class="term">
|
71
|
-
Misinterpreted text formatting
|
72
|
-
</span></dt><dd><p>
|
73
|
-
You can suppress markup expansion by placing a backslash character
|
74
|
-
immediately in front of the element. The following example
|
75
|
-
suppresses inline monospaced formatting:
|
76
|
-
</p><pre class="literallayout">\+1 for C++.</pre></dd><dt><span class="term">
|
77
|
-
Overlapping text formatting
|
78
|
-
</span></dt><dd><p>
|
79
|
-
Overlapping text formatting will generate illegal overlapping
|
80
|
-
markup tags which will result in downstream XML parsing errors.
|
81
|
-
Here’s an example:
|
82
|
-
</p><pre class="literallayout">Some *strong markup _that overlaps* emphasized markup_.</pre></dd><dt><span class="term">
|
83
|
-
Ambiguous underlines
|
84
|
-
</span></dt><dd>
|
85
|
-
A DelimitedBlock can immediately follow a paragraph without an
|
86
|
-
intervening blank line, but be careful, a single line paragraph
|
87
|
-
underline may be misinterpreted as a section title underline
|
88
|
-
resulting in a “closing block delimiter expected” error.
|
89
|
-
</dd><dt><span class="term">
|
90
|
-
Ambiguous ordered list items
|
91
|
-
</span></dt><dd><p>
|
92
|
-
Lines beginning with numbers at the end of sentences will be
|
93
|
-
interpreted as ordered list items. The following example
|
94
|
-
(incorrectly) begins a new list with item number 1999:
|
95
|
-
</p><pre class="literallayout">He was last sighted in
|
96
|
-
1999. Since then things have moved on.</pre><p>The <span class="emphasis"><em>list item out of sequence</em></span> warning makes it unlikely that this
|
97
|
-
problem will go unnoticed.</p></dd><dt><span class="term">
|
98
|
-
Special characters in attribute values
|
99
|
-
</span></dt><dd><p>
|
100
|
-
Special character substitution precedes attribute substitution so
|
101
|
-
if attribute values contain special characters you may, depending
|
102
|
-
on the substitution context, need to escape the special characters
|
103
|
-
yourself. For example:
|
104
|
-
</p><pre class="literallayout">$ asciidoc -a 'orgname=Bill &amp; Ben Inc.' mydoc.txt</pre></dd><dt><span class="term">
|
105
|
-
Attribute lists
|
106
|
-
</span></dt><dd><p>
|
107
|
-
If any named attribute entries are present then all string
|
108
|
-
attribute values must be quoted. For example:
|
109
|
-
</p><pre class="literallayout">["Desktop screenshot",width=32]</pre></dd></dl></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="X90"></a>Combining separate documents</h3></div></div></div><p>You have a number of stand-alone AsciiDoc documents that you want to
|
110
|
-
process as a single document. Simply processing them with a series of
|
111
|
-
<code class="literal">include</code> macros won’t work because the documents contain (level 0)
|
112
|
-
document titles. The solution is to create a top level wrapper
|
113
|
-
document and use the <code class="literal">leveloffset</code> attribute to push them all down one
|
114
|
-
level. For example:</p><pre class="screen">Combined Document Title
|
115
|
-
_______________________
|
116
|
-
|
117
|
-
:leveloffset: 1
|
118
|
-
|
119
|
-
include::document1.txt[]
|
120
|
-
|
121
|
-
include::document2.txt[]
|
122
|
-
|
123
|
-
include::document3.txt[]</pre><p>The document titles in the included documents will now be processed as
|
124
|
-
level 1 section titles, level 1 sections as level 2 sections and so
|
125
|
-
on.</p><div class="itemizedlist"><ul type="disc"><li>
|
126
|
-
Put a blank line between the <code class="literal">include</code> macro lines to ensure the
|
127
|
-
title of the included document is not seen as part of the last
|
128
|
-
paragraph of the previous document.
|
129
|
-
</li><li>
|
130
|
-
You won’t want non-title document header lines (for example, Author
|
131
|
-
and Revision lines) in the included files — conditionally exclude
|
132
|
-
them if they are necessary for stand-alone processing.
|
133
|
-
</li></ul></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_processing_document_sections_separately"></a>Processing document sections separately</h3></div></div></div><p>You have divided your AsciiDoc document into separate files (one per
|
134
|
-
top level section) which are combined and processed with the following
|
135
|
-
top level document:</p><pre class="screen">Combined Document Title
|
136
|
-
=======================
|
137
|
-
Joe Bloggs
|
138
|
-
v1.0, 12-Aug-03
|
139
|
-
|
140
|
-
include::section1.txt[]
|
141
|
-
|
142
|
-
include::section2.txt[]
|
143
|
-
|
144
|
-
include::section3.txt[]</pre><p>You also want to process the section files as separate documents.
|
145
|
-
This is easy because asciidoc(1) will quite happily process
|
146
|
-
<code class="literal">section1.txt</code>, <code class="literal">section2.txt</code> and <code class="literal">section3.txt</code> separately — the
|
147
|
-
resulting output documents contain the section but have no document
|
148
|
-
title.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_processing_document_snippets"></a>Processing document snippets</h3></div></div></div><p>Use the <code class="literal">-s</code> (<code class="literal">--no-header-footer</code>) command-line option to suppress
|
149
|
-
header and footer output, this is useful if the processed output is to
|
150
|
-
be included in another file. For example:</p><pre class="literallayout">$ asciidoc -sb docbook section1.txt</pre><p>asciidoc(1) can be used as a filter, so you can pipe chunks of text
|
151
|
-
through it. For example:</p><pre class="literallayout">$ echo 'Hello *World!*' | asciidoc -s -
|
152
|
-
<div class="paragraph"><p>Hello <strong>World!</strong></p></div></pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_badges_in_html_page_footers"></a>Badges in HTML page footers</h3></div></div></div><p>See the <code class="literal">[footer]</code> section in the AsciiDoc distribution <code class="literal">xhtml11.conf</code>
|
153
|
-
configuration file.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_pretty_printing_asciidoc_output"></a>Pretty printing AsciiDoc output</h3></div></div></div><p>If the indentation and layout of the asciidoc(1) output is not to your
|
154
|
-
liking you can:</p><div class="orderedlist"><ol type="1"><li>
|
155
|
-
Change the indentation and layout of configuration file markup
|
156
|
-
template sections. The <code class="literal">{empty}</code> attribute is useful for outputting
|
157
|
-
trailing blank lines in markup templates.
|
158
|
-
</li><li><p>
|
159
|
-
Use Dave Raggett’s <a class="ulink" href="http://tidy.sourceforge.net/" target="_top">HTML Tidy</a> program
|
160
|
-
to tidy asciidoc(1) output. Example:
|
161
|
-
</p><pre class="literallayout">$ asciidoc -b docbook -o - mydoc.txt | tidy -indent -xml >mydoc.xml</pre></li><li><p>
|
162
|
-
Use the <code class="literal">xmllint(1)</code> format option. Example:
|
163
|
-
</p><pre class="literallayout">$ xmllint --format mydoc.xml</pre></li></ol></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_supporting_minor_docbook_dtd_variations"></a>Supporting minor DocBook DTD variations</h3></div></div></div><p>The conditional inclusion of DocBook SGML markup at the end of the
|
164
|
-
distribution <code class="literal">docbook45.conf</code> file illustrates how to support minor
|
165
|
-
DTD variations. The included sections override corresponding entries
|
166
|
-
from preceding sections.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_creating_stand_alone_html_documents"></a>Creating stand-alone HTML documents</h3></div></div></div><p>If you’ve ever tried to send someone an HTML document that includes
|
167
|
-
stylesheets and images you’ll know that it’s not as straight-forward
|
168
|
-
as exchanging a single file. AsciiDoc has options to create
|
169
|
-
stand-alone documents containing embedded images, stylesheets and
|
170
|
-
scripts. The following AsciiDoc command creates a single file
|
171
|
-
containing <a class="link" href="ar01s18.html#X66" title="Embedding images in XHTML documents">embedded images</a>, CSS stylesheets, and JavaScript
|
172
|
-
(for table of contents and footnotes):</p><pre class="literallayout">$ asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt</pre><p>You can view the HTML file here: <a class="ulink" href="http://www.methods.co.nz/asciidoc/article-standalone.html" target="_top">http://www.methods.co.nz/asciidoc/article-standalone.html</a></p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_shipping_stand_alone_asciidoc_source"></a>Shipping stand-alone AsciiDoc source</h3></div></div></div><p>Reproducing presentation documents from someone else’s source has one
|
173
|
-
major problem: unless your configuration files are the same as the
|
174
|
-
creator’s you won’t get the same output.</p><p>The solution is to create a single backend specific configuration file
|
175
|
-
using the asciidoc(1) <code class="literal">-c</code> (<code class="literal">--dump-conf</code>) command-line option. You
|
176
|
-
then ship this file along with the AsciiDoc source document plus the
|
177
|
-
<code class="literal">asciidoc.py</code> script. The only end user requirement is that they have
|
178
|
-
Python installed (and that they consider you a trusted source). This
|
179
|
-
example creates a composite HTML configuration file for <code class="literal">mydoc.txt</code>:</p><pre class="literallayout">$ asciidoc -cb xhtml11 mydoc.txt > mydoc-xhtml11.conf</pre><p>Ship <code class="literal">mydoc.txt</code>, <code class="literal">mydoc-html.conf</code>, and <code class="literal">asciidoc.py</code>. With
|
180
|
-
these three files (and a Python interpreter) the recipient can
|
181
|
-
regenerate the HMTL output:</p><pre class="literallayout">$ ./asciidoc.py -eb xhtml11 mydoc.txt</pre><p>The <code class="literal">-e</code> (<code class="literal">--no-conf</code>) option excludes the use of implicit
|
182
|
-
configuration files, ensuring that only entries from the
|
183
|
-
<code class="literal">mydoc-html.conf</code> configuration are used.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_inserting_blank_space"></a>Inserting blank space</h3></div></div></div><p>Adjust your style sheets to add the correct separation between block
|
184
|
-
elements. Inserting blank paragraphs containing a single non-breaking
|
185
|
-
space character <code class="literal">{nbsp}</code> works but is an ad hoc solution compared
|
186
|
-
to using style sheets.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_closing_open_sections"></a>Closing open sections</h3></div></div></div><p>You can close off section tags up to level <code class="literal">N</code> by calling the
|
187
|
-
<code class="literal">eval::[Section.setlevel(N)]</code> system macro. This is useful if you
|
188
|
-
want to include a section composed of raw markup. The following
|
189
|
-
example includes a DocBook glossary division at the top section level
|
190
|
-
(level 0):</p><pre class="screen">ifdef::basebackend-docbook[]
|
191
|
-
|
192
|
-
eval::[Section.setlevel(0)]
|
193
|
-
|
194
|
-
+++++++++++++++++++++++++++++++
|
195
|
-
<glossary>
|
196
|
-
<title>Glossary</title>
|
197
|
-
<glossdiv>
|
198
|
-
...
|
199
|
-
</glossdiv>
|
200
|
-
</glossary>
|
201
|
-
+++++++++++++++++++++++++++++++
|
202
|
-
endif::basebackend-docbook[]</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="_validating_output_files"></a>Validating output files</h3></div></div></div><p>Use <code class="literal">xmllint(1)</code> to check the AsciiDoc generated markup is both well
|
203
|
-
formed and valid. Here are some examples:</p><pre class="literallayout">$ xmllint --nonet --noout --valid docbook-file.xml
|
204
|
-
$ xmllint --nonet --noout --valid xhtml11-file.html
|
205
|
-
$ xmllint --nonet --noout --valid --html html4-file.html</pre><p>The <code class="literal">--valid</code> option checks the file is valid against the document
|
206
|
-
type’s DTD, if the DTD is not installed in your system’s catalog then
|
207
|
-
it will be fetched from its Internet location. If you omit the
|
208
|
-
<code class="literal">--valid</code> option the document will only be checked that it is well
|
209
|
-
formed.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s32.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="go01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Help Commands </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Glossary</td></tr></table></div></body></html>
|
@@ -1,190 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5
|
-
<link rel="stylesheet" href="master.css" type="text/css" />
|
6
|
-
<title>AsciiDoc Backends</title>
|
7
|
-
</head>
|
8
|
-
|
9
|
-
<body>
|
10
|
-
<div class="nav" id="navheader">
|
11
|
-
<table width="100%">
|
12
|
-
<tr><td width="33%" align="left">
|
13
|
-
|
14
|
-
<a href="asciidoc_document_types.html">Prev</a><br/>
|
15
|
-
AsciiDoc Document Types
|
16
|
-
|
17
|
-
</td><td width="33%" align="center">
|
18
|
-
|
19
|
-
<a href="index.html">Home</a><br/>
|
20
|
-
<strong>AsciiDoc User Guide</strong>
|
21
|
-
|
22
|
-
</td><td width="33%" align="right">
|
23
|
-
|
24
|
-
<a href="document_structure.html">Next</a><br/>
|
25
|
-
Document Structure
|
26
|
-
|
27
|
-
</td></tr>
|
28
|
-
</table>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<hr/>
|
32
|
-
|
33
|
-
<div class="content">
|
34
|
-
<div class="section" lang="en" xml:lang="en">
|
35
|
-
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
36
|
-
<a id="X5"></a>AsciiDoc Backends</h2></div></div></div>
|
37
|
-
<p>The asciidoc(1) command translates an AsciiDoc formatted file to the
|
38
|
-
backend format specified by the <code class="literal">-b</code> (<code class="literal">--backend</code>) command-line
|
39
|
-
option. asciidoc(1) itself has little intrinsic knowledge of backend
|
40
|
-
formats, all translation rules are contained in customizable cascading
|
41
|
-
configuration files. Backend specific attributes are listed in the
|
42
|
-
<a class="link" href="h_backend_attributes.html" title="H. Backend Attributes">Backend Attributes</a> section.</p>
|
43
|
-
<div class="variablelist"><dl>
|
44
|
-
<dt><span class="term">
|
45
|
-
docbook45
|
46
|
-
</span></dt>
|
47
|
-
<dd>
|
48
|
-
Outputs DocBook XML 4.5 markup.
|
49
|
-
</dd>
|
50
|
-
<dt><span class="term">
|
51
|
-
html4
|
52
|
-
</span></dt>
|
53
|
-
<dd>
|
54
|
-
This backend generates plain HTML 4.01 Transitional markup.
|
55
|
-
</dd>
|
56
|
-
<dt><span class="term">
|
57
|
-
xhtml11
|
58
|
-
</span></dt>
|
59
|
-
<dd>
|
60
|
-
This backend generates XHTML 1.1 markup styled with CSS2. Output
|
61
|
-
files have an <code class="literal">.html</code> extension.
|
62
|
-
</dd>
|
63
|
-
<dt><span class="term">
|
64
|
-
slidy
|
65
|
-
</span></dt>
|
66
|
-
<dd>
|
67
|
-
Use this backend to generate self-contained
|
68
|
-
<a class="ulink" href="http://www.w3.org/Talks/Tools/Slidy2/" target="_top">Slidy</a> HTML slideshows for
|
69
|
-
your web browser from AsciiDoc documents. The Slidy backend is
|
70
|
-
documented in the distribution <code class="literal">doc/slidy.txt</code> file and
|
71
|
-
<a class="ulink" href="http://www.methods.co.nz/asciidoc/slidy.html" target="_top">online</a>.
|
72
|
-
</dd>
|
73
|
-
<dt><span class="term">
|
74
|
-
wordpress
|
75
|
-
</span></dt>
|
76
|
-
<dd>
|
77
|
-
A minor variant of the <span class="emphasis"><em>html4</em></span> backend to support
|
78
|
-
<a class="ulink" href="http://srackham.wordpress.com/blogpost1/" target="_top">blogpost</a>.
|
79
|
-
</dd>
|
80
|
-
<dt><span class="term">
|
81
|
-
latex
|
82
|
-
</span></dt>
|
83
|
-
<dd>
|
84
|
-
Experimental LaTeX backend.
|
85
|
-
</dd>
|
86
|
-
</dl></div>
|
87
|
-
<div class="section" lang="en" xml:lang="en">
|
88
|
-
<div class="titlepage"><div><div><h3 class="title">
|
89
|
-
<a id="_backend_aliases"></a>Backend Aliases</h3></div></div></div>
|
90
|
-
<p>Backend aliases are alternative names for AsciiDoc backends. AsciiDoc
|
91
|
-
comes with two backend aliases: <span class="emphasis"><em>html</em></span> (aliased to <span class="emphasis"><em>xhtml11</em></span>) and
|
92
|
-
<span class="emphasis"><em>docbook</em></span> (aliased to <span class="emphasis"><em>docbook45</em></span>).</p>
|
93
|
-
<p>You can assign (or reassign) backend aliases by setting an AsciiDoc
|
94
|
-
attribute named like <code class="literal">backend-alias-<alias></code> to an AsciiDoc backend
|
95
|
-
name. For example, the following backend alias attribute definitions
|
96
|
-
appear in the <code class="literal">[attributes]</code> section of the global <code class="literal">asciidoc.conf</code>
|
97
|
-
configuration file:</p>
|
98
|
-
<pre class="literallayout">backend-alias-html=xhtml11
|
99
|
-
backend-alias-docbook=docbook45</pre>
|
100
|
-
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
|
101
|
-
<h3 class="title">Note</h3>
|
102
|
-
<p>Backend aliases must be assigned in one of the <code class="literal">asciidoc.conf</code>
|
103
|
-
configuration files because these files are loaded first (before the
|
104
|
-
backend configuration files).</p>
|
105
|
-
</div>
|
106
|
-
</div>
|
107
|
-
<div class="section" lang="en" xml:lang="en">
|
108
|
-
<div class="titlepage"><div><div><h3 class="title">
|
109
|
-
<a id="_docbook"></a>DocBook</h3></div></div></div>
|
110
|
-
<p>AsciiDoc generates <span class="emphasis"><em>article</em></span>, <span class="emphasis"><em>book</em></span> and <span class="emphasis"><em>refentry</em></span>
|
111
|
-
<a class="ulink" href="http://www.docbook.org/" target="_top">DocBook</a> documents (corresponding to the
|
112
|
-
AsciiDoc <span class="emphasis"><em>article</em></span>, <span class="emphasis"><em>book</em></span> and <span class="emphasis"><em>manpage</em></span> document types).</p>
|
113
|
-
<p>DocBook documents are not designed to be viewed directly. Most Linux
|
114
|
-
distributions come with conversion tools (collectively called a
|
115
|
-
toolchain) for <a class="link" href="converting_docbook_to_other_file_formats.html" title="Converting DocBook to other file formats">converting DocBook files</a> to presentation
|
116
|
-
formats such as Postscript, HTML, PDF, EPUB, DVI, PostScript, LaTeX,
|
117
|
-
roff (the native man page format), HTMLHelp, JavaHelp and text.</p>
|
118
|
-
</div>
|
119
|
-
<div class="section" lang="en" xml:lang="en">
|
120
|
-
<div class="titlepage"><div><div><h3 class="title">
|
121
|
-
<a id="X35"></a>XHTML Stylesheets</h3></div></div></div>
|
122
|
-
<p>AsciiDoc XHTML output is styled using CSS2 stylesheets from the
|
123
|
-
distribution <code class="literal">./stylesheets/</code> directory.</p>
|
124
|
-
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
|
125
|
-
<h3 class="title">Important</h3>
|
126
|
-
<p>All browsers have CSS quirks, but Microsoft’s IE6 has so many
|
127
|
-
omissions and errors that the <code class="literal">xhtml11-quirks.css</code> stylesheet and
|
128
|
-
<code class="literal">xhtml11-quirks.conf</code> configuration files are available for inclusion
|
129
|
-
during XHTML backend processing to to implement workarounds for IE6.
|
130
|
-
Set the AsciiDoc <span class="emphasis"><em>quirks</em></span> attribute to enable AsciiDoc’s quirks mode,
|
131
|
-
for example with the <code class="literal">--attribute quirks!</code> command-line option.</p>
|
132
|
-
</div>
|
133
|
-
<p>Default <span class="emphasis"><em>xhtml11</em></span> stylesheets:</p>
|
134
|
-
<div class="variablelist"><dl>
|
135
|
-
<dt><span class="term">
|
136
|
-
<code class="literal">./stylesheets/xhtml11.css</code>
|
137
|
-
</span></dt>
|
138
|
-
<dd>
|
139
|
-
The main stylesheet.
|
140
|
-
</dd>
|
141
|
-
<dt><span class="term">
|
142
|
-
<code class="literal">./stylesheets/xhtml11-manpage.css</code>
|
143
|
-
</span></dt>
|
144
|
-
<dd>
|
145
|
-
Tweaks for manpage document type generation.
|
146
|
-
</dd>
|
147
|
-
<dt><span class="term">
|
148
|
-
<code class="literal">./stylesheets/xhtml11-quirks.css</code>
|
149
|
-
</span></dt>
|
150
|
-
<dd>
|
151
|
-
Stylesheet modifications to work around IE6 browser
|
152
|
-
incompatibilities.
|
153
|
-
</dd>
|
154
|
-
</dl></div>
|
155
|
-
<p>Use the <span class="emphasis"><em>theme</em></span> attribute to select an alternative set of stylesheets.
|
156
|
-
For example, the command-line option <code class="literal">-a theme=foo</code> will use
|
157
|
-
stylesheets <code class="literal">foo.css</code>, <code class="literal">foo-manpage.css</code> (and <code class="literal">foo-quirks.css</code> if
|
158
|
-
quirks mode is enabled) instead of the default stylesheets.</p>
|
159
|
-
<p>Use the <span class="emphasis"><em>stylesheet</em></span> attribute to include an additional stylesheet in
|
160
|
-
XHTML documents. For example, the command-line option <code class="literal">-a
|
161
|
-
stylesheet=newsletter.css</code> will use stylesheets <code class="literal">newsletter.css</code>.</p>
|
162
|
-
</div>
|
163
|
-
</div>
|
164
|
-
|
165
|
-
</div>
|
166
|
-
|
167
|
-
<hr/>
|
168
|
-
|
169
|
-
<div class="nav" id="navfooter">
|
170
|
-
<table width="100%">
|
171
|
-
<tr><td width="33%" align="left">
|
172
|
-
|
173
|
-
<a href="asciidoc_document_types.html">Prev</a><br/>
|
174
|
-
AsciiDoc Document Types
|
175
|
-
|
176
|
-
</td><td width="33%" align="center">
|
177
|
-
|
178
|
-
<a href="index.html">Home</a><br/>
|
179
|
-
AsciiDoc User Guide
|
180
|
-
|
181
|
-
</td><td width="33%" align="right">
|
182
|
-
|
183
|
-
<a href="document_structure.html">Next</a><br/>
|
184
|
-
Document Structure
|
185
|
-
|
186
|
-
</td></tr>
|
187
|
-
</table>
|
188
|
-
</div>
|
189
|
-
</body>
|
190
|
-
</html>
|
@@ -1,131 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5
|
-
<link rel="stylesheet" href="master.css" type="text/css" />
|
6
|
-
<title>AsciiDoc Document Types</title>
|
7
|
-
</head>
|
8
|
-
|
9
|
-
<body>
|
10
|
-
<div class="nav" id="navheader">
|
11
|
-
<table width="100%">
|
12
|
-
<tr><td width="33%" align="left">
|
13
|
-
|
14
|
-
<a href="getting_started.html">Prev</a><br/>
|
15
|
-
Getting Started
|
16
|
-
|
17
|
-
</td><td width="33%" align="center">
|
18
|
-
|
19
|
-
<a href="index.html">Home</a><br/>
|
20
|
-
<strong>AsciiDoc User Guide</strong>
|
21
|
-
|
22
|
-
</td><td width="33%" align="right">
|
23
|
-
|
24
|
-
<a href="asciidoc_backends.html">Next</a><br/>
|
25
|
-
AsciiDoc Backends
|
26
|
-
|
27
|
-
</td></tr>
|
28
|
-
</table>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<hr/>
|
32
|
-
|
33
|
-
<div class="content">
|
34
|
-
<div class="section" lang="en" xml:lang="en">
|
35
|
-
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
36
|
-
<a id="_asciidoc_document_types"></a>AsciiDoc Document Types</h2></div></div></div>
|
37
|
-
<p>There are three types of AsciiDoc documents: article, book and
|
38
|
-
manpage. All document types share the same AsciiDoc format with some
|
39
|
-
minor variations. If you are familiar with DocBook you will have
|
40
|
-
noticed that AsciiDoc document types correspond to the same-named
|
41
|
-
DocBook document types).</p>
|
42
|
-
<p>Use the asciidoc(1) <code class="literal">-d</code> (<code class="literal">--doctype</code>) option to specify the AsciiDoc
|
43
|
-
document type — the default document type is <span class="emphasis"><em>article</em></span>.</p>
|
44
|
-
<p>By convention the <code class="literal">.txt</code> file extension is used for AsciiDoc document
|
45
|
-
source files.</p>
|
46
|
-
<div class="section" lang="en" xml:lang="en">
|
47
|
-
<div class="titlepage"><div><div><h3 class="title">
|
48
|
-
<a id="_article"></a>article</h3></div></div></div>
|
49
|
-
<p>Used for short documents, articles and general documentation. See the
|
50
|
-
AsciiDoc distribution <code class="literal">./doc/article.txt</code> example.</p>
|
51
|
-
<p>AsciiDoc defines standard DocBook article frontmatter and backmatter
|
52
|
-
<a class="link" href="document_structure.html#X93" title="Section markup templates">section markup templates</a> (appendix, abstract, bibliography,
|
53
|
-
glossary, index).</p>
|
54
|
-
</div>
|
55
|
-
<div class="section" lang="en" xml:lang="en">
|
56
|
-
<div class="titlepage"><div><div><h3 class="title">
|
57
|
-
<a id="_book"></a>book</h3></div></div></div>
|
58
|
-
<p>Books share the same format as articles, with the following
|
59
|
-
differences:</p>
|
60
|
-
<div class="itemizedlist"><ul type="disc">
|
61
|
-
<li>
|
62
|
-
The part titles in multi-part books are <a class="link" href="titles.html" title="Titles">top level titles</a>
|
63
|
-
(same level as book title).
|
64
|
-
</li>
|
65
|
-
<li>
|
66
|
-
Some sections are book specific e.g. preface and colophon.
|
67
|
-
</li>
|
68
|
-
</ul></div>
|
69
|
-
<p>Book documents will normally be used to produce DocBook output since
|
70
|
-
DocBook processors can automatically generate footnotes, table of
|
71
|
-
contents, list of tables, list of figures, list of examples and
|
72
|
-
indexes.</p>
|
73
|
-
<p>AsciiDoc defines standard DocBook book frontmatter and backmatter
|
74
|
-
<a class="link" href="document_structure.html#X93" title="Section markup templates">section markup templates</a> (appendix, dedication, preface,
|
75
|
-
bibliography, glossary, index, colophon).</p>
|
76
|
-
<div class="variablelist">
|
77
|
-
<p class="title"><b>Example book documents</b></p>
|
78
|
-
<dl>
|
79
|
-
<dt><span class="term">
|
80
|
-
Book
|
81
|
-
</span></dt>
|
82
|
-
<dd>
|
83
|
-
The <code class="literal">./doc/book.txt</code> file in the AsciiDoc distribution.
|
84
|
-
</dd>
|
85
|
-
<dt><span class="term">
|
86
|
-
Multi-part book
|
87
|
-
</span></dt>
|
88
|
-
<dd>
|
89
|
-
The <code class="literal">./doc/book-multi.txt</code> file in the AsciiDoc distribution.
|
90
|
-
</dd>
|
91
|
-
</dl>
|
92
|
-
</div>
|
93
|
-
</div>
|
94
|
-
<div class="section" lang="en" xml:lang="en">
|
95
|
-
<div class="titlepage"><div><div><h3 class="title">
|
96
|
-
<a id="_manpage"></a>manpage</h3></div></div></div>
|
97
|
-
<p>Used to generate roff format UNIX manual pages. AsciiDoc manpage
|
98
|
-
documents observe special header title and section naming conventions — see the <a class="link" href="manpage_documents.html" title="Manpage Documents">Manpage Documents</a> section for details.</p>
|
99
|
-
<p>AsciiDoc defines the <span class="emphasis"><em>synopsis</em></span> <a class="link" href="document_structure.html#X93" title="Section markup templates">section markup template</a> to
|
100
|
-
generate the DocBook <code class="literal">refsynopsisdiv</code> section.</p>
|
101
|
-
<p>See also the asciidoc(1) man page source (<code class="literal">./doc/asciidoc.1.txt</code>) from
|
102
|
-
the AsciiDoc distribution.</p>
|
103
|
-
</div>
|
104
|
-
</div>
|
105
|
-
|
106
|
-
</div>
|
107
|
-
|
108
|
-
<hr/>
|
109
|
-
|
110
|
-
<div class="nav" id="navfooter">
|
111
|
-
<table width="100%">
|
112
|
-
<tr><td width="33%" align="left">
|
113
|
-
|
114
|
-
<a href="getting_started.html">Prev</a><br/>
|
115
|
-
Getting Started
|
116
|
-
|
117
|
-
</td><td width="33%" align="center">
|
118
|
-
|
119
|
-
<a href="index.html">Home</a><br/>
|
120
|
-
AsciiDoc User Guide
|
121
|
-
|
122
|
-
</td><td width="33%" align="right">
|
123
|
-
|
124
|
-
<a href="asciidoc_backends.html">Next</a><br/>
|
125
|
-
AsciiDoc Backends
|
126
|
-
|
127
|
-
</td></tr>
|
128
|
-
</table>
|
129
|
-
</div>
|
130
|
-
</body>
|
131
|
-
</html>
|